by al2o3cr · 10y ago · 0 comments
new Date('2016-02-11') !== new Date(2016,1,11)
One is midnight in the local TZ, other is midnight in UTC.(╯°□°)╯︵ ┻━┻
> new Date(2016,1,11)
Thu Feb 11 2016 00:00:00 GMT-0800 (PST)
> new Date('2016-02-11')
Wed Feb 10 2016 16:00:00 GMT-0800 (PST)
I make the same mistake constantly even though I learned this years ago.