Update ToChromeBrowserTimeStamp.mjs

This commit is contained in:
Michael H 2024-06-12 12:44:16 +01:00 committed by GitHub
parent 3e1448c8f8
commit 42744669c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,7 +17,6 @@ class ToChromeBrowserTimestamp extends Operation {
*/ */
constructor() { constructor() {
super(); super();
this.name = "To Chrome Browser Timestamp"; this.name = "To Chrome Browser Timestamp";
this.module = "Default"; this.module = "Default";
this.description = "Converts datetime string to Chrome Browser Timestamp<br><br>e.g. <code>5 April 2009 16:45:49 UTC</code>\ this.description = "Converts datetime string to Chrome Browser Timestamp<br><br>e.g. <code>5 April 2009 16:45:49 UTC</code>\
@ -33,12 +32,10 @@ class ToChromeBrowserTimestamp extends Operation {
} }
]; ];
} }
/** /**
* @param {string} input * @param {string} input
* @param {Object[]} args * @param {Object[]} args
* @returns {string} * @returns {string}
* @throws {OperationError} if invalid unit
*/ */
run(input, args) { run(input, args) {
const [showDateTime] = args, const [showDateTime] = args,
@ -47,5 +44,4 @@ class ToChromeBrowserTimestamp extends Operation {
return showDateTime ? `${result} (${d.tz("UTC").format("ddd D MMMM YYYY HH:mm:ss")} UTC)` : result.toString(); return showDateTime ? `${result} (${d.tz("UTC").format("ddd D MMMM YYYY HH:mm:ss")} UTC)` : result.toString();
} }
} }
export default ToChromeBrowserTimestamp; export default ToChromeBrowserTimestamp;