-
Notifications
You must be signed in to change notification settings - Fork 605
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Date: Olson-timezone-support (real 'z')
- Loading branch information
Ramalingam Kandaswamy,Manikandan
committed
Feb 10, 2017
1 parent
26f6b01
commit 8e074bf
Showing
6 changed files
with
153 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
define([], function() { | ||
|
||
/** | ||
* regionFormat( date, format, timeZoneId, formatNumber ) | ||
* | ||
* Return date's timezone names according to the format passed. | ||
* Eg for format when timezone offset is 180: | ||
* "regionFormat": "{0} Time", | ||
* "regionFormat-type-standard": "{0} Standard Time", | ||
* "regionFormat-type-daylight": "{0} Daylight Time", | ||
* "fallbackFormat": "{1} ({0})", | ||
*/ | ||
return function( date, regionFormatStandard, regionFormatDaylight, standardTzName, daylightTzName, | ||
exemplarCity ) { | ||
|
||
// var isDST = date.isDST(); FIXME | ||
var isDST = false, | ||
format; | ||
if ( isDST ) { | ||
format = ( daylightTzName ) ? daylightTzName : | ||
( regionFormatStandard ) ? regionFormatDaylight.replace( /\{0\}/, exemplarCity ) : | ||
undefined; | ||
} else { | ||
format = ( standardTzName ) ? standardTzName : | ||
( regionFormatStandard ) ? regionFormatStandard.replace( /\{0\}/, exemplarCity ) : | ||
undefined; | ||
} | ||
return format; | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters