Search

5/12/2008

date object <-> timestamp

1. convert date to raw timestamp


>>> new Date().valueOf();
1210564949062


2. convert raw timestamp to date

>>> new Date(1210564949062)
Mon May 12 2008 12:02:29 GMT+0800 (Taipei Standard Time)

沒有留言: