forked from globalizejs/globalize
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ref globalizejs#678 Ref globalizejs#697 Ref globalizejs#700
- Loading branch information
Showing
12 changed files
with
2,395 additions
and
505 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
define([ | ||
"./inverse-fields-map" | ||
], function( dateInverseFieldsMap ) { | ||
|
||
// Invert key and values, e.g., {"year": "yY"} ==> {"y": "year", "Y": "year"} | ||
return Object.keys( dateInverseFieldsMap ).reduce( function( map, key ) { | ||
var value = dateInverseFieldsMap[ key ]; | ||
value.split( "" ).forEach(function( symbol ) { | ||
map[ symbol ] = key; | ||
}); | ||
return map; | ||
}, {}); | ||
|
||
}); |
Oops, something went wrong.