Skip to content

Commit

Permalink
[Feature] Generate current timestamp IvanMathy#340
Browse files Browse the repository at this point in the history
  • Loading branch information
atovk committed Jun 11, 2022
1 parent 2c30ad5 commit 0b95cd3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Scripts/GenerateCurrentTimestamp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
{
"api":1,
"name":"Generate current timestamp",
"description":"Generate current now time to Unix timestamp.",
"author":"atovk",
"icon":"watch",
"tags":"date,time,calendar,unix,timestamp"
}
**/

function main(input) {

let currentTimeMillis = Date.now()

if (isNaN(currentTimeMillis)) {
input.postError("Invalid Date")
} else {
input.insert(currentTimeMillis);
}
}

0 comments on commit 0b95cd3

Please sign in to comment.