From 81bea17aefb26859f825b9293c7c99192874806e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 8 Nov 2011 20:40:44 +0400 Subject: upgrade Dojo to 1.6.1 --- lib/dojo/date.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/dojo/date.js') diff --git a/lib/dojo/date.js b/lib/dojo/date.js index d4fe218d3..e961b5a86 100644 --- a/lib/dojo/date.js +++ b/lib/dojo/date.js @@ -1,5 +1,5 @@ /* - Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved. + Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved. Available via Academic Free License >= 2.1 OR the modified BSD license. see: http://dojotoolkit.org/license for details */ @@ -9,6 +9,8 @@ if(!dojo._hasResource["dojo.date"]){ //_hasResource checks added by build. Do no dojo._hasResource["dojo.date"] = true; dojo.provide("dojo.date"); +dojo.getObject("date", true, dojo); + /*===== dojo.date = { // summary: Date manipulation utilities @@ -22,7 +24,7 @@ dojo.date.getDaysInMonth = function(/*Date*/dateObject){ var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; if(month == 1 && dojo.date.isLeapYear(dateObject)){ return 29; } // Number return days[month]; // Number -} +}; dojo.date.isLeapYear = function(/*Date*/dateObject){ // summary: @@ -36,7 +38,7 @@ dojo.date.isLeapYear = function(/*Date*/dateObject){ var year = dateObject.getFullYear(); return !(year%400) || (!(year%4) && !!(year%100)); // Boolean -} +}; // FIXME: This is not localized dojo.date.getTimezoneName = function(/*Date*/dateObject){ @@ -61,7 +63,7 @@ dojo.date.getTimezoneName = function(/*Date*/dateObject){ }else{ // If at first you don't succeed ... // If IE knows about the TZ, it appears before the year - // Capital letters or slash before a 4-digit year + // Capital letters or slash before a 4-digit year // at the end of string var pat = /([A-Z\/]+) \d{4}$/; if((match = str.match(pat))){ @@ -70,7 +72,7 @@ dojo.date.getTimezoneName = function(/*Date*/dateObject){ // Some browsers (e.g. Safari) glue the TZ on the end // of toLocaleString instead of putting it in toString str = dateObject.toLocaleString(); - // Capital letters or slash -- end of string, + // Capital letters or slash -- end of string, // after space pat = / ([A-Z\/]+)$/; if((match = str.match(pat))){ @@ -81,7 +83,7 @@ dojo.date.getTimezoneName = function(/*Date*/dateObject){ // Make sure it doesn't somehow end up return AM or PM return (tz == 'AM' || tz == 'PM') ? '' : tz; // String -} +}; // Utility methods to do arithmetic calculations with Dates -- cgit v1.2.3