如何在javascript中将正常日期2012.08.10
转换为unix时间戳?
Fiddle: http://jsfiddle.net/J2pWj/
I've seen many posts here that convert it in PHP, Ruby, etc... But I need to do this inside JS.
如何在javascript中将正常日期2012.08.10
转换为unix时间戳?
Fiddle: http://jsfiddle.net/J2pWj/
I've seen many posts here that convert it in PHP, Ruby, etc... But I need to do this inside JS.
Math.floor(new Date('2012.08.10').getTime() / 1000)