We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 145f860 commit 070f796Copy full SHA for 070f796
1 file changed
popup/popup.js
@@ -187,7 +187,13 @@ const nowLocal = new Date(now.getTime() - now.getTimezoneOffset() * 60000);
187
"{{now.unix_ms}}": now.getTime(),
188
"{{now.year}}": now.getUTCFullYear(),
189
"{{now.month}}": now.getUTCMonth() + 1,
190
- "{{now.day}}": now.getUTCDate(),
+"{{now.local.iso}}": (() => {
191
+ const offsetMinutes = now.getTimezoneOffset();
192
+ const sign = offsetMinutes > 0 ? "-" : "+";
193
+ const hours = ("0" + Math.floor(Math.abs(offsetMinutes / 60))).slice(-2);
194
+ const minutes = ("0" + Math.abs(offsetMinutes % 60)).slice(-2);
195
+ return nowLocal.toISOString().slice(0, -1) + sign + hours + ":" + minutes;
196
+})(),
197
"{{now.hour}}": now.getUTCHours(),
198
"{{now.minute}}": now.getUTCMinutes(),
199
"{{now.second}}": now.getUTCSeconds(),
0 commit comments