|
From: <be...@us...> - 2013-08-20 11:17:32
|
Revision: 11952
http://sourceforge.net/p/xoops/svn/11952
Author: beckmi
Date: 2013-08-20 11:17:22 +0000 (Tue, 20 Aug 2013)
Log Message:
-----------
replaced _CAL_FORMAT with _SHORTDATESTRING, fixed bug in calendar.js
Modified Paths:
--------------
XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formtextdateselect.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/include/calendar.js
XoopsCore/branches/2.5.x/2.5.7/htdocs/language/english/calendar.php
XoopsCore/branches/2.5.x/2.5.7/htdocs/language/english/global.php
Modified: XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-08-20 00:29:35 UTC (rev 11951)
+++ XoopsCore/branches/2.5.x/2.5.7/docs/changelog.250.txt 2013-08-20 11:17:22 UTC (rev 11952)
@@ -15,6 +15,8 @@
- fix for deprecated "preg_replace/e" function in PHP 5.5 (mamba)
- ID: 1143 (old ID 430840) class/module.errorhandler.php (uberrookie/zyspec)
- added: check if 'date.timezone' is set in php.ini, if not, set it to UTC (cesag/mamba)
+- assigned _SHORTDATESTRING to _CAL_FORMAT to have consistency in local languages (jcweb/guspel)
+- fixed bug in calendar.js (mamba)
===============================
2013/04/21: Version 2.5.6 Final
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formtextdateselect.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formtextdateselect.php 2013-08-20 00:29:35 UTC (rev 11951)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/class/xoopsform/formtextdateselect.php 2013-08-20 11:17:22 UTC (rev 11952)
@@ -45,10 +45,10 @@
$display_value = $ele_value;
$ele_value = time();
} else {
- $display_value = date(_CAL_FORMAT, $ele_value);
+ $display_value = date(_SHORTDATESTRING, $ele_value);
}
- $jstime = formatTimestamp($ele_value, _CAL_FORMAT);
+ $jstime = formatTimestamp($ele_value, _SHORTDATESTRING);
if (is_object($GLOBALS['xoTheme'])) {
$GLOBALS['xoTheme']->addScript('include/calendar.js');
$GLOBALS['xoTheme']->addStylesheet('include/calendar-blue.css');
@@ -130,8 +130,8 @@
Calendar._TT["TODAY"] = "' . _CAL_TODAY . '";
// date formats
- Calendar._TT["DEF_DATE_FORMAT"] = "' . _CAL_FORMAT . '";
- Calendar._TT["TT_DATE_FORMAT"] = "' . _CAL_FORMAT . '";
+ Calendar._TT["DEF_DATE_FORMAT"] = "' . _SHORTDATESTRING . '";
+ Calendar._TT["TT_DATE_FORMAT"] = "' . _SHORTDATESTRING . '";
Calendar._TT["WK"] = "";
');
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/include/calendar.js
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/include/calendar.js 2013-08-20 00:29:35 UTC (rev 11951)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/include/calendar.js 2013-08-20 11:17:22 UTC (rev 11952)
@@ -1261,13 +1261,14 @@
Date.prototype.print = function (frm) {
var str = new String(frm);
var m = this.getMonthFormatted();
+ var n = this.getMonth();
var d = this.getDate();
var y = this.getFullYear();
var s = new Array();
s["j"] = d;
s["d"] = (d < 10) ? ("0" + d) : d;
s["m"] = m;
- s["n"] = (m < 9) ? ("0" + (1+m)) : (1+m);
+ s["n"] = 1+n;
s["Y"] = y;
s["y"] = new String(y).substr(2, 2);
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/language/english/calendar.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/language/english/calendar.php 2013-08-20 00:29:35 UTC (rev 11951)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/language/english/calendar.php 2013-08-20 11:17:22 UTC (rev 11952)
@@ -8,7 +8,9 @@
// Revision by TXMod Xoops - Added shot text: 30/06/2012
//
//%%%%% Time Zone %%%%
-define('_CAL_FORMAT',"Y-m-d");
+//define('_CAL_FORMAT',"Y-m-d");
+define('_CAL_FORMAT',_SHORTDATESTRING);
+
//%%%%% JQuery Calendar Time Zone %%%%
define('_CAL_JQUERY_FORMAT',"yy/mm/dd");
// Week Mini Text
Modified: XoopsCore/branches/2.5.x/2.5.7/htdocs/language/english/global.php
===================================================================
--- XoopsCore/branches/2.5.x/2.5.7/htdocs/language/english/global.php 2013-08-20 00:29:35 UTC (rev 11951)
+++ XoopsCore/branches/2.5.x/2.5.7/htdocs/language/english/global.php 2013-08-20 11:17:22 UTC (rev 11952)
@@ -173,7 +173,8 @@
define('_MONTH','1 month');
define('_DATESTRING','Y/n/j G:i:s');
define('_MEDIUMDATESTRING','Y/n/j G:i');
-define('_SHORTDATESTRING','Y/n/j');
+//define('_SHORTDATESTRING','n/j/Y');
+define('_SHORTDATESTRING','m/d/Y');
/**
* The following characters are recognized in the format string:
* a - 'am' or 'pm'
|