@@ -157,29 +157,29 @@ describe("A DatetimeFormatter", function () {
157157 var formatter = new Backgrid . DatetimeFormatter ( {
158158 includeTime : false
159159 } ) ;
160- expect ( formatter . fromRaw ( new Date ( Date . UTC ( 2012 , 1 , 29 , 5 , 30 , 0 , 100 ) ) . toISOString ( ) ) ) . toBe ( "2012-02-29" ) ;
160+ expect ( formatter . fromRaw ( " 2012-02-29T05:30:00.100Z" ) ) . toBe ( "2012-02-29" ) ;
161161 } ) ;
162162
163163 it ( ".fromRaw() can convert an ISO datetime string to an ISO time string" , function ( ) {
164164 var formatter = new Backgrid . DatetimeFormatter ( {
165165 includeDate : false
166166 } ) ;
167- expect ( formatter . fromRaw ( new Date ( Date . UTC ( 2012 , 1 , 29 , 5 , 30 , 0 , 100 ) ) . toISOString ( ) ) ) . toBe ( "05:30:00" ) ;
167+ expect ( formatter . fromRaw ( " 2012-02-29T05:30:00.100Z" ) ) . toBe ( "05:30:00" ) ;
168168 } ) ;
169169
170170 it ( ".fromRaw() can convert an ISO datetime string to an ISO time string with milliseconds" , function ( ) {
171171 var formatter = new Backgrid . DatetimeFormatter ( {
172172 includeDate : false ,
173173 includeMilli : true
174174 } ) ;
175- expect ( formatter . fromRaw ( new Date ( Date . UTC ( 2012 , 1 , 29 , 5 , 30 , 0 , 100 ) ) . toISOString ( ) ) ) . toBe ( "05:30:00.100" ) ;
175+ expect ( formatter . fromRaw ( " 2012-02-29T05:30:00.100Z" ) ) . toBe ( "05:30:00.100" ) ;
176176 } ) ;
177177
178178 it ( ".fromRaw() can convert an ISO datetime string to an ISO datetime string with milliseconds" , function ( ) {
179179 var formatter = new Backgrid . DatetimeFormatter ( {
180180 includeMilli : true
181181 } ) ;
182- expect ( formatter . fromRaw ( new Date ( Date . UTC ( 2012 , 1 , 29 , 5 , 30 , 0 , 100 ) ) . toISOString ( ) ) ) . toBe ( "2012-02-29T05:30:00.100Z" ) ;
182+ expect ( formatter . fromRaw ( " 2012-02-29T05:30:00.100Z" ) ) . toBe ( "2012-02-29T05:30:00.100Z" ) ;
183183 } ) ;
184184
185185 it ( ".fromRaw() can convert an ISO date string to an ISO datetime string" , function ( ) {
@@ -243,34 +243,34 @@ describe("A DatetimeFormatter", function () {
243243 var formatter = new Backgrid . DatetimeFormatter ( {
244244 includeTime : false
245245 } ) ;
246- expect ( formatter . toRaw ( new Date ( Date . UTC ( 2012 , 1 , 29 , 5 , 30 , 0 , 100 ) ) . toISOString ( ) ) ) . toBe ( undefined ) ;
246+ expect ( formatter . toRaw ( " 2012-02-29T05:30:00.100Z" ) ) . toBe ( undefined ) ;
247247 } ) ;
248248
249249 it ( ".toRaw() returns undefined when converting an ISO datetime string to an ISO time string" , function ( ) {
250250 var formatter = new Backgrid . DatetimeFormatter ( {
251251 includeDate : false
252252 } ) ;
253- expect ( formatter . toRaw ( new Date ( Date . UTC ( 2012 , 1 , 29 , 5 , 30 , 0 , 100 ) ) . toISOString ( ) ) ) . toBe ( undefined ) ;
253+ expect ( formatter . toRaw ( " 2012-02-29T05:30:00.100Z" ) ) . toBe ( undefined ) ;
254254 } ) ;
255255
256256 it ( ".toRaw() returns undefined when converting an ISO datetime string to an ISO time string with milliseconds" , function ( ) {
257257 var formatter = new Backgrid . DatetimeFormatter ( {
258258 includeDate : false ,
259259 includeMilli : true
260260 } ) ;
261- expect ( formatter . toRaw ( new Date ( Date . UTC ( 2012 , 1 , 29 , 5 , 30 , 0 , 100 ) ) . toISOString ( ) ) ) . toBe ( undefined ) ;
261+ expect ( formatter . toRaw ( " 2012-02-29T05:30:00.100Z" ) ) . toBe ( undefined ) ;
262262 } ) ;
263263
264264 it ( ".toRaw() can convert an ISO datetime string to an ISO datetime string" , function ( ) {
265265 var formatter = new Backgrid . DatetimeFormatter ;
266- expect ( formatter . toRaw ( new Date ( Date . UTC ( 2012 , 1 , 29 , 5 , 30 , 0 , 100 ) ) . toISOString ( ) ) ) . toBe ( "2012-02-29T05:30:00Z" ) ;
266+ expect ( formatter . toRaw ( " 2012-02-29T05:30:00.100Z" ) ) . toBe ( "2012-02-29T05:30:00Z" ) ;
267267 } ) ;
268268
269269 it ( ".toRaw() can convert an ISO datetime string to an ISO datetime string with milliseconds" , function ( ) {
270270 var formatter = new Backgrid . DatetimeFormatter ( {
271271 includeMilli : true
272272 } ) ;
273- expect ( formatter . toRaw ( new Date ( Date . UTC ( 2012 , 1 , 29 , 5 , 30 , 0 , 100 ) ) . toISOString ( ) ) ) . toBe ( "2012-02-29T05:30:00.100Z" ) ;
273+ expect ( formatter . toRaw ( " 2012-02-29T05:30:00.100Z" ) ) . toBe ( "2012-02-29T05:30:00.100Z" ) ;
274274 } ) ;
275275
276276 it ( ".toRaw() returns undefined when converting an ISO date string to an ISO datetime string" , function ( ) {
0 commit comments