## 1.8.0
This commit is contained in:
parent
24e700065e
commit
1afd11d693
@ -156,3 +156,8 @@ None
|
|||||||
|
|
||||||
- Copy Syntax In Light Theme
|
- Copy Syntax In Light Theme
|
||||||
- [Copy-Syntax-in-Light](https://github.com/Ahmed-Adel-Morsi/Copy-Syntax-in-Light)
|
- [Copy-Syntax-in-Light](https://github.com/Ahmed-Adel-Morsi/Copy-Syntax-in-Light)
|
||||||
|
|
||||||
|
## 1.8.0 Wed Nov 06 2024 06:03:59 GMT-0700 (Mountain Standard Time)
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Change insert date to include ticks *
|
||||||
|
@ -264,5 +264,5 @@
|
|||||||
"webpack": "webpack --config ./build/node-extension.webpack.config.js",
|
"webpack": "webpack --config ./build/node-extension.webpack.config.js",
|
||||||
"watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\""
|
"watch": "concurrently \"rollup -c -w\" \"webpack --watch --config ./build/node-extension.webpack.config.js\""
|
||||||
},
|
},
|
||||||
"version": "1.7.0"
|
"version": "1.8.0"
|
||||||
}
|
}
|
||||||
|
@ -137,12 +137,18 @@ function insertDateTimeLogic(): undefined {
|
|||||||
const selection = textEditor.selection;
|
const selection = textEditor.selection;
|
||||||
textEditor.edit(editBuilder => {
|
textEditor.edit(editBuilder => {
|
||||||
var range;
|
var range;
|
||||||
|
let date = new Date();
|
||||||
|
let timezoneOffset = date.getTimezoneOffset();
|
||||||
|
let seconds = date.getTime().valueOf() + timezoneOffset;
|
||||||
|
let epoch = seconds * 10000;
|
||||||
|
let ticks = epoch + 621355968000000000;
|
||||||
|
let dateText = ticks + " = " + date.toString();
|
||||||
if (selection.isEmpty) {
|
if (selection.isEmpty) {
|
||||||
editBuilder.insert(selection.start, date.toString())
|
editBuilder.insert(selection.start, dateText)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
range = new vscode.Range(selection.start.line, selection.start.character, selection.end.line, selection.end.character);
|
range = new vscode.Range(selection.start.line, selection.start.character, selection.end.line, selection.end.character);
|
||||||
editBuilder.replace(range, date.toString());
|
editBuilder.replace(range, dateText);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return undefined;
|
return undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user