wsick / Fayde

Inspired by Silverlight; XAML engine using Javascript and rendering to the HTML5 Canvas.
MIT License
189 stars 27 forks source link

DateTime.AddDays/AddHours sometimes gives wrong date #152

Closed Sally-Xu closed 9 years ago

Sally-Xu commented 9 years ago

Here is the test case:

        var day = new DateTime(2015, 11, 1);          
        console.log(day.toString());          // output: 2015-11-01T00:00:00  --correct
        console.log(day.AddDays(1).toString());  //output: 2015-11-01T23:00:00 -- NOT correct
        console.log(day.AddDays(2).toString());  //output: 2015-11-02T23:00:00 -- NOT correct
        console.log(day.AddHours(24).toString()); //output: 2015-11-01T23:00:00--NOT correct
        console.log(day.AddMonths(1).toString()); //2015-12-01T00:00:00--correct
Sally-Xu commented 9 years ago

I think it happens on all the DST start and end date.

BSick7 commented 9 years ago

Fixed in v0.16.45.