@@ -1643,7 +1643,7 @@ describe('input', function() {
1643
1643
it ( 'should validate' , function ( ) {
1644
1644
changeInputValueTo ( '2013-07' ) ;
1645
1645
expect ( inputElm ) . toBeValid ( ) ;
1646
- expect ( + scope . value ) . toBe ( + new Date ( 2013 , 6 , 1 ) ) ;
1646
+ expect ( + scope . value ) . toBe ( + Date . UTC ( 2013 , 6 , 1 ) ) ;
1647
1647
expect ( scope . form . alias . $error . min ) . toBeFalsy ( ) ;
1648
1648
} ) ;
1649
1649
} ) ;
@@ -1656,7 +1656,7 @@ describe('input', function() {
1656
1656
it ( 'should validate' , function ( ) {
1657
1657
changeInputValueTo ( '2012-03' ) ;
1658
1658
expect ( inputElm ) . toBeValid ( ) ;
1659
- expect ( + scope . value ) . toBe ( + new Date ( 2012 , 2 , 1 ) ) ;
1659
+ expect ( + scope . value ) . toBe ( + Date . UTC ( 2012 , 2 , 1 ) ) ;
1660
1660
expect ( scope . form . alias . $error . max ) . toBeFalsy ( ) ;
1661
1661
} ) ;
1662
1662
@@ -1684,7 +1684,7 @@ describe('input', function() {
1684
1684
compileInput ( '<input type="week" ng-model="secondWeek"/>' ) ;
1685
1685
1686
1686
scope . $apply ( function ( ) {
1687
- scope . secondWeek = new Date ( 2013 , 0 , 11 ) ;
1687
+ scope . secondWeek = new Date ( Date . UTC ( 2013 , 0 , 11 ) ) ;
1688
1688
} ) ;
1689
1689
1690
1690
expect ( inputElm . val ( ) ) . toBe ( '2013-W02' ) ;
@@ -1694,7 +1694,7 @@ describe('input', function() {
1694
1694
compileInput ( '<input type="week" ng-model="value"/>' ) ;
1695
1695
1696
1696
scope . $apply ( function ( ) {
1697
- scope . value = new Date ( 2013 , 0 , 11 ) ;
1697
+ scope . value = new Date ( Date . UTC ( 2013 , 0 , 11 ) ) ;
1698
1698
} ) ;
1699
1699
1700
1700
@@ -1738,7 +1738,7 @@ describe('input', function() {
1738
1738
compileInput ( '<input type="week" ng-model="test" />' ) ;
1739
1739
1740
1740
scope . $apply ( function ( ) {
1741
- scope . test = new Date ( 2011 , 0 , 1 ) ;
1741
+ scope . test = new Date ( Date . UTC ( 2011 , 0 , 1 ) ) ;
1742
1742
} ) ;
1743
1743
1744
1744
changeInputValueTo ( '' ) ;
@@ -1761,7 +1761,7 @@ describe('input', function() {
1761
1761
it ( 'should validate' , function ( ) {
1762
1762
changeInputValueTo ( '2013-W03' ) ;
1763
1763
expect ( inputElm ) . toBeValid ( ) ;
1764
- expect ( + scope . value ) . toBe ( + new Date ( 2013 , 0 , 17 ) ) ;
1764
+ expect ( + scope . value ) . toBe ( + Date . UTC ( 2013 , 0 , 17 ) ) ;
1765
1765
expect ( scope . form . alias . $error . min ) . toBeFalsy ( ) ;
1766
1766
} ) ;
1767
1767
} ) ;
@@ -1774,7 +1774,7 @@ describe('input', function() {
1774
1774
it ( 'should validate' , function ( ) {
1775
1775
changeInputValueTo ( '2012-W01' ) ;
1776
1776
expect ( inputElm ) . toBeValid ( ) ;
1777
- expect ( + scope . value ) . toBe ( + new Date ( 2012 , 0 , 5 ) ) ;
1777
+ expect ( + scope . value ) . toBe ( Date . UTC ( 2012 , 0 , 5 ) ) ;
1778
1778
expect ( scope . form . alias . $error . max ) . toBeFalsy ( ) ;
1779
1779
} ) ;
1780
1780
@@ -1878,7 +1878,7 @@ describe('input', function() {
1878
1878
it ( 'should validate' , function ( ) {
1879
1879
changeInputValueTo ( '2000-01-01T23:02' ) ;
1880
1880
expect ( inputElm ) . toBeValid ( ) ;
1881
- expect ( + scope . value ) . toBe ( + new Date ( 2000 , 0 , 1 , 23 , 2 ) ) ;
1881
+ expect ( + scope . value ) . toBe ( + Date . UTC ( 2000 , 0 , 1 , 23 , 2 ) ) ;
1882
1882
expect ( scope . form . alias . $error . min ) . toBeFalsy ( ) ;
1883
1883
} ) ;
1884
1884
} ) ;
@@ -1898,7 +1898,7 @@ describe('input', function() {
1898
1898
it ( 'should validate' , function ( ) {
1899
1899
changeInputValueTo ( '2000-01-01T01:02' ) ;
1900
1900
expect ( inputElm ) . toBeValid ( ) ;
1901
- expect ( + scope . value ) . toBe ( + new Date ( 2000 , 0 , 1 , 1 , 2 ) ) ;
1901
+ expect ( + scope . value ) . toBe ( + Date . UTC ( 2000 , 0 , 1 , 1 , 2 ) ) ;
1902
1902
expect ( scope . form . alias . $error . max ) . toBeFalsy ( ) ;
1903
1903
} ) ;
1904
1904
} ) ;
@@ -2023,7 +2023,7 @@ describe('input', function() {
2023
2023
it ( 'should validate' , function ( ) {
2024
2024
changeInputValueTo ( '23:02' ) ;
2025
2025
expect ( inputElm ) . toBeValid ( ) ;
2026
- expect ( + scope . value ) . toBe ( + new Date ( 0 , 0 , 1 , 23 , 2 ) ) ;
2026
+ expect ( + scope . value ) . toBe ( + Date . UTC ( 0 , 0 , 1 , 23 , 2 ) ) ;
2027
2027
expect ( scope . form . alias . $error . min ) . toBeFalsy ( ) ;
2028
2028
} ) ;
2029
2029
} ) ;
@@ -2043,7 +2043,7 @@ describe('input', function() {
2043
2043
it ( 'should validate' , function ( ) {
2044
2044
changeInputValueTo ( '05:30' ) ;
2045
2045
expect ( inputElm ) . toBeValid ( ) ;
2046
- expect ( + scope . value ) . toBe ( + new Date ( 0 , 0 , 1 , 5 , 30 ) ) ;
2046
+ expect ( + scope . value ) . toBe ( + Date . UTC ( 0 , 0 , 1 , 5 , 30 ) ) ;
2047
2047
expect ( scope . form . alias . $error . max ) . toBeFalsy ( ) ;
2048
2048
} ) ;
2049
2049
} ) ;
@@ -2168,7 +2168,7 @@ describe('input', function() {
2168
2168
it ( 'should validate' , function ( ) {
2169
2169
changeInputValueTo ( '2000-01-01' ) ;
2170
2170
expect ( inputElm ) . toBeValid ( ) ;
2171
- expect ( + scope . value ) . toBe ( + new Date ( 2000 , 0 , 1 ) ) ;
2171
+ expect ( + scope . value ) . toBe ( Date . UTC ( 2000 , 0 , 1 ) ) ;
2172
2172
expect ( scope . form . alias . $error . min ) . toBeFalsy ( ) ;
2173
2173
} ) ;
2174
2174
} ) ;
@@ -2188,7 +2188,7 @@ describe('input', function() {
2188
2188
it ( 'should validate' , function ( ) {
2189
2189
changeInputValueTo ( '2000-01-01' ) ;
2190
2190
expect ( inputElm ) . toBeValid ( ) ;
2191
- expect ( + scope . value ) . toBe ( + new Date ( 2000 , 0 , 1 ) ) ;
2191
+ expect ( + scope . value ) . toBe ( Date . UTC ( 2000 , 0 , 1 ) ) ;
2192
2192
expect ( scope . form . alias . $error . max ) . toBeFalsy ( ) ;
2193
2193
} ) ;
2194
2194
} ) ;
0 commit comments