aboutsummaryrefslogtreecommitdiffstats
path: root/external/cldrjs/cldr/supplemental.js
diff options
context:
space:
mode:
Diffstat (limited to 'external/cldrjs/cldr/supplemental.js')
-rw-r--r--external/cldrjs/cldr/supplemental.js101
1 files changed, 101 insertions, 0 deletions
diff --git a/external/cldrjs/cldr/supplemental.js b/external/cldrjs/cldr/supplemental.js
new file mode 100644
index 000000000..821abc4bf
--- /dev/null
+++ b/external/cldrjs/cldr/supplemental.js
@@ -0,0 +1,101 @@
+/**
+ * CLDR JavaScript Library v0.4.3
+ * http://jquery.com/
+ *
+ * Copyright 2013 Rafael Xavier de Souza
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2015-08-24T01:00Z
+ */
+/*!
+ * CLDR JavaScript Library v0.4.3 2015-08-24T01:00Z MIT license © Rafael Xavier
+ * http://git.io/h4lmVg
+ */
+(function( factory ) {
+
+ if ( typeof define === "function" && define.amd ) {
+ // AMD.
+ define( [ "../cldr" ], factory );
+ } else if ( typeof module === "object" && typeof module.exports === "object" ) {
+ // Node. CommonJS.
+ module.exports = factory( require( "cldrjs" ) );
+ } else {
+ // Global
+ factory( Cldr );
+ }
+
+}(function( Cldr ) {
+
+ // Build optimization hack to avoid duplicating functions across modules.
+ var alwaysArray = Cldr._alwaysArray;
+
+
+
+ var supplementalMain = function( cldr ) {
+
+ var prepend, supplemental;
+
+ prepend = function( prepend ) {
+ return function( path ) {
+ path = alwaysArray( path );
+ return cldr.get( [ prepend ].concat( path ) );
+ };
+ };
+
+ supplemental = prepend( "supplemental" );
+
+ // Week Data
+ // http://www.unicode.org/reports/tr35/tr35-dates.html#Week_Data
+ supplemental.weekData = prepend( "supplemental/weekData" );
+
+ supplemental.weekData.firstDay = function() {
+ return cldr.get( "supplemental/weekData/firstDay/{territory}" ) ||
+ cldr.get( "supplemental/weekData/firstDay/001" );
+ };
+
+ supplemental.weekData.minDays = function() {
+ var minDays = cldr.get( "supplemental/weekData/minDays/{territory}" ) ||
+ cldr.get( "supplemental/weekData/minDays/001" );
+ return parseInt( minDays, 10 );
+ };
+
+ // Time Data
+ // http://www.unicode.org/reports/tr35/tr35-dates.html#Time_Data
+ supplemental.timeData = prepend( "supplemental/timeData" );
+
+ supplemental.timeData.allowed = function() {
+ return cldr.get( "supplemental/timeData/{territory}/_allowed" ) ||
+ cldr.get( "supplemental/timeData/001/_allowed" );
+ };
+
+ supplemental.timeData.preferred = function() {
+ return cldr.get( "supplemental/timeData/{territory}/_preferred" ) ||
+ cldr.get( "supplemental/timeData/001/_preferred" );
+ };
+
+ return supplemental;
+
+ };
+
+
+
+
+ var initSuper = Cldr.prototype.init;
+
+ /**
+ * .init() automatically ran on construction.
+ *
+ * Overload .init().
+ */
+ Cldr.prototype.init = function() {
+ initSuper.apply( this, arguments );
+ this.supplemental = supplementalMain( this );
+ };
+
+ return Cldr;
+
+
+
+
+}));