| Index: pkg/intl/test/date_time_format_test_core.dart
|
| ===================================================================
|
| --- pkg/intl/test/date_time_format_test_core.dart (revision 13683)
|
| +++ pkg/intl/test/date_time_format_test_core.dart (working copy)
|
| @@ -225,7 +225,7 @@
|
| });
|
|
|
| test('Test ALL the supported formats on representative locales', () {
|
| - var aDate = new Date(2012, 1, 27, 20, 58, 59, 0, false);
|
| + var aDate = new Date(2012, 1, 27, 20, 58, 59, 0);
|
| testLocale("en_US", English, aDate);
|
| testLocale("de_DE", German, aDate);
|
| testLocale("fr_FR", French, aDate);
|
| @@ -240,11 +240,11 @@
|
| var locales = subset == null ? allLocales() : subset;
|
| for (var locale in locales) {
|
| for (var month in months) {
|
| - var aDate = new Date(2012, month, 27, 13, 58, 59, 012, false);
|
| + var aDate = new Date(2012, month, 27, 13, 58, 59, 012);
|
| testRoundTripParsing(locale, aDate);
|
| }
|
| for (var hour in hours) {
|
| - var aDate = new Date(2012, 1, 27, hour, 58, 59, 123, false);
|
| + var aDate = new Date(2012, 1, 27, hour, 58, 59, 123);
|
| testRoundTripParsing(locale, aDate);
|
| }
|
| }
|
| @@ -264,7 +264,7 @@
|
| });
|
|
|
| test('Test malformed locales', () {
|
| - var aDate = new Date(2012, 1, 27, 20, 58, 59, 0, false);
|
| + var aDate = new Date(2012, 1, 27, 20, 58, 59, 0);
|
| // Austrian is a useful test locale here because it differs slightly
|
| // from the generic "de" locale so we can tell the difference between
|
| // correcting to "de_AT" and falling back to just "de".
|
| @@ -278,14 +278,14 @@
|
| var instanceJP = intl.date('jms');
|
| var instanceUS = intl.date('jms', 'en_US');
|
| var blank = intl.date('jms');
|
| - var date = new Date(2012, 1, 27, 20, 58, 59, 0, false);
|
| + var date = new Date(2012, 1, 27, 20, 58, 59, 0);
|
| expect(instanceJP.format(date), equals("20:58:59"));
|
| expect(instanceUS.format(date), equals("8:58:59 PM"));
|
| expect(blank.format(date), equals("20:58:59"));
|
| });
|
|
|
| test('Test explicit format string', () {
|
| - var aDate = new Date(2012, 1, 27, 20, 58, 59, 0, false);
|
| + var aDate = new Date(2012, 1, 27, 20, 58, 59, 0);
|
| // An explicit format that doesn't conform to any skeleton
|
| var us = new DateFormat(r'yy //// :D \\\\ dd:ss ^&@ M');
|
| expect(us.format(aDate), equals(r"12 //// :D \\\\ 27:59 ^&@ 1"));
|
| @@ -309,8 +309,8 @@
|
| });
|
|
|
| test('Test fractional seconds padding', () {
|
| - var one = new Date(2012, 1, 27, 20, 58, 59, 1, false);
|
| - var oneHundred = new Date(2012, 1, 27, 20, 58, 59, 100, false);
|
| + var one = new Date(2012, 1, 27, 20, 58, 59, 1);
|
| + var oneHundred = new Date(2012, 1, 27, 20, 58, 59, 100);
|
| var fractional = new DateFormat('hh:mm:ss.SSS', 'en_US');
|
| expect(fractional.format(one), equals('08:58:59.001'));
|
| expect(fractional.format(oneHundred), equals('08:58:59.100'));
|
| @@ -320,8 +320,8 @@
|
| });
|
|
|
| test('Test parseUTC', () {
|
| - var local = new Date(2012, 1, 27, 20, 58, 59, 1, false);
|
| - var utc = new Date(2012, 1, 27, 20, 58, 59, 1, true);
|
| + var local = new Date(2012, 1, 27, 20, 58, 59, 1);
|
| + var utc = new Date.utc(2012, 1, 27, 20, 58, 59, 1);
|
| // Getting the offset as a duration via difference() would be simpler,
|
| // but doesn't work on dart2js in checked mode. See issue 4437.
|
| var offset = utc.millisecondsSinceEpoch - local.millisecondsSinceEpoch;
|
| @@ -337,7 +337,7 @@
|
| });
|
|
|
| test('Test default format', () {
|
| - var someDate = new Date(2012, 1, 27, 20, 58, 59, 1, false);
|
| + var someDate = new Date(2012, 1, 27, 20, 58, 59, 1);
|
| var emptyFormat = new DateFormat(locale: "en_US");
|
| var knownDefault = new DateFormat.yMMMMd("en_US").add_jms();
|
| var result = emptyFormat.format(someDate);
|
|
|