Separate client and server codes. Keep everything in one git repo for simplicity
[vchess.git] / client / client_OLD / javascripts / utils / datetime.js
... / ...
CommitLineData
1function zeroPad(x)
2{
3 return (x<10 ? "0" : "") + x;
4}
5
6function getDate(d)
7{
8 return d.getFullYear() + '-' + zeroPad(d.getMonth()+1) + '-' + zeroPad(d.getDate());
9}
10
11function getTime(d)
12{
13 return zeroPad(d.getHours()) + ":" + zeroPad(d.getMinutes()) + ":" +
14 zeroPad(d.getSeconds());
15}