diff options
author | Keith Wood <kbwood.au@gmail.com> | 2009-04-01 10:56:58 +0000 |
---|---|---|
committer | Keith Wood <kbwood.au@gmail.com> | 2009-04-01 10:56:58 +0000 |
commit | fc75c3e3adfa39f55f1a450a785cbe8da5329f30 (patch) | |
tree | 1469cfe94a2aba06aebd45597ca6a6f56a6d06d1 /tests/unit/datepicker | |
parent | e55ee9e6e9977df6be4d8b9503a5c9756bcbdbd3 (diff) | |
download | jquery-ui-fc75c3e3adfa39f55f1a450a785cbe8da5329f30.tar.gz jquery-ui-fc75c3e3adfa39f55f1a450a785cbe8da5329f30.zip |
Datepicker: added Windows ticks format
Diffstat (limited to 'tests/unit/datepicker')
-rw-r--r-- | tests/unit/datepicker/datepicker_options.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/datepicker/datepicker_options.js b/tests/unit/datepicker/datepicker_options.js index 882a72b22..6b82a8370 100644 --- a/tests/unit/datepicker/datepicker_options.js +++ b/tests/unit/datepicker/datepicker_options.js @@ -657,6 +657,10 @@ test('parseDate', function() { new Date(2051, 2 - 1, 3), 'Parse date y-m-d - cutoff 80'); equalsDate($.datepicker.parseDate('y-m-d', '51-02-03', {shortYearCutoff: '+60'}), new Date(2051, 2 - 1, 3), 'Parse date y-m-d - cutoff +60'); + var gmtDate = new Date(2001, 2 - 1, 3); + gmtDate.setMinutes(gmtDate.getMinutes() - gmtDate.getTimezoneOffset()); + equalsDate($.datepicker.parseDate('@', '981158400000'), gmtDate, 'Parse date @'); + equalsDate($.datepicker.parseDate('!', '631167552000000000'), gmtDate, 'Parse date !'); var fr = $.datepicker.regional['fr']; var settings = {dayNamesShort: fr.dayNamesShort, dayNames: fr.dayNames, monthNamesShort: fr.monthNamesShort, monthNames: fr.monthNames}; @@ -745,6 +749,10 @@ test('formatDate', function() { equals($.datepicker.formatDate('\'day\' d \'of\' MM (\'\'DD\'\'), yy', new Date(2001, 2 - 1, 3)), 'day 3 of February (\'Saturday\'), 2001', 'Format date \'day\' d \'of\' MM (\'\'DD\'\'), yy'); + var gmtDate = new Date(2001, 2 - 1, 3); + gmtDate.setMinutes(gmtDate.getMinutes() - gmtDate.getTimezoneOffset()); + equals($.datepicker.formatDate('@', gmtDate), '981158400000', 'Format date @'); + equals($.datepicker.formatDate('!', gmtDate), '631167552000000000', 'Format date !'); var fr = $.datepicker.regional['fr']; var settings = {dayNamesShort: fr.dayNamesShort, dayNames: fr.dayNames, monthNamesShort: fr.monthNamesShort, monthNames: fr.monthNames}; |