Changeset 12491
- Timestamp:
- 02/17/08 20:48:03 (11 months ago)
- Location:
- dojo/trunk/tests/date
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
dojo/trunk/tests/date/locale.js
r11901 r12491 14 14 var partLocaleList = ["en-us", "fr-fr", "es", "de-at", "ja-jp", "zh-cn"]; 15 15 16 for(var i = 0 ; i < partLocaleList.length; i ++){17 dojo.requireLocalization("dojo.cldr", "gregorian",partLocaleList[i]);18 } 16 dojo.forEach(partLocaleList, function(locale){ 17 dojo.requireLocalization("dojo.cldr", "gregorian", locale); 18 }); 19 19 }, 20 20 runTest: function(t){ … … 100 100 t.f( Boolean(dojo.date.locale.parse("Aug. 11, 2006", {formatLength:'medium', selector:'date', locale:'en', strict:true}))); 101 101 // Note: 06 for year part will be translated literally as the year 6 C.E. 102 t.is( aug_11_06CE, dojo.date.locale.parse("Aug 11, 06", { formatLength:'medium', selector:'date', locale:'en'}));102 t.is( aug_11_06CE, dojo.date.locale.parse("Aug 11, 06", {selector:'date', datePattern:'MMM dd, yyyy', strict:true})); 103 103 //en: 'long' fmt: MMMM d, yyyy 104 104 t.is( aug_11_2006, dojo.date.locale.parse("August 11, 2006", {formatLength:'long', selector:'date', locale:'en'})); -
dojo/trunk/tests/date/stamp.js
r12050 r12491 40 40 t.is("2005-06",rfc.substring(0,7)); 41 41 42 date = new Date(101,0,2); 43 date.setFullYear(101); 44 rfc = dojo.date.stamp.toISOString(date); 45 //truncate for comparison 46 t.is("0101-01",rfc.substring(0,7)); 47 48 rfc = "0101-01-01"; 49 date = dojo.date.stamp.fromISOString(rfc); 50 t.is(101,date.getFullYear()); 51 t.is(0,date.getMonth()); 52 t.is(1,date.getDate()); 53 42 54 date = dojo.date.stamp.fromISOString("T18:46:39"); 43 55 t.is(18, date.getHours());