@@ -75,35 +75,35 @@ test('setUTCDate', function(){
75
75
} ) ;
76
76
77
77
test ( 'setStartDate' , function ( ) {
78
- var date_in = new Date ( Date . UTC ( 2012 , 3 , 5 ) ) ,
79
- expected_date = date_in ,
78
+ var date_in = new Date ( 2012 , 3 , 5 ) ,
79
+ expected_date = new Date ( Date . UTC ( 2012 , 3 , 5 ) ) ,
80
80
returnedObject = this . dp . setStartDate ( date_in ) ;
81
81
// ...
82
82
datesEqual ( this . dp . o . startDate , expected_date ) ;
83
83
strictEqual ( returnedObject , this . dp , "is chainable" ) ;
84
84
} ) ;
85
85
86
86
test ( 'setEndDate' , function ( ) {
87
- var date_in = new Date ( Date . UTC ( 2012 , 3 , 5 ) ) ,
88
- expected_date = date_in ,
87
+ var date_in = new Date ( 2012 , 3 , 5 ) ,
88
+ expected_date = new Date ( Date . UTC ( 2012 , 3 , 5 ) ) ,
89
89
returnedObject = this . dp . setEndDate ( date_in ) ;
90
90
// ...
91
91
datesEqual ( this . dp . o . endDate , expected_date ) ;
92
92
strictEqual ( returnedObject , this . dp , "is chainable" ) ;
93
93
} ) ;
94
94
95
95
test ( 'getStartDate' , function ( ) {
96
- var date_in = new Date ( Date . UTC ( 2012 , 3 , 5 ) ) ,
97
- expected_date = date_in ,
96
+ var date_in = new Date ( 2012 , 3 , 5 ) ,
97
+ expected_date = new Date ( Date . UTC ( 2012 , 3 , 5 ) ) ,
98
98
returnedObject = this . dp . setStartDate ( date_in ) ;
99
99
// ...
100
100
datesEqual ( returnedObject . getStartDate ( ) , expected_date ) ;
101
101
strictEqual ( returnedObject , this . dp , "is chainable" ) ;
102
102
} ) ;
103
103
104
104
test ( 'getEndDate' , function ( ) {
105
- var date_in = new Date ( Date . UTC ( 2012 , 3 , 5 ) ) ,
106
- expected_date = date_in ,
105
+ var date_in = new Date ( 2012 , 3 , 5 ) ,
106
+ expected_date = new Date ( Date . UTC ( 2012 , 3 , 5 ) ) ,
107
107
returnedObject = this . dp . setEndDate ( date_in ) ;
108
108
// ...
109
109
datesEqual ( returnedObject . getEndDate ( ) , expected_date ) ;
@@ -150,21 +150,21 @@ test('moveMonth - can handle invalid date', function(){
150
150
151
151
test ( 'parseDate - outputs correct value' , function ( ) {
152
152
var parsedDate = $ . fn . datepicker . DPGlobal . parseDate ( '11/13/2015' , $ . fn . datepicker . DPGlobal . parseFormat ( 'mm/dd/yyyy' ) , 'en' ) ;
153
- equal ( parsedDate . getDate ( ) , "13" , "date is correct" ) ;
154
- equal ( parsedDate . getMonth ( ) , "10" , "month is correct" ) ;
155
- equal ( parsedDate . getFullYear ( ) , "2015" , "fullyear is correct" ) ;
153
+ equal ( parsedDate . getUTCDate ( ) , "13" , "date is correct" ) ;
154
+ equal ( parsedDate . getUTCMonth ( ) , "10" , "month is correct" ) ;
155
+ equal ( parsedDate . getUTCFullYear ( ) , "2015" , "fullyear is correct" ) ;
156
156
} ) ;
157
157
158
158
test ( 'parseDate - outputs correct value for yyyy\u5E74mm\u6708dd\u65E5 format' , function ( ) {
159
159
var parsedDate = $ . fn . datepicker . DPGlobal . parseDate ( '2015\u5E7411\u670813' , $ . fn . datepicker . DPGlobal . parseFormat ( 'yyyy\u5E74mm\u6708dd\u65E5' ) , 'ja' ) ;
160
- equal ( parsedDate . getDate ( ) , "13" , "date is correct" ) ;
161
- equal ( parsedDate . getMonth ( ) , "10" , "month is correct" ) ;
162
- equal ( parsedDate . getFullYear ( ) , "2015" , "fullyear is correct" ) ;
160
+ equal ( parsedDate . getUTCDate ( ) , "13" , "date is correct" ) ;
161
+ equal ( parsedDate . getUTCMonth ( ) , "10" , "month is correct" ) ;
162
+ equal ( parsedDate . getUTCFullYear ( ) , "2015" , "fullyear is correct" ) ;
163
163
} ) ;
164
164
165
165
test ( 'parseDate - outputs correct value for dates containing unicodes' , function ( ) {
166
166
var parsedDate = $ . fn . datepicker . DPGlobal . parseDate ( '\u5341\u4E00\u6708 13 2015' , $ . fn . datepicker . DPGlobal . parseFormat ( 'MM dd yyyy' ) , 'zh-CN' ) ;
167
- equal ( parsedDate . getDate ( ) , "13" , "date is correct" ) ;
168
- equal ( parsedDate . getMonth ( ) , "10" , "month is correct" ) ;
169
- equal ( parsedDate . getFullYear ( ) , "2015" , "fullyear is correct" ) ;
167
+ equal ( parsedDate . getUTCDate ( ) , "13" , "date is correct" ) ;
168
+ equal ( parsedDate . getUTCMonth ( ) , "10" , "month is correct" ) ;
169
+ equal ( parsedDate . getUTCFullYear ( ) , "2015" , "fullyear is correct" ) ;
170
170
} ) ;
0 commit comments