|
@@ -1106,6 +1106,17 @@ namespace Jint.Tests.Runtime
|
|
|
Assert.Equal(0, result);
|
|
|
}
|
|
|
|
|
|
+ [Fact]
|
|
|
+ public void TimeWithinDayShouldHandleNegativeValues()
|
|
|
+ {
|
|
|
+ RunTest(@"
|
|
|
+ // using a date < 1970 so that the primitive value is negative
|
|
|
+ var d = new Date(1958, 0, 1);
|
|
|
+ d.setMonth(-1);
|
|
|
+ assert(d.getDate() == 1);
|
|
|
+ ");
|
|
|
+ }
|
|
|
+
|
|
|
[Fact]
|
|
|
public void LocalDateTimeShouldNotLoseTimezone()
|
|
|
{
|