projects
/
vchess.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Update TODO
[vchess.git]
/
public
/
javascripts
/
utils
/
datetime.js
1
function
zeroPad
(
x
)
2
{
3
return
(
x
<
10
?
"0"
:
""
) +
x
;
4
}
5
6
function
getDate
(
d
)
7
{
8
return
d
.
getFullYear
() +
'-'
+ (
d
.
getMonth
()+
1
) +
'-'
+
zeroPad
(
d
.
getDate
());
9
}
10
11
function
getTime
(
d
)
12
{
13
return
zeroPad
(
d
.
getHours
()) +
":"
+
zeroPad
(
d
.
getMinutes
()) +
":"
+
14
zeroPad
(
d
.
getSeconds
());
15
}