mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 20:15:55 +00:00
upgrade Dojo to 1.6.1
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user