Changeset 12491

Show
Ignore:
Timestamp:
02/17/08 20:48:03 (11 months ago)
Author:
peller
Message:

Refs #5885

Location:
dojo/trunk/tests/date
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • dojo/trunk/tests/date/locale.js

    r11901 r12491  
    1414                                var partLocaleList = ["en-us", "fr-fr", "es", "de-at", "ja-jp", "zh-cn"]; 
    1515 
    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                                }); 
    1919                        }, 
    2020                        runTest: function(t){ 
     
    100100        t.f( Boolean(dojo.date.locale.parse("Aug. 11, 2006", {formatLength:'medium', selector:'date', locale:'en', strict:true}))); 
    101101        // 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})); 
    103103        //en: 'long' fmt: MMMM d, yyyy 
    104104        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  
    4040        t.is("2005-06",rfc.substring(0,7)); 
    4141 
     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 
    4254        date = dojo.date.stamp.fromISOString("T18:46:39"); 
    4355        t.is(18, date.getHours());