-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtime.js
More file actions
30 lines (24 loc) · 776 Bytes
/
time.js
File metadata and controls
30 lines (24 loc) · 776 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//timestamp / time clock
//TODO: ADD AM / PM SETTINGS
//TODO: ADD TIMECLOCK FUNCTIONALITY
//noted : the version of JS that Atom's script package allows doesn't support :
//backtics
//let
var timestamp = function(){
var date = new Date()
var sec = date.getSeconds()
/*let min = date.getMinutes()
let hour = date.getHours()
let d = date.getDate()
let month = date.getMonth()
let year = date.getFullYear()
*/
var min = date.getMinutes()
var hour = date.getHours()
var d = date.getDate()
var month = date.getMonth()
var year = date.getFullYear()
//console.log(`${month}/${d}/${year}; ${hour}:${min}:${sec}`)
console.log("" + month + "/" + d + "/" + year + "; " + hour + ":" + min + ":" + sec)
}
timestamp()