Skip to content

Commit

Permalink
Date: add compiler test for timeZone
Browse files Browse the repository at this point in the history
  • Loading branch information
nkovacs committed May 22, 2017
1 parent 49a4eb1 commit 111d11d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"devDependencies": {
"cldr-data-downloader": "^0.2.5",
"glob": "^7.1.1",
"globalize-compiler": "^0.3.0-alpha.3",
"globalize-compiler": "^0.3.0-alpha.6",
"grunt": "0.4.5",
"grunt-check-dependencies": "0.6.0",
"grunt-commitplease": "0.0.5",
Expand All @@ -92,7 +92,7 @@
"grunt-jscs": "1.8.0",
"grunt-mocha-test": "^0.13.2",
"gzip-js": "0.3.2",
"iana-tz-data": "0.0.4",
"iana-tz-data": ">=2017.0.0",
"matchdep": "0.3.0",
"mocha": "^3.3.0",
"zoned-date-time": "0.0.4"
Expand Down
6 changes: 6 additions & 0 deletions test/compiler/cases/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,25 @@ module.exports = {
// date
require( "../../../external/cldr-data/main/en/ca-gregorian.json" ),
require( "../../../external/cldr-data/main/en/timeZoneNames.json" ),
require( "../../../external/cldr-data/supplemental/metaZones.json" ),
require( "../../../external/cldr-data/supplemental/timeData.json" ),
require( "../../../external/cldr-data/supplemental/weekData.json" ),
// number
require( "../../../external/cldr-data/main/en/numbers.json" ),
require( "../../../external/cldr-data/supplemental/numberingSystems.json" )
);

Globalize.loadTimeZone( require( "iana-tz-data" ) );

return Globalize;
},
cases: function( Globalize ) {
var date = new Date( 2010, 8, 15, 17, 35, 7, 369 );
Globalize.locale( "en" );
return [
{ formatter: Globalize.dateFormatter({ datetime: "full", timeZone: "Europe/Berlin" }), args: [ date ] },
{ formatter: Globalize.dateFormatter({ datetime: "full", timeZone: "America/Los_Angeles" }), args: [ date ] },

{ formatter: Globalize.dateFormatter({ skeleton: "GyMMMEd" }), args: [ date ] },
{ formatter: Globalize.dateFormatter({ skeleton: "dhms" }), args: [ date ] },
{ formatter: Globalize.dateFormatter({ skeleton: "GyMMMEdhms" }), args: [ date ] },
Expand Down

0 comments on commit 111d11d

Please sign in to comment.