Changeset 7382
- Timestamp:
- 02/20/07 15:45:00 (23 months ago)
- Location:
- trunk/src
- Files:
-
- 2 removed
- 2 modified
-
date/format.js (modified) (5 diffs)
-
i18n/cldr/nls/gregorianExtras.js (deleted)
-
i18n/cldr/nls/ja/gregorianExtras.js (deleted)
-
widget/DatePicker.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/date/format.js
r6908 r7382 12 12 // names and formats 13 13 dojo.requireLocalization("dojo.i18n.cldr", "gregorian"); 14 dojo.requireLocalization("dojo.i18n.cldr", "gregorianExtras");15 14 16 15 //NOTE: Everything in this module assumes Gregorian calendars. … … 29 28 // formatting lengths may be chosen, with "full" used by default. 30 29 // Custom patterns may be used or registered with translations using 31 // the addCustom Bundlemethod.30 // the addCustomFormats method. 32 31 // Formatting patterns are implemented using the syntax described at 33 32 // http://www.unicode.org/reports/tr35/tr35-4.html#Date_Format_Patterns … … 216 215 var str = []; 217 216 var sauce = dojo.lang.curry(this, formatPattern, dateObject); 217 if(options.selector == "yearOnly"){ 218 // Special case as this is not yet driven by CLDR data 219 var year = dateObject.getFullYear(); 220 if(locale.match(/^zh|^ja/)){ 221 year += "\u5E74"; 222 } 223 return year; 224 } 218 225 if(options.selector != "timeOnly"){ 219 226 var datePattern = options.datePattern || info["dateFormat-"+formatLength]; … … 240 247 // formatting lengths may be chosen, with "full" used by default. 241 248 // Custom patterns may be used or registered with translations using 242 // the addCustom Bundlemethod.249 // the addCustomFormats method. 243 250 // Formatting patterns are implemented using the syntax described at 244 251 // http://www.unicode.org/reports/tr35/#Date_Format_Patterns … … 806 813 807 814 dojo.date.addCustomFormats("dojo.i18n.cldr","gregorian"); 808 dojo.date.addCustomFormats("dojo.i18n.cldr","gregorianExtras");809 815 810 816 dojo.date.getNames = function(/*String*/item, /*String*/type, /*String?*/use, /*String?*/locale){ -
trunk/src/widget/DatePicker.js
r7178 r7382 415 415 function f(n){ 416 416 that[n+"YearLabelNode"].innerHTML = 417 dojo.date.format(new Date(y++, 0), { formatLength:'yearOnly', locale:that.lang});417 dojo.date.format(new Date(y++, 0), {selector:'yearOnly', locale:that.lang}); 418 418 } 419 419 f("previous");