In [removed] Why new Date('2012-1-15') - new Date('2012-01-15') == 21600000

后端 未结 3 1803
生来不讨喜
生来不讨喜 2020-12-29 20:04

I\'m confused but in javascript:

> new Date(\'2012-1-15\') - new Date(\'2012-01-15\')
  21600000

Why is that? (21600000 / 1000 / 3600 ==

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-29 20:55

    The result of new Date('2012-1-15') is implementation-dependent (ECMAScript standard, clause 15.9.4.2).

提交回复
热议问题