Fixbug : JSCalendar function are displayed directly into UI :\

This commit is contained in:
bgigon 2004-06-25 12:49:38 +00:00
parent 890548096b
commit fc3ccca344

View File

@ -1732,8 +1732,14 @@ Date.prototype.print = function (str) {
s["%%"] = "%"; // a literal '%' character
var re = /%./g;
/*
if (!Calendar.is_ie5 && !Calendar.is_opera)
return str.replace(re, function (par) { return s[par] || par; });
return str.replace(re, re);
*/
if (Calendar.is_opera || Calendar.is_ie5)
return str.replace(re, function(par) { return s[par] || par; });
// return str.replace(re, function (par) { return s[par] || par; });
var a = str.match(re);
for (var i = 0; i < a.length; i++) {
@ -1747,6 +1753,8 @@ Date.prototype.print = function (str) {
return str;
};
Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
Date.prototype.setFullYear = function(y) {
var d = new Date(this);
@ -1761,3 +1769,4 @@ Date.prototype.setFullYear = function(y) {
// global object that remembers the calendar
window.calendar = null;