Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
r191 - in trunk: . build src src/globalization test/sugarpak
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
codesite-nore...@google.com  
View profile  
 More options May 13 2008, 8:50 pm
From: codesite-nore...@google.com
Date: Tue, 13 May 2008 17:50:51 -0700
Local: Tues, May 13 2008 8:50 pm
Subject: [datejs commit] r191 - in trunk: . build src src/globalization test/sugarpak
Author: ge...@coolite.com
Date: Tue May 13 17:38:30 2008
New Revision: 191

Modified:
   trunk/CHANGELOG.txt
   trunk/build/core.js
   trunk/build/date-af-ZA.js
   trunk/build/date-ar-AE.js
   trunk/build/date-ar-BH.js
   trunk/build/date-ar-DZ.js
   trunk/build/date-ar-EG.js
   trunk/build/date-ar-IQ.js
   trunk/build/date-ar-JO.js
   trunk/build/date-ar-KW.js
   trunk/build/date-ar-LB.js
   trunk/build/date-ar-LY.js
   trunk/build/date-ar-MA.js
   trunk/build/date-ar-OM.js
   trunk/build/date-ar-QA.js
   trunk/build/date-ar-SA.js
   trunk/build/date-ar-SY.js
   trunk/build/date-ar-TN.js
   trunk/build/date-ar-YE.js
   trunk/build/date-az-Cyrl-AZ.js
   trunk/build/date-az-Latn-AZ.js
   trunk/build/date-be-BY.js
   trunk/build/date-bg-BG.js
   trunk/build/date-bs-Latn-BA.js
   trunk/build/date-ca-ES.js
   trunk/build/date-cs-CZ.js
   trunk/build/date-cy-GB.js
   trunk/build/date-da-DK.js
   trunk/build/date-de-AT.js
   trunk/build/date-de-CH.js
   trunk/build/date-de-DE.js
   trunk/build/date-de-LI.js
   trunk/build/date-de-LU.js
   trunk/build/date-dv-MV.js
   trunk/build/date-el-GR.js
   trunk/build/date-en-029.js
   trunk/build/date-en-AU.js
   trunk/build/date-en-BZ.js
   trunk/build/date-en-CA.js
   trunk/build/date-en-GB.js
   trunk/build/date-en-IE.js
   trunk/build/date-en-JM.js
   trunk/build/date-en-NZ.js
   trunk/build/date-en-PH.js
   trunk/build/date-en-TT.js
   trunk/build/date-en-US.js
   trunk/build/date-en-ZA.js
   trunk/build/date-en-ZW.js
   trunk/build/date-es-AR.js
   trunk/build/date-es-BO.js
   trunk/build/date-es-CL.js
   trunk/build/date-es-CO.js
   trunk/build/date-es-CR.js
   trunk/build/date-es-DO.js
   trunk/build/date-es-EC.js
   trunk/build/date-es-ES.js
   trunk/build/date-es-GT.js
   trunk/build/date-es-HN.js
   trunk/build/date-es-MX.js
   trunk/build/date-es-NI.js
   trunk/build/date-es-PA.js
   trunk/build/date-es-PE.js
   trunk/build/date-es-PR.js
   trunk/build/date-es-PY.js
   trunk/build/date-es-SV.js
   trunk/build/date-es-UY.js
   trunk/build/date-es-VE.js
   trunk/build/date-et-EE.js
   trunk/build/date-eu-ES.js
   trunk/build/date-fa-IR.js
   trunk/build/date-fi-FI.js
   trunk/build/date-fo-FO.js
   trunk/build/date-fr-BE.js
   trunk/build/date-fr-CA.js
   trunk/build/date-fr-CH.js
   trunk/build/date-fr-FR.js
   trunk/build/date-fr-LU.js
   trunk/build/date-fr-MC.js
   trunk/build/date-gl-ES.js
   trunk/build/date-gu-IN.js
   trunk/build/date-he-IL.js
   trunk/build/date-hi-IN.js
   trunk/build/date-hr-BA.js
   trunk/build/date-hr-HR.js
   trunk/build/date-hu-HU.js
   trunk/build/date-hy-AM.js
   trunk/build/date-id-ID.js
   trunk/build/date-is-IS.js
   trunk/build/date-it-CH.js
   trunk/build/date-it-IT.js
   trunk/build/date-ja-JP.js
   trunk/build/date-ka-GE.js
   trunk/build/date-kk-KZ.js
   trunk/build/date-kn-IN.js
   trunk/build/date-ko-KR.js
   trunk/build/date-kok-IN.js
   trunk/build/date-ky-KG.js
   trunk/build/date-lt-LT.js
   trunk/build/date-lv-LV.js
   trunk/build/date-mi-NZ.js
   trunk/build/date-mk-MK.js
   trunk/build/date-mn-MN.js
   trunk/build/date-mr-IN.js
   trunk/build/date-ms-BN.js
   trunk/build/date-ms-MY.js
   trunk/build/date-mt-MT.js
   trunk/build/date-nb-NO.js
   trunk/build/date-nl-BE.js
   trunk/build/date-nl-NL.js
   trunk/build/date-nn-NO.js
   trunk/build/date-ns-ZA.js
   trunk/build/date-pa-IN.js
   trunk/build/date-pl-PL.js
   trunk/build/date-pt-BR.js
   trunk/build/date-pt-PT.js
   trunk/build/date-quz-BO.js
   trunk/build/date-quz-EC.js
   trunk/build/date-quz-PE.js
   trunk/build/date-ro-RO.js
   trunk/build/date-ru-RU.js
   trunk/build/date-sa-IN.js
   trunk/build/date-se-FI.js
   trunk/build/date-se-NO.js
   trunk/build/date-se-SE.js
   trunk/build/date-sk-SK.js
   trunk/build/date-sl-SI.js
   trunk/build/date-sma-NO.js
   trunk/build/date-sma-SE.js
   trunk/build/date-smj-NO.js
   trunk/build/date-smj-SE.js
   trunk/build/date-smn-FI.js
   trunk/build/date-sms-FI.js
   trunk/build/date-sq-AL.js
   trunk/build/date-sr-Cyrl-BA.js
   trunk/build/date-sr-Cyrl-CS.js
   trunk/build/date-sr-Latn-BA.js
   trunk/build/date-sr-Latn-CS.js
   trunk/build/date-sv-FI.js
   trunk/build/date-sv-SE.js
   trunk/build/date-sw-KE.js
   trunk/build/date-syr-SY.js
   trunk/build/date-ta-IN.js
   trunk/build/date-te-IN.js
   trunk/build/date-th-TH.js
   trunk/build/date-tn-ZA.js
   trunk/build/date-tr-TR.js
   trunk/build/date-tt-RU.js
   trunk/build/date-uk-UA.js
   trunk/build/date-ur-PK.js
   trunk/build/date-uz-Cyrl-UZ.js
   trunk/build/date-uz-Latn-UZ.js
   trunk/build/date-vi-VN.js
   trunk/build/date-xh-ZA.js
   trunk/build/date-zh-CN.js
   trunk/build/date-zh-HK.js
   trunk/build/date-zh-MO.js
   trunk/build/date-zh-SG.js
   trunk/build/date-zh-TW.js
   trunk/build/date-zu-ZA.js
   trunk/build/date.js
   trunk/build/extras.js
   trunk/build/parser.js
   trunk/build/sugarpak.js
   trunk/build/time.js
   trunk/src/core.js
   trunk/src/globalization/af-ZA.js
   trunk/src/globalization/ar-AE.js
   trunk/src/globalization/ar-BH.js
   trunk/src/globalization/ar-DZ.js
   trunk/src/globalization/ar-EG.js
   trunk/src/globalization/ar-IQ.js
   trunk/src/globalization/ar-JO.js
   trunk/src/globalization/ar-KW.js
   trunk/src/globalization/ar-LB.js
   trunk/src/globalization/ar-LY.js
   trunk/src/globalization/ar-MA.js
   trunk/src/globalization/ar-OM.js
   trunk/src/globalization/ar-QA.js
   trunk/src/globalization/ar-SA.js
   trunk/src/globalization/ar-SY.js
   trunk/src/globalization/ar-TN.js
   trunk/src/globalization/ar-YE.js
   trunk/src/globalization/az-Cyrl-AZ.js
   trunk/src/globalization/az-Latn-AZ.js
   trunk/src/globalization/be-BY.js
   trunk/src/globalization/bg-BG.js
   trunk/src/globalization/bs-Latn-BA.js
   trunk/src/globalization/ca-ES.js
   trunk/src/globalization/cs-CZ.js
   trunk/src/globalization/cy-GB.js
   trunk/src/globalization/da-DK.js
   trunk/src/globalization/de-AT.js
   trunk/src/globalization/de-CH.js
   trunk/src/globalization/de-DE.js
   trunk/src/globalization/de-LI.js
   trunk/src/globalization/de-LU.js
   trunk/src/globalization/dv-MV.js
   trunk/src/globalization/el-GR.js
   trunk/src/globalization/en-029.js
   trunk/src/globalization/en-AU.js
   trunk/src/globalization/en-BZ.js
   trunk/src/globalization/en-CA.js
   trunk/src/globalization/en-GB.js
   trunk/src/globalization/en-IE.js
   trunk/src/globalization/en-JM.js
   trunk/src/globalization/en-NZ.js
   trunk/src/globalization/en-PH.js
   trunk/src/globalization/en-TT.js
   trunk/src/globalization/en-US.js
   trunk/src/globalization/en-ZA.js
   trunk/src/globalization/en-ZW.js
   trunk/src/globalization/es-AR.js
   trunk/src/globalization/es-BO.js
   trunk/src/globalization/es-CL.js
   trunk/src/globalization/es-CO.js
   trunk/src/globalization/es-CR.js
   trunk/src/globalization/es-DO.js
   trunk/src/globalization/es-EC.js
   trunk/src/globalization/es-ES.js
   trunk/src/globalization/es-GT.js
   trunk/src/globalization/es-HN.js
   trunk/src/globalization/es-MX.js
   trunk/src/globalization/es-NI.js
   trunk/src/globalization/es-PA.js
   trunk/src/globalization/es-PE.js
   trunk/src/globalization/es-PR.js
   trunk/src/globalization/es-PY.js
   trunk/src/globalization/es-SV.js
   trunk/src/globalization/es-UY.js
   trunk/src/globalization/es-VE.js
   trunk/src/globalization/et-EE.js
   trunk/src/globalization/eu-ES.js
   trunk/src/globalization/fa-IR.js
   trunk/src/globalization/fi-FI.js
   trunk/src/globalization/fo-FO.js
   trunk/src/globalization/fr-BE.js
   trunk/src/globalization/fr-CA.js
   trunk/src/globalization/fr-CH.js
   trunk/src/globalization/fr-FR.js
   trunk/src/globalization/fr-LU.js
   trunk/src/globalization/fr-MC.js
   trunk/src/globalization/gl-ES.js
   trunk/src/globalization/gu-IN.js
   trunk/src/globalization/he-IL.js
   trunk/src/globalization/hi-IN.js
   trunk/src/globalization/hr-BA.js
   trunk/src/globalization/hr-HR.js
   trunk/src/globalization/hu-HU.js
   trunk/src/globalization/hy-AM.js
   trunk/src/globalization/id-ID.js
   trunk/src/globalization/is-IS.js
   trunk/src/globalization/it-CH.js
   trunk/src/globalization/it-IT.js
   trunk/src/globalization/ja-JP.js
   trunk/src/globalization/ka-GE.js
   trunk/src/globalization/kk-KZ.js
   trunk/src/globalization/kn-IN.js
   trunk/src/globalization/ko-KR.js
   trunk/src/globalization/kok-IN.js
   trunk/src/globalization/ky-KG.js
   trunk/src/globalization/lt-LT.js
   trunk/src/globalization/lv-LV.js
   trunk/src/globalization/mi-NZ.js
   trunk/src/globalization/mk-MK.js
   trunk/src/globalization/mn-MN.js
   trunk/src/globalization/mr-IN.js
   trunk/src/globalization/ms-BN.js
   trunk/src/globalization/ms-MY.js
   trunk/src/globalization/mt-MT.js
   trunk/src/globalization/nb-NO.js
   trunk/src/globalization/nl-BE.js
   trunk/src/globalization/nl-NL.js
   trunk/src/globalization/nn-NO.js
   trunk/src/globalization/ns-ZA.js
   trunk/src/globalization/pa-IN.js
   trunk/src/globalization/pl-PL.js
   trunk/src/globalization/pt-BR.js
   trunk/src/globalization/pt-PT.js
   trunk/src/globalization/quz-BO.js
   trunk/src/globalization/quz-EC.js
   trunk/src/globalization/quz-PE.js
   trunk/src/globalization/ro-RO.js
   trunk/src/globalization/ru-RU.js
   trunk/src/globalization/sa-IN.js
   trunk/src/globalization/se-FI.js
   trunk/src/globalization/se-NO.js
   trunk/src/globalization/se-SE.js
   trunk/src/globalization/sk-SK.js
   trunk/src/globalization/sl-SI.js
   trunk/src/globalization/sma-NO.js
   trunk/src/globalization/sma-SE.js
   trunk/src/globalization/smj-NO.js
   trunk/src/globalization/smj-SE.js
   trunk/src/globalization/smn-FI.js
   trunk/src/globalization/sms-FI.js
   trunk/src/globalization/sq-AL.js
   trunk/src/globalization/sr-Cyrl-BA.js
   trunk/src/globalization/sr-Cyrl-CS.js
   trunk/src/globalization/sr-Latn-BA.js
   trunk/src/globalization/sr-Latn-CS.js
   trunk/src/globalization/sv-FI.js
   trunk/src/globalization/sv-SE.js
   trunk/src/globalization/sw-KE.js
   trunk/src/globalization/syr-SY.js
   trunk/src/globalization/ta-IN.js
   trunk/src/globalization/te-IN.js
   trunk/src/globalization/th-TH.js
   trunk/src/globalization/tn-ZA.js
   trunk/src/globalization/tr-TR.js
   trunk/src/globalization/tt-RU.js
   trunk/src/globalization/uk-UA.js
   trunk/src/globalization/ur-PK.js
   trunk/src/globalization/uz-Cyrl-UZ.js
   trunk/src/globalization/uz-Latn-UZ.js
   trunk/src/globalization/vi-VN.js
   trunk/src/globalization/xh-ZA.js
   trunk/src/globalization/zh-CN.js
   trunk/src/globalization/zh-HK.js
   trunk/src/globalization/zh-MO.js
   trunk/src/globalization/zh-SG.js
   trunk/src/globalization/zh-TW.js
   trunk/src/globalization/zu-ZA.js
   trunk/src/sugarpak.js
   trunk/test/sugarpak/index.js

Log:
--------------------

2008-05-12 [geoffrey.mcgill]
Revision #191

1.  Added .same() function to sugarpak.js. The new .same() function will compare two date objects to
        determine if they occur on/in exactly the same instance of the given date part.

        The function .same() must be followed by a date part function (example: .day(), .month(), .year(), etc).

        An optional Date can be passed in the date part function. If now date is passed as a parameter, 'Now' is used.

        Scenario: Determine if two dates fall on the exact same day.

    Example

    var d1 = Date.today(); // today at 00:00
    var d2 = new Date();   // exactly now.

    // Do they occur on the same day?
    d1.same().day(d2); // true

     // Do they occur on the same hour?
    d1.same().hour(d2); // false, unless d2 hour is '00' (midnight).

    // What if it's the same day, but one year apart?
    var nextYear = Date.today().add(1).year();

    d1.same().day(nextYear); // false, because the dates must occur on the exact same day.

    Scenario: Determine if a given date occurs during some week period 2 months from now.

    Example

    var future = Date.today().add(2).months();
    return someDate.same().week(future); // true|false;

2.  Added Date.prototype.toObject() function to sugarpak.js. The .toObject will return an object literal of all the date parts.

        Example

        var o = new Date().toObject();

        // { year: 2008, month: 4, week: 20, day: 13, hour: 18, minute: 9, second: 32, millisecond: 812 }

        The object properties can be referenced directly from the object.

        alert(o.day);  // alerts "13"
        alert(o.year); // alerts "2008"

3.  Added Date.fromObject(config) to sugarpak.js. The .fromObject will return a new Date based on the config properties.

        Example

        var o = someDate.toObject();
        return Date.fromObject(o); // will return the same date as "someDate"

    var o2 = {month: 1, day: 20, hour: 18}; // birthday party!
    Date.fromObject(o2);

--------------------

Modified: trunk/CHANGELOG.txt
=========================================================================== ===
--- trunk/CHANGELOG.txt (original)
+++ trunk/CHANGELOG.txt Tue May 13 17:38:30 2008
@@ -1,5 +1,67 @@
 CHANGE LOG
 --------------------
+
+2008-05-12 [geoffrey.mcgill]
+Revision #191
+
+1.  Added .same() function to sugarpak.js. The new .same() function will compare two date objects to
+       determine if they occur on/in exactly the same instance of the given date part.
+      
+       The function .same() must be followed by a date part function (example: .day(), .month(), .year(), etc).
+      
+       An optional Date can be passed in the date part function. If now date is passed as a parameter, 'Now' is used.
+      
+       Scenario: Determine if two dates fall on the exact same day.
+    
+    Example
+    
+    var d1 = Date.today(); // today at 00:00
+    var d2 = new Date();   // exactly now.
+
+    // Do they occur on the same day?
+    d1.same().day(d2); // true
+    
+     // Do they occur on the same hour?
+    d1.same().hour(d2); // false, unless d2 hour is '00' (midnight).
+    
+    // What if it's the same day, but one year apart?
+    var nextYear = Date.today().add(1).year();
+
+    d1.same().day(nextYear); // false, because the dates must occur on the exact same day.
+    
+    
+    Scenario: Determine if a given date occurs during some week period 2 months from now.
+    
+    Example
+    
+    var future = Date.today().add(2).months();
+    return someDate.same().week(future); // true|false;
+    
+2.  Added Date.prototype.toObject() function to sugarpak.js. The .toObject will return an object literal of all the date parts.
+      
+       Example
+      
+       var o = new Date().toObject();
+      
+       // { year: 2008, month: 4, week: 20, day: 13, hour: 18, minute: 9, second: 32, millisecond: 812 }
+      
+       The object properties can be referenced directly from the object.
+      
+       alert(o.day);  // alerts "13"
+       alert(o.year); // alerts "2008"
+
+3.  Added Date.fromObject(config) to sugarpak.js. The .fromObject will return a new Date based on the config properties.
+
+       Example
+      
+       var o = someDate.toObject();
+       return Date.fromObject(o); // will return the same date as "someDate"
+
+    var o2 = {month: 1, day: 20, hour: 18}; // birthday party!
+    Date.fromObject(o2);
+    
+--------------------
+
 2008-05-12 [geoffrey.mcgill]
 Revision #190

@@ -14,20 +76,22 @@
     Date.today().add(-1).day().is().today(); // false

 --------------------
+
 2008-05-07 [geoffrey.mcgill]
-Revision #182
+Revision #189

 1.  Fixed bug in TimePeriod. See http://code.google.com/p/datejs/issues/detail?id=39

        Example

-       var start = new Date();
-       var end = Date.today().add(15).days();
-       var ts = new TimePeriod(start, end);
+var start = new Date();
+var end = Date.today().add(15).days();
+var ts = new TimePeriod(start, end);

-       ts.getDays(); // 14
+ts.getDays(); // 14

 --------------------
+
 2008-04-25 [geoffrey.mcgill]
 Revision #182

Modified: trunk/build/core.js
=========================================================================== ===
--- trunk/build/core.js (original)
+++ trunk/build/core.js Tue May 13 17:38:30 2008
@@ -1,7 +1,7 @@
 /**
- * @version: 1.0 Beta-1
+ * @version: 1.0 Alpha-1
  * @author: Coolite Inc. http://www.coolite.com/
- * @date: 2008-05-12
+ * @date: 2008-05-13
  * @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
  * @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
  * @website: http://www.datejs.com/
@@ -11,7 +11,7 @@
 return-1;};$D.getMonthNumberFromName=function(name){var n=$C.monthNames,m=$C.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
 return-1;};$D.isLeapYear=function(year){return((year%4===0&&year%100!==0)|| year%400===0);};$D.getDaysInMonth=function(year,month){return[31,($D.isLeap Year(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};$D.getTimezoneAbb reviation=function(offset){var z=$C.timezones,p;for(var i=0;i<z.length;i++){if(z[i].offset===offset){return z[i].name;}}
 return null;};$D.getTimezoneOffset=function(name){var z=$C.timezones,p;for(var i=0;i<z.length;i++){if(z[i].name===name.toUpperCase()){return z[i].offset;}}
-return null;};$P.clone=function(){return new Date(this.getTime());};$P.compareTo=function(date){return Date.compare(this,date);};$P.equals=function(date){return Date.equals(this,date||new Date());};$P.between=function(start,end){return this.getTime()>=start.getTime()&&this.getTime()<=end.getTime();};$P.isAfter =function(date){return this.compareTo(date||new Date())===1;};$P.isBefore=function(date){return(this.compareTo(date||new Date())===-1);};$P.addMilliseconds=function(value){this.setMilliseconds(thi s.getMilliseconds()+value);return this;};$P.addSeconds=function(value){return this.addMilliseconds(value*1000);};$P.addMinutes=function(value){return this.addMilliseconds(value*60000);};$P.addHours=function(value){return this.addMilliseconds(value*3600000);};$P.addDays=function(value){this.setDa te(this.getDate()+value);return this;};$P.addWeeks=function(value){return this.addDays(value*7);};$P.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this. setDate(Math.min(n,$D.getDaysInMonth(this.getFullYear(),this.getMonth()))); return this;};$P.addYears=function(value){return this.addMonths(value*12);};$P.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
+return null;};$P.clone=function(){return new Date(this.getTime());};$P.compareTo=function(date){return Date.compare(this,date);};$P.equals=function(date){return Date.equals(this,date||new Date());};$P.between=function(start,end){return this.getTime()>=start.getTime()&&this.getTime()<=end.getTime();};$P.isAfter =function(date){return this.compareTo(date||new Date())===1;};$P.isBefore=function(date){return(this.compareTo(date||new Date())===-1);};$P.isToday=function(){return this.isSameDay(new Date());};$P.isSameDay=function(date){return this.clone().clearTime().equals(date.clone().clearTime());};$P.addMilliseco nds=function(value){this.setMilliseconds(this.getMilliseconds()+value);retu rn this;};$P.addSeconds=function(value){return this.addMilliseconds(value*1000);};$P.addMinutes=function(value){return this.addMilliseconds(value*60000);};$P.addHours=function(value){return this.addMilliseconds(value*3600000);};$P.addDays=function(value){this.setDa te(this.getDate()+value);return this;};$P.addWeeks=function(value){return this.addDays(value*7);};$P.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this. setDate(Math.min(n,$D.getDaysInMonth(this.getFullYear(),this.getMonth()))); return this;};$P.addYears=function(value){return this.addMonths(value*12);};$P.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
 var x=config;if(x.milliseconds){this.addMilliseconds(x.milliseconds);}
 if(x.seconds){this.addSeconds(x.seconds);}
 if(x.minutes){this.addMinutes(x.minutes);}
@@ -32,7 +32,7 @@
 if($D.validateDay(config.day,this.getFullYear(),this.getMonth())){this.addD ays(config.day-this.getDate());}
 if(config.timezone){this.setTimezone(config.timezone);}
 if(config.timezoneOffset){this.setTimezoneOffset(config.timezoneOffset);}
-if($D._validate(config.week,0,53,"week")){this.setWeek(config.week);}
+if(config.week&&$D._validate(config.week,0,53,"week")){this.setWeek(config .week);}
 return this;};$P.moveToFirstDayOfMonth=function(){return this.set({day:1});};$P.moveToLastDayOfMonth=function(){return this.set({day:$D.getDaysInMonth(this.getFullYear(),this.getMonth())});};$P. moveToNthOccurrence=function(dayOfWeek,occurrence){var shift=0;if(occurrence>0){shift=occurrence-1;}
 else if(occurrence===-1){this.moveToLastDayOfMonth();if(this.getDay()!==dayOfWee k){this.moveToDayOfWeek(dayOfWeek,-1);}
 return this;}

Modified: trunk/build/date-af-ZA.js
=========================================================================== ===
--- trunk/build/date-af-ZA.js   (original)
+++ trunk/build/date-af-ZA.js   Tue May 13 17:38:30 2008
@@ -1,18 +1,18 @@
 /**
- * @version: 1.0 Beta-1
+ * @version: 1.0 Alpha-1
  * @author: Coolite Inc. http://www.coolite.com/
- * @date: 2008-05-12
+ * @date: 2008-05-13
  * @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
  * @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
  * @website: http://www.datejs.com/
  */
-Date.CultureInfo={name:"af-ZA",englishName:"Afrikaans (South Africa)",nativeName:"Afrikaans (Suid Afrika)",dayNames:["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vry dag","Saterdag"],abbreviatedDayNames:["Son","Maan","Dins","Woen","Dond","Vr y","Sat"],shortestDayNames:["So","Ma","Di","Wo","Do","Vr","Sa"],firstLetter DayNames:["S","M","D","W","D","V","S"],monthNames:["Januarie","Februarie"," Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","Nove mber","Desember"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","Mei","Jun ","Jul","Aug","Sep","Okt","Nov","Des"],amDesignator:"",pmDesignator:"nm",fi rstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{ shortDate:"yyyy/MM/dd",longDate:"dd MMMM yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy- MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uarie)?/i,feb:/^feb(ruarie)?/i,mar:/^maart/ i,apr:/^apr(il)?/i,may:/^mei/i,jun:/^jun(ie)?/i,jul:/^jul(ie)?/i,aug:/^aug( ustus)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,de c:/^des(ember)?/i,sun:/^so(n(dag)?)?/i,mon:/^ma(an(dag)?)?/i,tue:/^di(ns(da g)?)?/i,wed:/^wo(en(sdag)?)?/i,thu:/^do(nd(erdag)?)?/i,fri:/^vr(y(dag)?)?/i ,sat:/^sa(t(erdag)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add: /^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^ye s(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i, millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min( ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^ d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m ?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*( \+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeConte xt:/^\s*(\:|a(?!u|p)|p)/i},timezones:{UTC:"-000",GMT:"-000",EST:"-0500",EDT :"-0400",CST:"-0600",CDT:"-0500",MST:"-0700",MDT:"-0600",PST:"-0800",PDT:"- 0700"}};
+Date.CultureInfo={name:"af-ZA",englishName:"Afrikaans (South Africa)",nativeName:"Afrikaans (Suid Afrika)",dayNames:["Sondag","Maandag","Dinsdag","Woensdag","Donderdag","Vry dag","Saterdag"],abbreviatedDayNames:["Son","Maan","Dins","Woen","Dond","Vr y","Sat"],shortestDayNames:["So","Ma","Di","Wo","Do","Vr","Sa"],firstLetter DayNames:["S","M","D","W","D","V","S"],monthNames:["Januarie","Februarie"," Maart","April","Mei","Junie","Julie","Augustus","September","Oktober","Nove mber","Desember"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","Mei","Jun ","Jul","Aug","Sep","Okt","Nov","Des"],amDesignator:"",pmDesignator:"nm",fi rstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"ymd",formatPatterns:{ shortDate:"yyyy/MM/dd",longDate:"dd MMMM yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy- MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM yyyy"},regexPatterns:{jan:/^jan(uarie)?/i,feb:/^feb(ruarie)?/i,mar:/^maart/ i,apr:/^apr(il)?/i,may:/^mei/i,jun:/^jun(ie)?/i,jul:/^jul(ie)?/i,aug:/^aug( ustus)?/i,sep:/^sep(t(ember)?)?/i,oct:/^okt(ober)?/i,nov:/^nov(ember)?/i,de c:/^des(ember)?/i,sun:/^so(n(dag)?)?/i,mon:/^ma(an(dag)?)?/i,tue:/^di(ns(da g)?)?/i,wed:/^wo(en(sdag)?)?/i,thu:/^do(nd(erdag)?)?/i,fri:/^vr(y(dag)?)?/i ,sat:/^sa(t(erdag)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add: /^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^ye s(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i, millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min( ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^ d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m ?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*( \+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeConte xt:/^\s*(\:|a(?!u|p)|p)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT ",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{n ame:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"- 0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT", offset:"-0700"}]};
 (function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,p=function(s,l){if(!l){l=2;}
 return("000"+s).slice(l*-1);};$P.clearTime=function(){this.setHours(0);this .setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};$P.setTimeToNow=function(){var n=new Date();this.setHours(n.getHours());this.setMinutes(n.getMinutes());this.set Seconds(n.getSeconds());this.setMilliseconds(n.getMilliseconds());return this;};$D.today=function(){return new Date().clearTime();};$D.compare=function(date1,date2){if(isNaN(date1)||isNa N(date2)){throw new Error(date1+" - "+date2);}else if(date1 instanceof Date&&date2 instanceof Date){return(date1<date2)?-1:(date1>date2)?1:0;}else{throw new TypeError(date1+" - "+date2);}};$D.equals=function(date1,date2){return(date1.compareTo(date2)== =0);};$D.getDayNumberFromName=function(name){var n=$C.dayNames,m=$C.abbreviatedDayNames,o=$C.shortestDayNames,s=name.toLower Case();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s||o[i].t oLowerCase()==s){return i;}}
 return-1;};$D.getMonthNumberFromName=function(name){var n=$C.monthNames,m=$C.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
 return-1;};$D.isLeapYear=function(year){return((year%4===0&&year%100!==0)|| year%400===0);};$D.getDaysInMonth=function(year,month){return[31,($D.isLeap Year(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};$D.getTimezoneAbb reviation=function(offset){var z=$C.timezones,p;for(var i=0;i<z.length;i++){if(z[i].offset===offset){return z[i].name;}}
 return null;};$D.getTimezoneOffset=function(name){var z=$C.timezones,p;for(var i=0;i<z.length;i++){if(z[i].name===name.toUpperCase()){return z[i].offset;}}
-return null;};$P.clone=function(){return new Date(this.getTime());};$P.compareTo=function(date){return Date.compare(this,date);};$P.equals=function(date){return Date.equals(this,date||new Date());};$P.between=function(start,end){return this.getTime()>=start.getTime()&&this.getTime()<=end.getTime();};$P.isAfter =function(date){return this.compareTo(date||new Date())===1;};$P.isBefore=function(date){return(this.compareTo(date||new Date())===-1);};$P.addMilliseconds=function(value){this.setMilliseconds(thi s.getMilliseconds()+value);return this;};$P.addSeconds=function(value){return this.addMilliseconds(value*1000);};$P.addMinutes=function(value){return this.addMilliseconds(value*60000);};$P.addHours=function(value){return this.addMilliseconds(value*3600000);};$P.addDays=function(value){this.setDa te(this.getDate()+value);return this;};$P.addWeeks=function(value){return this.addDays(value*7);};$P.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this. setDate(Math.min(n,$D.getDaysInMonth(this.getFullYear(),this.getMonth()))); return this;};$P.addYears=function(value){return this.addMonths(value*12);};$P.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
+return null;};$P.clone=function(){return new Date(this.getTime());};$P.compareTo=function(date){return Date.compare(this,date);};$P.equals=function(date){return Date.equals(this,date||new Date());};$P.between=function(start,end){return this.getTime()>=start.getTime()&&this.getTime()<=end.getTime();};$P.isAfter =function(date){return this.compareTo(date||new Date())===1;};$P.isBefore=function(date){return(this.compareTo(date||new Date())===-1);};$P.isToday=function(){return this.isSameDay(new Date());};$P.isSameDay=function(date){return this.clone().clearTime().equals(date.clone().clearTime());};$P.addMilliseco nds=function(value){this.setMilliseconds(this.getMilliseconds()+value);retu rn this;};$P.addSeconds=function(value){return this.addMilliseconds(value*1000);};$P.addMinutes=function(value){return this.addMilliseconds(value*60000);};$P.addHours=function(value){return this.addMilliseconds(value*3600000);};$P.addDays=function(value){this.setDa te(this.getDate()+value);return this;};$P.addWeeks=function(value){return this.addDays(value*7);};$P.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this. setDate(Math.min(n,$D.getDaysInMonth(this.getFullYear(),this.getMonth()))); return this;};$P.addYears=function(value){return this.addMonths(value*12);};$P.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
 var x=config;if(x.milliseconds){this.addMilliseconds(x.milliseconds);}
 if(x.seconds){this.addSeconds(x.seconds);}
 if(x.minutes){this.addMinutes(x.minutes);}
@@ -33,7 +33,7 @@
 if($D.validateDay(config.day,this.getFullYear(),this.getMonth())){this.addD ays(config.day-this.getDate());}
 if(config.timezone){this.setTimezone(config.timezone);}
 if(config.timezoneOffset){this.setTimezoneOffset(config.timezoneOffset);}
-if($D._validate(config.week,0,53,"week")){this.setWeek(config.week);}
+if(config.week&&$D._validate(config.week,0,53,"week")){this.setWeek(config .week);}
 return this;};$P.moveToFirstDayOfMonth=function(){return this.set({day:1});};$P.moveToLastDayOfMonth=function(){return this.set({day:$D.getDaysInMonth(this.getFullYear(),this.getMonth())});};$P. moveToNthOccurrence=function(dayOfWeek,occurrence){var shift=0;if(occurrence>0){shift=occurrence-1;}
 else if(occurrence===-1){this.moveToLastDayOfMonth();if(this.getDay()!==dayOfWee k){this.moveToDayOfWeek(dayOfWeek,-1);}
 return this;}
@@ -47,9 +47,9 @@
 $P._toString=$P.toString;$P.toString=function(format){var x=this;if(format&&format.length==1){var c=$C.formatPatterns;x.t=x.toString;switch(format){case"d":return x.t(c.shortDate);case"D":return x.t(c.longDate);case"F":return x.t(c.fullDateTime);case"m":return x.t(c.monthDay);case"r":return x.t(c.rfc1123);case"s":return x.t(c.sortableDateTime);case"t":return x.t(c.shortTime);case"T":return x.t(c.longTime);case"u":return x.t(c.universalSortableDateTime);case"y":return x.t(c.yearMonth);}}
 var ord=function(n){switch(n*1){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};return format?format.replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S) /g,function(m){if(m.charAt(0)==="\\"){return m.replace("\\","");}
 x.h=x.getHours;switch(m){case"hh":return p(x.h()<13?(x.h()===0?12:x.h()):(x.h()-12));case"h":return x.h()<13?(x.h()===0?12:x.h()):(x.h()-12);case"HH":return p(x.h());case"H":return x.h();case"mm":return p(x.getMinutes());case"m":return x.getMinutes();case"ss":return p(x.getSeconds());case"s":return x.getSeconds();case"yyyy":return p(x.getFullYear(),4);case"yy":return p(x.getFullYear());case"dddd":return $C.dayNames[x.getDay()];case"ddd":return $C.abbreviatedDayNames[x.getDay()];case"dd":return p(x.getDate());case"d":return x.getDate();case"MMMM":return $C.monthNames[x.getMonth()];case"MMM":return $C.abbreviatedMonthNames[x.getMonth()];case"MM":return p((x.getMonth()+1));case"M":return x.getMonth()+1;case"t":return x.h()<12?$C.amDesignator.substring(0,1):$C.pmDesignator.substring(0,1);case "tt":return x.h()<12?$C.amDesignator:$C.pmDesignator;case"S":return ord(x.getDate());default:return m;}}):this._toString();};}());
-(function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,$N=Number.prototype,_isSecond=fal se;$P._orient=+1;$P._nth=null;$P._is=false;$N._dateElement="day";$P.next=fu nction(){this._orient=+1;return this;};$D.next=function(){return $D.today().next();};$P.last=$P.prev=$P.previous=function(){this._orient=-1; return this;};$D.last=$D.prev=$D.previous=function(){return $D.today().last();};$P.is=function(){this._is=true;return this;};$P.today=function(){if(this._is){this._is=false;return Date.today().equals(this.clone().clearTime());}
-return false;};$P.weekday=function(){if(this._is){this._is=false;return(!this.is() .sat()&&!this.is().sun());}
-return false;};$P.at=function(time){return(typeof time==="string")?$D.parse(this.toShortDateString()+" "+time):this.set(time);};$N.fromNow=$N.after=function(date){var c={};c[this._dateElement]=this;return((!date)?new Date():date.clone()).add(c);};$N.ago=$N.before=function(date){var c={};c[this._dateElement]=this*-1;return((!date)?new Date():date.clone()).add(c);};var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),nth=("final first second third fourth fifth").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
+(function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,$N=Number.prototype;$P._orient=+1 ;$P._nth=null;$P._is=false;$P._same=false;$P._isSecond=false;$N._dateElemen t="day";$P.next=function(){this._orient=+1;return this;};$D.next=function(){return $D.today().next();};$P.last=$P.prev=$P.previous=function(){this._orient=-1; return this;};$D.last=$D.prev=$D.previous=function(){return $D.today().last();};$P.is=function(){this._is=true;return this;};$P.same=function(){this._same=true;this._isSecond=false;return this;};$P.today=function(){return this.same().day();};$P.weekday=function(){if(this._is){this._is=false;retur n(!this.is().sat()&&!this.is().sun());}
+return false;};$P.at=function(time){return(typeof time==="string")?$D.parse(this.toString("d")+" "+time):this.set(time);};$N.fromNow=$N.after=function(date){var c={};c[this._dateElement]=this;return((!date)?new Date():date.clone()).add(c);};$N.ago=$N.before=function(date){var c={};c[this._dateElement]=this*-1;return((!date)?new Date():date.clone()).add(c);};var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),pxf=("Milliseconds Seconds Minutes Hours Date Week Month FullYear").split(/\s/),nth=("final first second third fourth fifth").split(/\s/),de;$P.toObject=function(){var o={};for(var i=0;i<px.length;i++){o[px[i].toLowerCase()]=this["get"+pxf[i]]();}
+return o;};$D.fromObject=function(config){config.week=null;return Date.today().set(config);};var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
 if(this._nth!==null){if(this._isSecond){this.addSeconds(this._orient*-1);}
 this._isSecond=false;var ntemp=this._nth;this._nth=null;var temp=this.clone().moveToLastDayOfMonth();this.moveToNthOccurrence(n,ntemp); if(this>temp){throw new RangeError($D.getDayName(n)+" does not occur "+ntemp+" times in the month of "+$D.getMonthName(temp.getMonth())+" "+temp.getFullYear()+".");}
 return this;}
@@ -58,9 +58,13 @@
 var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
 return this.moveToMonth(n,this._orient);};};var smf=function(n){return function(){return $D.today().set({month:n,day:1});};};for(var j=0;j<mx.length;j++){$D[mx[j].toUpperCase()]=$D[mx[j].toUpperCase().substri ng(0,3)]=j;$D[mx[j]]=$D[mx[j].substring(0,3)]=smf(j);$P[mx[j]]=$P[mx[j].sub string(0,3)]=mf(j);}
 var ef=function(j){return function(){if(this._isSecond){this._isSecond=false;return this;}
+if(this._same){this._same=this._is=false;var o1=this.toObject(),o2=(arguments[0]||new Date()).toObject(),v="",k=j.toLowerCase();for(var m=(px.length-1);m>-1;m--){v=px[m].toLowerCase();if(o1[v]!=o2[v]){return false;}
+if(k==v){break;}}
+return true;}
 if(j.substring(j.length-1)!="s"){j+="s";}
 return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$P[de]=$P[de+"s"]=ef(px[k]);$N[ de]=$N[de+"s"]=nf(de);}
-var nthfn=function(n){return function(dayOfWeek){if(dayOfWeek||dayOfWeek===0){return this.moveToNthOccurrence(dayOfWeek,n);}
+$P._ss=ef("Second");var nthfn=function(n){return function(dayOfWeek){if(this._same){return this._ss(arguments[0]);}
+if(dayOfWeek||dayOfWeek===0){return this.moveToNthOccurrence(dayOfWeek,n);}
 this._nth=n;if(n===2&&(dayOfWeek===undefined||dayOfWeek===null)){this._isSe cond=true;return this.addSeconds(this._orient);}
 return this;};};for(var l=0;l<nth.length;l++){$P[nth[l]]=(l===0)?nthfn(-1):nthfn(l);}}());
 (function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0] );s=rx[1];continue;}

Modified: trunk/build/date-ar-AE.js
=========================================================================== ===
--- trunk/build/date-ar-AE.js   (original)
+++ trunk/build/date-ar-AE.js   Tue May 13 17:38:30 2008
@@ -1,18 +1,18 @@
 /**
- * @version: 1.0 Beta-1
+ * @version: 1.0 Alpha-1
  * @author: Coolite Inc. http://www.coolite.com/
- * @date: 2008-05-12
+ * @date: 2008-05-13
  * @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
  * @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
  * @website: http://www.datejs.com/
  */
-Date.CultureInfo={name:"ar-AE",englishName:"Arabic (U.A.E.)",nativeName:"العربية (الإمارات العربية المتحدة)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمع ة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","ا لخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],fir stLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير" ,"مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر"," ديسمبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يون يو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",p mDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy ",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy- MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل /i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oc t:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue: /^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,f uture:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence )/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od (ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(se cond)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s ?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)? s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezon e:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|u tc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i },timezones:{UTC:"-000",GMT:"-000",EST:"-0500",EDT:"-0400",CST:"-0600",CDT: "-0500",MST:"-0700",MDT:"-0600",PST:"-0800",PDT:"-0700"}};
+Date.CultureInfo={name:"ar-AE",englishName:"Arabic (U.A.E.)",nativeName:"العربية (الإمارات العربية المتحدة)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمع ة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","ا لخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],fir stLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير" ,"مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر"," ديسمبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يون يو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",p mDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy ",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy- MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل /i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oc t:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue: /^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,f uture:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence )/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od (ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(se cond)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s ?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)? s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezon e:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|u tc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i },timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"E ST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"} ,{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset :"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
 (function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,p=function(s,l){if(!l){l=2;}
 return("000"+s).slice(l*-1);};$P.clearTime=function(){this.setHours(0);this .setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};$P.setTimeToNow=function(){var n=new Date();this.setHours(n.getHours());this.setMinutes(n.getMinutes());this.set Seconds(n.getSeconds());this.setMilliseconds(n.getMilliseconds());return this;};$D.today=function(){return new Date().clearTime();};$D.compare=function(date1,date2){if(isNaN(date1)||isNa N(date2)){throw new Error(date1+" - "+date2);}else if(date1 instanceof Date&&date2 instanceof Date){return(date1<date2)?-1:(date1>date2)?1:0;}else{throw new TypeError(date1+" - "+date2);}};$D.equals=function(date1,date2){return(date1.compareTo(date2)== =0);};$D.getDayNumberFromName=function(name){var n=$C.dayNames,m=$C.abbreviatedDayNames,o=$C.shortestDayNames,s=name.toLower Case();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s||o[i].t oLowerCase()==s){return i;}}
 return-1;};$D.getMonthNumberFromName=function(name){var n=$C.monthNames,m=$C.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
 return-1;};$D.isLeapYear=function(year){return((year%4===0&&year%100!==0)|| year%400===0);};$D.getDaysInMonth=function(year,month){return[31,($D.isLeap Year(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};$D.getTimezoneAbb reviation=function(offset){var z=$C.timezones,p;for(var i=0;i<z.length;i++){if(z[i].offset===offset){return z[i].name;}}
 return null;};$D.getTimezoneOffset=function(name){var z=$C.timezones,p;for(var i=0;i<z.length;i++){if(z[i].name===name.toUpperCase()){return z[i].offset;}}
-return null;};$P.clone=function(){return new Date(this.getTime());};$P.compareTo=function(date){return Date.compare(this,date);};$P.equals=function(date){return Date.equals(this,date||new Date());};$P.between=function(start,end){return this.getTime()>=start.getTime()&&this.getTime()<=end.getTime();};$P.isAfter =function(date){return this.compareTo(date||new Date())===1;};$P.isBefore=function(date){return(this.compareTo(date||new Date())===-1);};$P.addMilliseconds=function(value){this.setMilliseconds(thi s.getMilliseconds()+value);return this;};$P.addSeconds=function(value){return this.addMilliseconds(value*1000);};$P.addMinutes=function(value){return this.addMilliseconds(value*60000);};$P.addHours=function(value){return this.addMilliseconds(value*3600000);};$P.addDays=function(value){this.setDa te(this.getDate()+value);return this;};$P.addWeeks=function(value){return this.addDays(value*7);};$P.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this. setDate(Math.min(n,$D.getDaysInMonth(this.getFullYear(),this.getMonth()))); return this;};$P.addYears=function(value){return this.addMonths(value*12);};$P.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
+return null;};$P.clone=function(){return new Date(this.getTime());};$P.compareTo=function(date){return Date.compare(this,date);};$P.equals=function(date){return Date.equals(this,date||new Date());};$P.between=function(start,end){return this.getTime()>=start.getTime()&&this.getTime()<=end.getTime();};$P.isAfter =function(date){return this.compareTo(date||new Date())===1;};$P.isBefore=function(date){return(this.compareTo(date||new Date())===-1);};$P.isToday=function(){return this.isSameDay(new Date());};$P.isSameDay=function(date){return this.clone().clearTime().equals(date.clone().clearTime());};$P.addMilliseco nds=function(value){this.setMilliseconds(this.getMilliseconds()+value);retu rn this;};$P.addSeconds=function(value){return this.addMilliseconds(value*1000);};$P.addMinutes=function(value){return this.addMilliseconds(value*60000);};$P.addHours=function(value){return this.addMilliseconds(value*3600000);};$P.addDays=function(value){this.setDa te(this.getDate()+value);return this;};$P.addWeeks=function(value){return this.addDays(value*7);};$P.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this. setDate(Math.min(n,$D.getDaysInMonth(this.getFullYear(),this.getMonth()))); return this;};$P.addYears=function(value){return this.addMonths(value*12);};$P.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
 var x=config;if(x.milliseconds){this.addMilliseconds(x.milliseconds);}
 if(x.seconds){this.addSeconds(x.seconds);}
 if(x.minutes){this.addMinutes(x.minutes);}
@@ -33,7 +33,7 @@
 if($D.validateDay(config.day,this.getFullYear(),this.getMonth())){this.addD ays(config.day-this.getDate());}
 if(config.timezone){this.setTimezone(config.timezone);}
 if(config.timezoneOffset){this.setTimezoneOffset(config.timezoneOffset);}
-if($D._validate(config.week,0,53,"week")){this.setWeek(config.week);}
+if(config.week&&$D._validate(config.week,0,53,"week")){this.setWeek(config .week);}
 return this;};$P.moveToFirstDayOfMonth=function(){return this.set({day:1});};$P.moveToLastDayOfMonth=function(){return this.set({day:$D.getDaysInMonth(this.getFullYear(),this.getMonth())});};$P. moveToNthOccurrence=function(dayOfWeek,occurrence){var shift=0;if(occurrence>0){shift=occurrence-1;}
 else if(occurrence===-1){this.moveToLastDayOfMonth();if(this.getDay()!==dayOfWee k){this.moveToDayOfWeek(dayOfWeek,-1);}
 return this;}
@@ -47,9 +47,9 @@
 $P._toString=$P.toString;$P.toString=function(format){var x=this;if(format&&format.length==1){var c=$C.formatPatterns;x.t=x.toString;switch(format){case"d":return x.t(c.shortDate);case"D":return x.t(c.longDate);case"F":return x.t(c.fullDateTime);case"m":return x.t(c.monthDay);case"r":return x.t(c.rfc1123);case"s":return x.t(c.sortableDateTime);case"t":return x.t(c.shortTime);case"T":return x.t(c.longTime);case"u":return x.t(c.universalSortableDateTime);case"y":return x.t(c.yearMonth);}}
 var ord=function(n){switch(n*1){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};return format?format.replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S) /g,function(m){if(m.charAt(0)==="\\"){return m.replace("\\","");}
 x.h=x.getHours;switch(m){case"hh":return p(x.h()<13?(x.h()===0?12:x.h()):(x.h()-12));case"h":return x.h()<13?(x.h()===0?12:x.h()):(x.h()-12);case"HH":return p(x.h());case"H":return x.h();case"mm":return p(x.getMinutes());case"m":return x.getMinutes();case"ss":return p(x.getSeconds());case"s":return x.getSeconds();case"yyyy":return p(x.getFullYear(),4);case"yy":return p(x.getFullYear());case"dddd":return $C.dayNames[x.getDay()];case"ddd":return $C.abbreviatedDayNames[x.getDay()];case"dd":return p(x.getDate());case"d":return x.getDate();case"MMMM":return $C.monthNames[x.getMonth()];case"MMM":return $C.abbreviatedMonthNames[x.getMonth()];case"MM":return p((x.getMonth()+1));case"M":return x.getMonth()+1;case"t":return x.h()<12?$C.amDesignator.substring(0,1):$C.pmDesignator.substring(0,1);case "tt":return x.h()<12?$C.amDesignator:$C.pmDesignator;case"S":return ord(x.getDate());default:return m;}}):this._toString();};}());
-(function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,$N=Number.prototype,_isSecond=fal se;$P._orient=+1;$P._nth=null;$P._is=false;$N._dateElement="day";$P.next=fu nction(){this._orient=+1;return this;};$D.next=function(){return $D.today().next();};$P.last=$P.prev=$P.previous=function(){this._orient=-1; return this;};$D.last=$D.prev=$D.previous=function(){return $D.today().last();};$P.is=function(){this._is=true;return this;};$P.today=function(){if(this._is){this._is=false;return Date.today().equals(this.clone().clearTime());}
-return false;};$P.weekday=function(){if(this._is){this._is=false;return(!this.is() .sat()&&!this.is().sun());}
-return false;};$P.at=function(time){return(typeof time==="string")?$D.parse(this.toShortDateString()+" "+time):this.set(time);};$N.fromNow=$N.after=function(date){var c={};c[this._dateElement]=this;return((!date)?new Date():date.clone()).add(c);};$N.ago=$N.before=function(date){var c={};c[this._dateElement]=this*-1;return((!date)?new Date():date.clone()).add(c);};var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),nth=("final first second third fourth fifth").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
+(function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,$N=Number.prototype;$P._orient=+1 ;$P._nth=null;$P._is=false;$P._same=false;$P._isSecond=false;$N._dateElemen t="day";$P.next=function(){this._orient=+1;return this;};$D.next=function(){return $D.today().next();};$P.last=$P.prev=$P.previous=function(){this._orient=-1; return this;};$D.last=$D.prev=$D.previous=function(){return $D.today().last();};$P.is=function(){this._is=true;return this;};$P.same=function(){this._same=true;this._isSecond=false;return this;};$P.today=function(){return this.same().day();};$P.weekday=function(){if(this._is){this._is=false;retur n(!this.is().sat()&&!this.is().sun());}
+return false;};$P.at=function(time){return(typeof time==="string")?$D.parse(this.toString("d")+" "+time):this.set(time);};$N.fromNow=$N.after=function(date){var c={};c[this._dateElement]=this;return((!date)?new Date():date.clone()).add(c);};$N.ago=$N.before=function(date){var c={};c[this._dateElement]=this*-1;return((!date)?new Date():date.clone()).add(c);};var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),pxf=("Milliseconds Seconds Minutes Hours Date Week Month FullYear").split(/\s/),nth=("final first second third fourth fifth").split(/\s/),de;$P.toObject=function(){var o={};for(var i=0;i<px.length;i++){o[px[i].toLowerCase()]=this["get"+pxf[i]]();}
+return o;};$D.fromObject=function(config){config.week=null;return Date.today().set(config);};var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
 if(this._nth!==null){if(this._isSecond){this.addSeconds(this._orient*-1);}
 this._isSecond=false;var ntemp=this._nth;this._nth=null;var temp=this.clone().moveToLastDayOfMonth();this.moveToNthOccurrence(n,ntemp); if(this>temp){throw new RangeError($D.getDayName(n)+" does not occur "+ntemp+" times in the month of "+$D.getMonthName(temp.getMonth())+" "+temp.getFullYear()+".");}
 return this;}
@@ -58,9 +58,13 @@
 var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
 return this.moveToMonth(n,this._orient);};};var smf=function(n){return function(){return $D.today().set({month:n,day:1});};};for(var j=0;j<mx.length;j++){$D[mx[j].toUpperCase()]=$D[mx[j].toUpperCase().substri ng(0,3)]=j;$D[mx[j]]=$D[mx[j].substring(0,3)]=smf(j);$P[mx[j]]=$P[mx[j].sub string(0,3)]=mf(j);}
 var ef=function(j){return function(){if(this._isSecond){this._isSecond=false;return this;}
+if(this._same){this._same=this._is=false;var o1=this.toObject(),o2=(arguments[0]||new Date()).toObject(),v="",k=j.toLowerCase();for(var m=(px.length-1);m>-1;m--){v=px[m].toLowerCase();if(o1[v]!=o2[v]){return false;}
+if(k==v){break;}}
+return true;}
 if(j.substring(j.length-1)!="s"){j+="s";}
 return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$P[de]=$P[de+"s"]=ef(px[k]);$N[ de]=$N[de+"s"]=nf(de);}
-var nthfn=function(n){return function(dayOfWeek){if(dayOfWeek||dayOfWeek===0){return this.moveToNthOccurrence(dayOfWeek,n);}
+$P._ss=ef("Second");var nthfn=function(n){return function(dayOfWeek){if(this._same){return this._ss(arguments[0]);}
+if(dayOfWeek||dayOfWeek===0){return this.moveToNthOccurrence(dayOfWeek,n);}
 this._nth=n;if(n===2&&(dayOfWeek===undefined||dayOfWeek===null)){this._isSe cond=true;return this.addSeconds(this._orient);}
 return this;};};for(var l=0;l<nth.length;l++){$P[nth[l]]=(l===0)?nthfn(-1):nthfn(l);}}());
 (function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0] );s=rx[1];continue;}

Modified: trunk/build/date-ar-BH.js
=========================================================================== ===
--- trunk/build/date-ar-BH.js   (original)
+++ trunk/build/date-ar-BH.js   Tue May 13 17:38:30 2008
@@ -1,18 +1,18 @@
 /**
- * @version: 1.0 Beta-1
+ * @version: 1.0 Alpha-1
  * @author: Coolite Inc. http://www.coolite.com/
- * @date: 2008-05-12
+ * @date: 2008-05-13
  * @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
  * @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
  * @website: http://www.datejs.com/
  */
-Date.CultureInfo={name:"ar-BH",englishName:"Arabic (Bahrain)",nativeName:"العربية (البحرين)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجم عة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء"," الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],fi rstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير ","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر", "ديسمبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يو نيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص", pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dm y",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy- MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل /i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oc t:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue: /^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,f uture:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence )/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od (ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(se cond)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s ?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)? s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezon e:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|u tc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i },timezones:{UTC:"-000",GMT:"-000",EST:"-0500",EDT:"-0400",CST:"-0600",CDT: "-0500",MST:"-0700",MDT:"-0600",PST:"-0800",PDT:"-0700"}};
+Date.CultureInfo={name:"ar-BH",englishName:"Arabic (Bahrain)",nativeName:"العربية (البحرين)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجم عة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء"," الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],fi rstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير ","مارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر", "ديسمبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يو نيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص", pmDesignator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dm y",formatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy- MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل /i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oc t:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue: /^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,f uture:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence )/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od (ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(se cond)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s ?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)? s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezon e:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|u tc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i },timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"E ST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"} ,{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset :"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
 (function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,p=function(s,l){if(!l){l=2;}
 return("000"+s).slice(l*-1);};$P.clearTime=function(){this.setHours(0);this .setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};$P.setTimeToNow=function(){var n=new Date();this.setHours(n.getHours());this.setMinutes(n.getMinutes());this.set Seconds(n.getSeconds());this.setMilliseconds(n.getMilliseconds());return this;};$D.today=function(){return new Date().clearTime();};$D.compare=function(date1,date2){if(isNaN(date1)||isNa N(date2)){throw new Error(date1+" - "+date2);}else if(date1 instanceof Date&&date2 instanceof Date){return(date1<date2)?-1:(date1>date2)?1:0;}else{throw new TypeError(date1+" - "+date2);}};$D.equals=function(date1,date2){return(date1.compareTo(date2)== =0);};$D.getDayNumberFromName=function(name){var n=$C.dayNames,m=$C.abbreviatedDayNames,o=$C.shortestDayNames,s=name.toLower Case();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s||o[i].t oLowerCase()==s){return i;}}
 return-1;};$D.getMonthNumberFromName=function(name){var n=$C.monthNames,m=$C.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
 return-1;};$D.isLeapYear=function(year){return((year%4===0&&year%100!==0)|| year%400===0);};$D.getDaysInMonth=function(year,month){return[31,($D.isLeap Year(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};$D.getTimezoneAbb reviation=function(offset){var z=$C.timezones,p;for(var i=0;i<z.length;i++){if(z[i].offset===offset){return z[i].name;}}
 return null;};$D.getTimezoneOffset=function(name){var z=$C.timezones,p;for(var i=0;i<z.length;i++){if(z[i].name===name.toUpperCase()){return z[i].offset;}}
-return null;};$P.clone=function(){return new Date(this.getTime());};$P.compareTo=function(date){return Date.compare(this,date);};$P.equals=function(date){return Date.equals(this,date||new Date());};$P.between=function(start,end){return this.getTime()>=start.getTime()&&this.getTime()<=end.getTime();};$P.isAfter =function(date){return this.compareTo(date||new Date())===1;};$P.isBefore=function(date){return(this.compareTo(date||new Date())===-1);};$P.addMilliseconds=function(value){this.setMilliseconds(thi s.getMilliseconds()+value);return this;};$P.addSeconds=function(value){return this.addMilliseconds(value*1000);};$P.addMinutes=function(value){return this.addMilliseconds(value*60000);};$P.addHours=function(value){return this.addMilliseconds(value*3600000);};$P.addDays=function(value){this.setDa te(this.getDate()+value);return this;};$P.addWeeks=function(value){return this.addDays(value*7);};$P.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this. setDate(Math.min(n,$D.getDaysInMonth(this.getFullYear(),this.getMonth()))); return this;};$P.addYears=function(value){return this.addMonths(value*12);};$P.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
+return null;};$P.clone=function(){return new Date(this.getTime());};$P.compareTo=function(date){return Date.compare(this,date);};$P.equals=function(date){return Date.equals(this,date||new Date());};$P.between=function(start,end){return this.getTime()>=start.getTime()&&this.getTime()<=end.getTime();};$P.isAfter =function(date){return this.compareTo(date||new Date())===1;};$P.isBefore=function(date){return(this.compareTo(date||new Date())===-1);};$P.isToday=function(){return this.isSameDay(new Date());};$P.isSameDay=function(date){return this.clone().clearTime().equals(date.clone().clearTime());};$P.addMilliseco nds=function(value){this.setMilliseconds(this.getMilliseconds()+value);retu rn this;};$P.addSeconds=function(value){return this.addMilliseconds(value*1000);};$P.addMinutes=function(value){return this.addMilliseconds(value*60000);};$P.addHours=function(value){return this.addMilliseconds(value*3600000);};$P.addDays=function(value){this.setDa te(this.getDate()+value);return this;};$P.addWeeks=function(value){return this.addDays(value*7);};$P.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this. setDate(Math.min(n,$D.getDaysInMonth(this.getFullYear(),this.getMonth()))); return this;};$P.addYears=function(value){return this.addMonths(value*12);};$P.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
 var x=config;if(x.milliseconds){this.addMilliseconds(x.milliseconds);}
 if(x.seconds){this.addSeconds(x.seconds);}
 if(x.minutes){this.addMinutes(x.minutes);}
@@ -33,7 +33,7 @@
 if($D.validateDay(config.day,this.getFullYear(),this.getMonth())){this.addD ays(config.day-this.getDate());}
 if(config.timezone){this.setTimezone(config.timezone);}
 if(config.timezoneOffset){this.setTimezoneOffset(config.timezoneOffset);}
-if($D._validate(config.week,0,53,"week")){this.setWeek(config.week);}
+if(config.week&&$D._validate(config.week,0,53,"week")){this.setWeek(config .week);}
 return this;};$P.moveToFirstDayOfMonth=function(){return this.set({day:1});};$P.moveToLastDayOfMonth=function(){return this.set({day:$D.getDaysInMonth(this.getFullYear(),this.getMonth())});};$P. moveToNthOccurrence=function(dayOfWeek,occurrence){var shift=0;if(occurrence>0){shift=occurrence-1;}
 else if(occurrence===-1){this.moveToLastDayOfMonth();if(this.getDay()!==dayOfWee k){this.moveToDayOfWeek(dayOfWeek,-1);}
 return this;}
@@ -47,9 +47,9 @@
 $P._toString=$P.toString;$P.toString=function(format){var x=this;if(format&&format.length==1){var c=$C.formatPatterns;x.t=x.toString;switch(format){case"d":return x.t(c.shortDate);case"D":return x.t(c.longDate);case"F":return x.t(c.fullDateTime);case"m":return x.t(c.monthDay);case"r":return x.t(c.rfc1123);case"s":return x.t(c.sortableDateTime);case"t":return x.t(c.shortTime);case"T":return x.t(c.longTime);case"u":return x.t(c.universalSortableDateTime);case"y":return x.t(c.yearMonth);}}
 var ord=function(n){switch(n*1){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};return format?format.replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S) /g,function(m){if(m.charAt(0)==="\\"){return m.replace("\\","");}
 x.h=x.getHours;switch(m){case"hh":return p(x.h()<13?(x.h()===0?12:x.h()):(x.h()-12));case"h":return x.h()<13?(x.h()===0?12:x.h()):(x.h()-12);case"HH":return p(x.h());case"H":return x.h();case"mm":return p(x.getMinutes());case"m":return x.getMinutes();case"ss":return p(x.getSeconds());case"s":return x.getSeconds();case"yyyy":return p(x.getFullYear(),4);case"yy":return p(x.getFullYear());case"dddd":return $C.dayNames[x.getDay()];case"ddd":return $C.abbreviatedDayNames[x.getDay()];case"dd":return p(x.getDate());case"d":return x.getDate();case"MMMM":return $C.monthNames[x.getMonth()];case"MMM":return $C.abbreviatedMonthNames[x.getMonth()];case"MM":return p((x.getMonth()+1));case"M":return x.getMonth()+1;case"t":return x.h()<12?$C.amDesignator.substring(0,1):$C.pmDesignator.substring(0,1);case "tt":return x.h()<12?$C.amDesignator:$C.pmDesignator;case"S":return ord(x.getDate());default:return m;}}):this._toString();};}());
-(function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,$N=Number.prototype,_isSecond=fal se;$P._orient=+1;$P._nth=null;$P._is=false;$N._dateElement="day";$P.next=fu nction(){this._orient=+1;return this;};$D.next=function(){return $D.today().next();};$P.last=$P.prev=$P.previous=function(){this._orient=-1; return this;};$D.last=$D.prev=$D.previous=function(){return $D.today().last();};$P.is=function(){this._is=true;return this;};$P.today=function(){if(this._is){this._is=false;return Date.today().equals(this.clone().clearTime());}
-return false;};$P.weekday=function(){if(this._is){this._is=false;return(!this.is() .sat()&&!this.is().sun());}
-return false;};$P.at=function(time){return(typeof time==="string")?$D.parse(this.toShortDateString()+" "+time):this.set(time);};$N.fromNow=$N.after=function(date){var c={};c[this._dateElement]=this;return((!date)?new Date():date.clone()).add(c);};$N.ago=$N.before=function(date){var c={};c[this._dateElement]=this*-1;return((!date)?new Date():date.clone()).add(c);};var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),nth=("final first second third fourth fifth").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
+(function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,$N=Number.prototype;$P._orient=+1 ;$P._nth=null;$P._is=false;$P._same=false;$P._isSecond=false;$N._dateElemen t="day";$P.next=function(){this._orient=+1;return this;};$D.next=function(){return $D.today().next();};$P.last=$P.prev=$P.previous=function(){this._orient=-1; return this;};$D.last=$D.prev=$D.previous=function(){return $D.today().last();};$P.is=function(){this._is=true;return this;};$P.same=function(){this._same=true;this._isSecond=false;return this;};$P.today=function(){return this.same().day();};$P.weekday=function(){if(this._is){this._is=false;retur n(!this.is().sat()&&!this.is().sun());}
+return false;};$P.at=function(time){return(typeof time==="string")?$D.parse(this.toString("d")+" "+time):this.set(time);};$N.fromNow=$N.after=function(date){var c={};c[this._dateElement]=this;return((!date)?new Date():date.clone()).add(c);};$N.ago=$N.before=function(date){var c={};c[this._dateElement]=this*-1;return((!date)?new Date():date.clone()).add(c);};var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),pxf=("Milliseconds Seconds Minutes Hours Date Week Month FullYear").split(/\s/),nth=("final first second third fourth fifth").split(/\s/),de;$P.toObject=function(){var o={};for(var i=0;i<px.length;i++){o[px[i].toLowerCase()]=this["get"+pxf[i]]();}
+return o;};$D.fromObject=function(config){config.week=null;return Date.today().set(config);};var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
 if(this._nth!==null){if(this._isSecond){this.addSeconds(this._orient*-1);}
 this._isSecond=false;var ntemp=this._nth;this._nth=null;var temp=this.clone().moveToLastDayOfMonth();this.moveToNthOccurrence(n,ntemp); if(this>temp){throw new RangeError($D.getDayName(n)+" does not occur "+ntemp+" times in the month of "+$D.getMonthName(temp.getMonth())+" "+temp.getFullYear()+".");}
 return this;}
@@ -58,9 +58,13 @@
 var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
 return this.moveToMonth(n,this._orient);};};var smf=function(n){return function(){return $D.today().set({month:n,day:1});};};for(var j=0;j<mx.length;j++){$D[mx[j].toUpperCase()]=$D[mx[j].toUpperCase().substri ng(0,3)]=j;$D[mx[j]]=$D[mx[j].substring(0,3)]=smf(j);$P[mx[j]]=$P[mx[j].sub string(0,3)]=mf(j);}
 var ef=function(j){return function(){if(this._isSecond){this._isSecond=false;return this;}
+if(this._same){this._same=this._is=false;var o1=this.toObject(),o2=(arguments[0]||new Date()).toObject(),v="",k=j.toLowerCase();for(var m=(px.length-1);m>-1;m--){v=px[m].toLowerCase();if(o1[v]!=o2[v]){return false;}
+if(k==v){break;}}
+return true;}
 if(j.substring(j.length-1)!="s"){j+="s";}
 return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$P[de]=$P[de+"s"]=ef(px[k]);$N[ de]=$N[de+"s"]=nf(de);}
-var nthfn=function(n){return function(dayOfWeek){if(dayOfWeek||dayOfWeek===0){return this.moveToNthOccurrence(dayOfWeek,n);}
+$P._ss=ef("Second");var nthfn=function(n){return function(dayOfWeek){if(this._same){return this._ss(arguments[0]);}
+if(dayOfWeek||dayOfWeek===0){return this.moveToNthOccurrence(dayOfWeek,n);}
 this._nth=n;if(n===2&&(dayOfWeek===undefined||dayOfWeek===null)){this._isSe cond=true;return this.addSeconds(this._orient);}
 return this;};};for(var l=0;l<nth.length;l++){$P[nth[l]]=(l===0)?nthfn(-1):nthfn(l);}}());
 (function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0] );s=rx[1];continue;}

Modified: trunk/build/date-ar-DZ.js
=========================================================================== ===
--- trunk/build/date-ar-DZ.js   (original)
+++ trunk/build/date-ar-DZ.js   Tue May 13 17:38:30 2008
@@ -1,18 +1,18 @@
 /**
- * @version: 1.0 Beta-1
+ * @version: 1.0 Alpha-1
  * @author: Coolite Inc. http://www.coolite.com/
- * @date: 2008-05-12
+ * @date: 2008-05-13
  * @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
  * @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
  * @website: http://www.datejs.com/
  */
-Date.CultureInfo={name:"ar-DZ",englishName:"Arabic (Algeria)",nativeName:"العربية (الجزائر)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجم عة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء"," الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],fi rstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["جانفييه","فيفر ييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","د يسمبر"],abbreviatedMonthNames:["جانفييه","فيفرييه","مارس","أفريل","مي","جوا ن","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDe signator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",f ormatPatterns:{shortDate:"dd-MM-yyyy",longDate:"dd MMMM, yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dd MMMM, yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:" yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^جانفييه/i,feb:/^فيفرييه/i,mar:/^مارس/i,apr:/^أف ريل/i,may:/^مي/i,jun:/^جوان/i,jul:/^جوييه/i,aug:/^أوت/i,sep:/^سبتمبر/i,oct: /^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^ الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,fut ure:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/ i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(a y)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(seco nd)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/ i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s? /i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone: /^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc )/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i}, timezones:{UTC:"-000",GMT:"-000",EST:"-0500",EDT:"-0400",CST:"-0600",CDT:"- 0500",MST:"-0700",MDT:"-0600",PST:"-0800",PDT:"-0700"}};
+Date.CultureInfo={name:"ar-DZ",englishName:"Arabic (Algeria)",nativeName:"العربية (الجزائر)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجم عة","السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء"," الخميس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],fi rstLetterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["جانفييه","فيفر ييه","مارس","أفريل","مي","جوان","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","د يسمبر"],abbreviatedMonthNames:["جانفييه","فيفرييه","مارس","أفريل","مي","جوا ن","جوييه","أوت","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDe signator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",f ormatPatterns:{shortDate:"dd-MM-yyyy",longDate:"dd MMMM, yyyy",shortTime:"H:mm",longTime:"H:mm:ss",fullDateTime:"dd MMMM, yyyy H:mm:ss",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:" yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^جانفييه/i,feb:/^فيفرييه/i,mar:/^مارس/i,apr:/^أف ريل/i,may:/^مي/i,jun:/^جوان/i,jul:/^جوييه/i,aug:/^أوت/i,sep:/^سبتمبر/i,oct: /^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue:/^ الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,fut ure:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/ i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(a y)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(seco nd)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/ i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s? /i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone: /^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc )/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i}, timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST ",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{ name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:" -0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
 (function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,p=function(s,l){if(!l){l=2;}
 return("000"+s).slice(l*-1);};$P.clearTime=function(){this.setHours(0);this .setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};$P.setTimeToNow=function(){var n=new Date();this.setHours(n.getHours());this.setMinutes(n.getMinutes());this.set Seconds(n.getSeconds());this.setMilliseconds(n.getMilliseconds());return this;};$D.today=function(){return new Date().clearTime();};$D.compare=function(date1,date2){if(isNaN(date1)||isNa N(date2)){throw new Error(date1+" - "+date2);}else if(date1 instanceof Date&&date2 instanceof Date){return(date1<date2)?-1:(date1>date2)?1:0;}else{throw new TypeError(date1+" - "+date2);}};$D.equals=function(date1,date2){return(date1.compareTo(date2)== =0);};$D.getDayNumberFromName=function(name){var n=$C.dayNames,m=$C.abbreviatedDayNames,o=$C.shortestDayNames,s=name.toLower Case();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s||o[i].t oLowerCase()==s){return i;}}
 return-1;};$D.getMonthNumberFromName=function(name){var n=$C.monthNames,m=$C.abbreviatedMonthNames,s=name.toLowerCase();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s){return i;}}
 return-1;};$D.isLeapYear=function(year){return((year%4===0&&year%100!==0)|| year%400===0);};$D.getDaysInMonth=function(year,month){return[31,($D.isLeap Year(year)?29:28),31,30,31,30,31,31,30,31,30,31][month];};$D.getTimezoneAbb reviation=function(offset){var z=$C.timezones,p;for(var i=0;i<z.length;i++){if(z[i].offset===offset){return z[i].name;}}
 return null;};$D.getTimezoneOffset=function(name){var z=$C.timezones,p;for(var i=0;i<z.length;i++){if(z[i].name===name.toUpperCase()){return z[i].offset;}}
-return null;};$P.clone=function(){return new Date(this.getTime());};$P.compareTo=function(date){return Date.compare(this,date);};$P.equals=function(date){return Date.equals(this,date||new Date());};$P.between=function(start,end){return this.getTime()>=start.getTime()&&this.getTime()<=end.getTime();};$P.isAfter =function(date){return this.compareTo(date||new Date())===1;};$P.isBefore=function(date){return(this.compareTo(date||new Date())===-1);};$P.addMilliseconds=function(value){this.setMilliseconds(thi s.getMilliseconds()+value);return this;};$P.addSeconds=function(value){return this.addMilliseconds(value*1000);};$P.addMinutes=function(value){return this.addMilliseconds(value*60000);};$P.addHours=function(value){return this.addMilliseconds(value*3600000);};$P.addDays=function(value){this.setDa te(this.getDate()+value);return this;};$P.addWeeks=function(value){return this.addDays(value*7);};$P.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this. setDate(Math.min(n,$D.getDaysInMonth(this.getFullYear(),this.getMonth()))); return this;};$P.addYears=function(value){return this.addMonths(value*12);};$P.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
+return null;};$P.clone=function(){return new Date(this.getTime());};$P.compareTo=function(date){return Date.compare(this,date);};$P.equals=function(date){return Date.equals(this,date||new Date());};$P.between=function(start,end){return this.getTime()>=start.getTime()&&this.getTime()<=end.getTime();};$P.isAfter =function(date){return this.compareTo(date||new Date())===1;};$P.isBefore=function(date){return(this.compareTo(date||new Date())===-1);};$P.isToday=function(){return this.isSameDay(new Date());};$P.isSameDay=function(date){return this.clone().clearTime().equals(date.clone().clearTime());};$P.addMilliseco nds=function(value){this.setMilliseconds(this.getMilliseconds()+value);retu rn this;};$P.addSeconds=function(value){return this.addMilliseconds(value*1000);};$P.addMinutes=function(value){return this.addMilliseconds(value*60000);};$P.addHours=function(value){return this.addMilliseconds(value*3600000);};$P.addDays=function(value){this.setDa te(this.getDate()+value);return this;};$P.addWeeks=function(value){return this.addDays(value*7);};$P.addMonths=function(value){var n=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+value);this. setDate(Math.min(n,$D.getDaysInMonth(this.getFullYear(),this.getMonth()))); return this;};$P.addYears=function(value){return this.addMonths(value*12);};$P.add=function(config){if(typeof config=="number"){this._orient=config;return this;}
 var x=config;if(x.milliseconds){this.addMilliseconds(x.milliseconds);}
 if(x.seconds){this.addSeconds(x.seconds);}
 if(x.minutes){this.addMinutes(x.minutes);}
@@ -33,7 +33,7 @@
 if($D.validateDay(config.day,this.getFullYear(),this.getMonth())){this.addD ays(config.day-this.getDate());}
 if(config.timezone){this.setTimezone(config.timezone);}
 if(config.timezoneOffset){this.setTimezoneOffset(config.timezoneOffset);}
-if($D._validate(config.week,0,53,"week")){this.setWeek(config.week);}
+if(config.week&&$D._validate(config.week,0,53,"week")){this.setWeek(config .week);}
 return this;};$P.moveToFirstDayOfMonth=function(){return this.set({day:1});};$P.moveToLastDayOfMonth=function(){return this.set({day:$D.getDaysInMonth(this.getFullYear(),this.getMonth())});};$P. moveToNthOccurrence=function(dayOfWeek,occurrence){var shift=0;if(occurrence>0){shift=occurrence-1;}
 else if(occurrence===-1){this.moveToLastDayOfMonth();if(this.getDay()!==dayOfWee k){this.moveToDayOfWeek(dayOfWeek,-1);}
 return this;}
@@ -47,9 +47,9 @@
 $P._toString=$P.toString;$P.toString=function(format){var x=this;if(format&&format.length==1){var c=$C.formatPatterns;x.t=x.toString;switch(format){case"d":return x.t(c.shortDate);case"D":return x.t(c.longDate);case"F":return x.t(c.fullDateTime);case"m":return x.t(c.monthDay);case"r":return x.t(c.rfc1123);case"s":return x.t(c.sortableDateTime);case"t":return x.t(c.shortTime);case"T":return x.t(c.longTime);case"u":return x.t(c.universalSortableDateTime);case"y":return x.t(c.yearMonth);}}
 var ord=function(n){switch(n*1){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th";}};return format?format.replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S) /g,function(m){if(m.charAt(0)==="\\"){return m.replace("\\","");}
 x.h=x.getHours;switch(m){case"hh":return p(x.h()<13?(x.h()===0?12:x.h()):(x.h()-12));case"h":return x.h()<13?(x.h()===0?12:x.h()):(x.h()-12);case"HH":return p(x.h());case"H":return x.h();case"mm":return p(x.getMinutes());case"m":return x.getMinutes();case"ss":return p(x.getSeconds());case"s":return x.getSeconds();case"yyyy":return p(x.getFullYear(),4);case"yy":return p(x.getFullYear());case"dddd":return $C.dayNames[x.getDay()];case"ddd":return $C.abbreviatedDayNames[x.getDay()];case"dd":return p(x.getDate());case"d":return x.getDate();case"MMMM":return $C.monthNames[x.getMonth()];case"MMM":return $C.abbreviatedMonthNames[x.getMonth()];case"MM":return p((x.getMonth()+1));case"M":return x.getMonth()+1;case"t":return x.h()<12?$C.amDesignator.substring(0,1):$C.pmDesignator.substring(0,1);case "tt":return x.h()<12?$C.amDesignator:$C.pmDesignator;case"S":return ord(x.getDate());default:return m;}}):this._toString();};}());
-(function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,$N=Number.prototype,_isSecond=fal se;$P._orient=+1;$P._nth=null;$P._is=false;$N._dateElement="day";$P.next=fu nction(){this._orient=+1;return this;};$D.next=function(){return $D.today().next();};$P.last=$P.prev=$P.previous=function(){this._orient=-1; return this;};$D.last=$D.prev=$D.previous=function(){return $D.today().last();};$P.is=function(){this._is=true;return this;};$P.today=function(){if(this._is){this._is=false;return Date.today().equals(this.clone().clearTime());}
-return false;};$P.weekday=function(){if(this._is){this._is=false;return(!this.is() .sat()&&!this.is().sun());}
-return false;};$P.at=function(time){return(typeof time==="string")?$D.parse(this.toShortDateString()+" "+time):this.set(time);};$N.fromNow=$N.after=function(date){var c={};c[this._dateElement]=this;return((!date)?new Date():date.clone()).add(c);};$N.ago=$N.before=function(date){var c={};c[this._dateElement]=this*-1;return((!date)?new Date():date.clone()).add(c);};var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),nth=("final first second third fourth fifth").split(/\s/),de;var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
+(function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,$N=Number.prototype;$P._orient=+1 ;$P._nth=null;$P._is=false;$P._same=false;$P._isSecond=false;$N._dateElemen t="day";$P.next=function(){this._orient=+1;return this;};$D.next=function(){return $D.today().next();};$P.last=$P.prev=$P.previous=function(){this._orient=-1; return this;};$D.last=$D.prev=$D.previous=function(){return $D.today().last();};$P.is=function(){this._is=true;return this;};$P.same=function(){this._same=true;this._isSecond=false;return this;};$P.today=function(){return this.same().day();};$P.weekday=function(){if(this._is){this._is=false;retur n(!this.is().sat()&&!this.is().sun());}
+return false;};$P.at=function(time){return(typeof time==="string")?$D.parse(this.toString("d")+" "+time):this.set(time);};$N.fromNow=$N.after=function(date){var c={};c[this._dateElement]=this;return((!date)?new Date():date.clone()).add(c);};$N.ago=$N.before=function(date){var c={};c[this._dateElement]=this*-1;return((!date)?new Date():date.clone()).add(c);};var dx=("sunday monday tuesday wednesday thursday friday saturday").split(/\s/),mx=("january february march april may june july august september october november december").split(/\s/),px=("Millisecond Second Minute Hour Day Week Month Year").split(/\s/),pxf=("Milliseconds Seconds Minutes Hours Date Week Month FullYear").split(/\s/),nth=("final first second third fourth fifth").split(/\s/),de;$P.toObject=function(){var o={};for(var i=0;i<px.length;i++){o[px[i].toLowerCase()]=this["get"+pxf[i]]();}
+return o;};$D.fromObject=function(config){config.week=null;return Date.today().set(config);};var df=function(n){return function(){if(this._is){this._is=false;return this.getDay()==n;}
 if(this._nth!==null){if(this._isSecond){this.addSeconds(this._orient*-1);}
 this._isSecond=false;var ntemp=this._nth;this._nth=null;var temp=this.clone().moveToLastDayOfMonth();this.moveToNthOccurrence(n,ntemp); if(this>temp){throw new RangeError($D.getDayName(n)+" does not occur "+ntemp+" times in the month of "+$D.getMonthName(temp.getMonth())+" "+temp.getFullYear()+".");}
 return this;}
@@ -58,9 +58,13 @@
 var mf=function(n){return function(){if(this._is){this._is=false;return this.getMonth()===n;}
 return this.moveToMonth(n,this._orient);};};var smf=function(n){return function(){return $D.today().set({month:n,day:1});};};for(var j=0;j<mx.length;j++){$D[mx[j].toUpperCase()]=$D[mx[j].toUpperCase().substri ng(0,3)]=j;$D[mx[j]]=$D[mx[j].substring(0,3)]=smf(j);$P[mx[j]]=$P[mx[j].sub string(0,3)]=mf(j);}
 var ef=function(j){return function(){if(this._isSecond){this._isSecond=false;return this;}
+if(this._same){this._same=this._is=false;var o1=this.toObject(),o2=(arguments[0]||new Date()).toObject(),v="",k=j.toLowerCase();for(var m=(px.length-1);m>-1;m--){v=px[m].toLowerCase();if(o1[v]!=o2[v]){return false;}
+if(k==v){break;}}
+return true;}
 if(j.substring(j.length-1)!="s"){j+="s";}
 return this["add"+j](this._orient);};};var nf=function(n){return function(){this._dateElement=n;return this;};};for(var k=0;k<px.length;k++){de=px[k].toLowerCase();$P[de]=$P[de+"s"]=ef(px[k]);$N[ de]=$N[de+"s"]=nf(de);}
-var nthfn=function(n){return function(dayOfWeek){if(dayOfWeek||dayOfWeek===0){return this.moveToNthOccurrence(dayOfWeek,n);}
+$P._ss=ef("Second");var nthfn=function(n){return function(dayOfWeek){if(this._same){return this._ss(arguments[0]);}
+if(dayOfWeek||dayOfWeek===0){return this.moveToNthOccurrence(dayOfWeek,n);}
 this._nth=n;if(n===2&&(dayOfWeek===undefined||dayOfWeek===null)){this._isSe cond=true;return this.addSeconds(this._orient);}
 return this;};};for(var l=0;l<nth.length;l++){$P[nth[l]]=(l===0)?nthfn(-1):nthfn(l);}}());
 (function(){Date.Parsing={Exception:function(s){this.message="Parse error at '"+s.substring(0,10)+" ...'";}};var $P=Date.Parsing;var _=$P.Operators={rtoken:function(r){return function(s){var mx=s.match(r);if(mx){return([mx[0],s.substring(mx[0].length)]);}else{throw new $P.Exception(s);}};},token:function(s){return function(s){return _.rtoken(new RegExp("^\s*"+s+"\s*"))(s);};},stoken:function(s){return _.rtoken(new RegExp("^"+s));},until:function(p){return function(s){var qx=[],rx=null;while(s.length){try{rx=p.call(this,s);}catch(e){qx.push(rx[0] );s=rx[1];continue;}

Modified: trunk/build/date-ar-EG.js
=========================================================================== ===
--- trunk/build/date-ar-EG.js   (original)
+++ trunk/build/date-ar-EG.js   Tue May 13 17:38:30 2008
@@ -1,18 +1,18 @@
 /**
- * @version: 1.0 Beta-1
+ * @version: 1.0 Alpha-1
  * @author: Coolite Inc. http://www.coolite.com/
- * @date: 2008-05-12
+ * @date: 2008-05-13
  * @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
  * @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
  * @website: http://www.datejs.com/
  */
-Date.CultureInfo={name:"ar-EG",englishName:"Arabic (Egypt)",nativeName:"العربية (مصر)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة", "السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخم يس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstL etterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير","م ارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديس مبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو" ,"يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDe signator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",f ormatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy- MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل /i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oc t:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue: /^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,f uture:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence )/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od (ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(se cond)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s ?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)? s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezon e:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|u tc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i },timezones:{UTC:"-000",GMT:"-000",EST:"-0500",EDT:"-0400",CST:"-0600",CDT: "-0500",MST:"-0700",MDT:"-0600",PST:"-0800",PDT:"-0700"}};
+Date.CultureInfo={name:"ar-EG",englishName:"Arabic (Egypt)",nativeName:"العربية (مصر)",dayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخميس","الجمعة", "السبت"],abbreviatedDayNames:["الاحد","الاثنين","الثلاثاء","الاربعاء","الخم يس","الجمعة","السبت"],shortestDayNames:["أ","ا","ث","أ","خ","ج","س"],firstL etterDayNames:["أ","ا","ث","أ","خ","ج","س"],monthNames:["يناير","فبراير","م ارس","ابريل","مايو","يونيو","يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديس مبر"],abbreviatedMonthNames:["يناير","فبراير","مارس","ابريل","مايو","يونيو" ,"يوليو","اغسطس","سبتمبر","اكتوبر","نوفمبر","ديسمبر"],amDesignator:"ص",pmDe signator:"م",firstDayOfWeek:6,twoDigitYearMax:2029,dateElementOrder:"dmy",f ormatPatterns:{shortDate:"dd/MM/yyyy",longDate:"dd MMMM, yyyy",shortTime:"hh:mm tt",longTime:"hh:mm:ss tt",fullDateTime:"dd MMMM, yyyy hh:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy- MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"dd MMMM",yearMonth:"MMMM, yyyy"},regexPatterns:{jan:/^يناير/i,feb:/^فبراير/i,mar:/^مارس/i,apr:/^ابريل /i,may:/^مايو/i,jun:/^يونيو/i,jul:/^يوليو/i,aug:/^اغسطس/i,sep:/^سبتمبر/i,oc t:/^اكتوبر/i,nov:/^نوفمبر/i,dec:/^ديسمبر/i,sun:/^الاحد/i,mon:/^ا(1)?/i,tue: /^الثلاثاء/i,wed:/^الاربعاء/i,thu:/^الخميس/i,fri:/^الجمعة/i,sat:/^السبت/i,f uture:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence )/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od (ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(se cond)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s ?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)? s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezon e:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|u tc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p)/i },timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"E ST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"} ,{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset :"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};
 (function(){var $D=Date,$P=$D.prototype,$C=$D.CultureInfo,p=function(s,l){if(!l){l=2;}
 return("000"+s).slice(l*-1);};$P.clearTime=function(){this.setHours(0);this .setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;};$P.setTimeToNow=function(){var n=new Date();this.setHours(n.getHours());this.setMinutes(n.getMinutes());this.set Seconds(n.getSeconds());this.setMilliseconds(n.getMilliseconds());return this;};$D.today=function(){return new Date().clearTime();};$D.compare=function(date1,date2){if(isNaN(date1)||isNa N(date2)){throw new Error(date1+" - "+date2);}else if(date1 instanceof Date&&date2 instanceof Date){return(date1<date2)?-1:(date1>date2)?1:0;}else{throw new TypeError(date1+" - "+date2);}};$D.equals=function(date1,date2){return(date1.compareTo(date2)== =0);};$D.getDayNumberFromName=function(name){var n=$C.dayNames,m=$C.abbreviatedDayNames,o=$C.shortestDayNames,s=name.toLower Case();for(var i=0;i<n.length;i++){if(n[i].toLowerCase()==s||m[i].toLowerCase()==s||o[i].t oLowerCase()==s){return i;}}
...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »