mirror of
https://github.com/RGBCube/serenity
synced 2025-07-04 20:17:36 +00:00
Base: Move "js" and "little" HackStudio projects into ~/Source/
This commit is contained in:
parent
bc615572a9
commit
db450dbc44
28 changed files with 1 additions and 1 deletions
14
Base/home/anon/Source/js/date.js
Normal file
14
Base/home/anon/Source/js/date.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
var now = Date.now();
|
||||
console.log("Unix timestamp: " + now / 1000);
|
||||
|
||||
var d = new Date();
|
||||
var year = d.getFullYear();
|
||||
var month = (d.getMonth() + 1).toString().padStart(2, "0");
|
||||
var day = d.getDate().toString().padStart(2, "0");
|
||||
var hours = d.getHours().toString().padStart(2, "0");
|
||||
var minutes = d.getMinutes().toString().padStart(2, "0");
|
||||
var seconds = d.getSeconds().toString().padStart(2, "0");
|
||||
var milliseconds = d.getMilliseconds().toString().padStart(3, "0");
|
||||
|
||||
console.log("Date: " + year + "-" + month + "-" + day);
|
||||
console.log("Time: " + hours + ":" + minutes + ":" + seconds + "." + milliseconds);
|
Loading…
Add table
Add a link
Reference in a new issue