mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 13:55:54 +03:00
urb.util.toDate
This commit is contained in:
parent
e0814b6eae
commit
42b47b3f2f
@ -88,3 +88,16 @@ window.urb.unsubscribe = function(params,cb) {
|
||||
delete $this.cabs[$this.gsig(params)]
|
||||
})
|
||||
}
|
||||
|
||||
window.urb.util = {
|
||||
toDate: function (dat){
|
||||
var mils = Math.floor((0x10000 * dat.getUTCMilliseconds()) / 1000).toString(16)
|
||||
return '~' + dat.getUTCFullYear() +
|
||||
'.' + (dat.getUTCMonth() + 1) +
|
||||
'.' + dat.getUTCDate() +
|
||||
'..' + dat.getUTCHours() +
|
||||
'.' + dat.getUTCMinutes() +
|
||||
'.' + dat.getUTCSeconds() +
|
||||
'..' + ('0000' + mils).substr(-4, 4)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user