Revision: 1756
http://mrbs.svn.sourceforge.net/mrbs/?rev=1756&view=rev
Author: cimorrison
Date: 2011-01-26 17:17:35 +0000 (Wed, 26 Jan 2011)
Log Message:
-----------
Removed hard-coded formats for strftime() and put them in systemdefaults in
order to make it easier to tweak time and date formats to meet local
expectations.
Modified Paths:
--------------
mrbs/trunk/web/day.php
mrbs/trunk/web/edit_area_room.php
mrbs/trunk/web/edit_entry.php
mrbs/trunk/web/functions.inc
mrbs/trunk/web/functions_mail.inc
mrbs/trunk/web/functions_view.inc
mrbs/trunk/web/help.php
mrbs/trunk/web/internalconfig.inc.php
mrbs/trunk/web/language.inc
mrbs/trunk/web/mincals.inc
mrbs/trunk/web/month.php
mrbs/trunk/web/mrbs_sql.inc
mrbs/trunk/web/report.php
mrbs/trunk/web/systemdefaults.inc.php
mrbs/trunk/web/trailer.inc
mrbs/trunk/web/week.php
Modified: mrbs/trunk/web/day.php
===================================================================
--- mrbs/trunk/web/day.php 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/day.php 2011-01-26 17:17:35 UTC (rev 1756)
@@ -207,7 +207,7 @@
{
// Show current date and timezone
echo "<div id=\"dwm\">\n";
- echo "<h2>" . utf8_strftime("%A %d %B %Y", $am7) . "</h2>\n";
+ echo "<h2>" . utf8_strftime($strftime_format['date'], $am7) . "</h2>\n";
if ($display_timezone)
{
echo "<div class=\"timezone\">";
Modified: mrbs/trunk/web/edit_area_room.php
===================================================================
--- mrbs/trunk/web/edit_area_room.php 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/edit_area_room.php 2011-01-26 17:17:35 UTC (rev 1756)
@@ -775,8 +775,8 @@
var hour = time/60;
if (!twentyfourhour_format)
{
- var ap = "AM";
- if (hour > 11) {ap = "PM";}
+ var ap = "<?php echo utf8_strftime($strftime_format['ampm'],
mktime(10, 0, 0)) ?>";
+ if (hour > 11) {ap = "<?php echo
utf8_strftime($strftime_format['ampm'], mktime(14, 0, 0)) ?>";}
if (hour > 12) {hour = hour - 12;}
if (hour == 0) {hour = 12;}
}
@@ -895,9 +895,13 @@
{
echo "<div class=\"group ampm\">\n";
$checked = ($morningstarts < 12) ? "checked=\"checked\"" : "";
- echo " <label><input name=\"area_morning_ampm\" type=\"radio\"
value=\"am\" onClick=\"changeSelect(this.form)\" $checked>" .
utf8_strftime("%p",mktime(1,0,0,1,1,2000)) . "</label>\n";
+ echo "<label><input name=\"area_morning_ampm\" type=\"radio\"
value=\"am\" onClick=\"changeSelect(this.form)\" $checked>" .
+ utf8_strftime($strftime_format['ampm'], mktime(1,0,0,1,1,2000))
.
+ "</label>\n";
$checked = ($morningstarts >= 12) ? "checked=\"checked\"" : "";
- echo " <label><input name=\"area_morning_ampm\" type=\"radio\"
value=\"pm\" onClick=\"changeSelect(this.form)\" $checked>".
utf8_strftime("%p",mktime(13,0,0,1,1,2000)) . "</label>\n";
+ echo "<label><input name=\"area_morning_ampm\" type=\"radio\"
value=\"pm\" onClick=\"changeSelect(this.form)\" $checked>" .
+ utf8_strftime($strftime_format['ampm'],
mktime(13,0,0,1,1,2000)) .
+ "</label>\n";
echo "</div>\n";
}
?>
@@ -947,9 +951,13 @@
{
echo "<div class=\"group ampm\">\n";
$checked = ($eveningends < 12) ? "checked=\"checked\"" : "";
- echo " <label><input name=\"area_evening_ampm\" type=\"radio\"
value=\"am\" onClick=\"changeSelect(this.form)\" $checked>" .
utf8_strftime("%p",mktime(1,0,0,1,1,2000)) . "</label>\n";
+ echo "<label><input name=\"area_evening_ampm\" type=\"radio\"
value=\"am\" onClick=\"changeSelect(this.form)\" $checked>" .
+ utf8_strftime($strftime_format['ampm'], mktime(1,0,0,1,1,2000))
.
+ "</label>\n";
$checked = ($eveningends >= 12) ? "checked=\"checked\"" : "";
- echo " <label><input name=\"area_evening_ampm\" type=\"radio\"
value=\"pm\" onClick=\"changeSelect(this.form)\" $checked>".
utf8_strftime("%p",mktime(13,0,0,1,1,2000)) . "</label>\n";
+ echo "<label><input name=\"area_evening_ampm\" type=\"radio\"
value=\"pm\" onClick=\"changeSelect(this.form)\" $checked>" .
+ utf8_strftime($strftime_format['ampm'],
mktime(13,0,0,1,1,2000)) .
+ "</label>\n";
echo "</div>\n";
}
echo "</div>\n";
Modified: mrbs/trunk/web/edit_entry.php
===================================================================
--- mrbs/trunk/web/edit_entry.php 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/edit_entry.php 2011-01-26 17:17:35 UTC (rev 1756)
@@ -57,7 +57,7 @@
// The $display parameter sets the display style of the <select>
function genslotselector($area, $prefix, $first, $last, $time,
$display="block")
{
- global $twentyfourhour_format, $periods;
+ global $periods;
$html = '';
// Get the settings for this area. Note that the variables below are
@@ -82,7 +82,7 @@
}
else
{
- $format = ($twentyfourhour_format) ? "%H:%M" : "%l:%M %P";
+ $format = hour_min_format();
}
$html .= "<select style=\"display: $display\" id =
\"${prefix}seconds${area['id']}\" name=\"${prefix}seconds\"
onChange=\"adjustSlotSelectors(this.form)\"$disabled>\n";
for ($t = $first; $t <= $last; $t = $t + $resolution)
Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/functions.inc 2011-01-26 17:17:35 UTC (rev 1756)
@@ -413,6 +413,8 @@
// and partly because it's easier to do this for the non-JavaScript version.
function genDateSelector($prefix, $day, $month, $year, $form_id='')
{
+ global $strftime_format;
+
// Make sure we've got a date
if (empty($day) or empty($month) or empty($year))
{
@@ -452,7 +454,7 @@
echo "<select name=\"${prefix}month\">\n";
for ($i = 1; $i <= 12; $i++)
{
- $m = utf8_strftime("%b", mktime(0, 0, 0, $i, 1, $year));
+ $m = utf8_strftime($strftime_format['mon'], mktime(0, 0, 0, $i, 1,
$year));
echo "<option value=\"$i\"" . ($i == $month ? " selected=\"selected\"" :
"") . ">$m</option>\n";
}
echo "</select>\n";
@@ -716,7 +718,10 @@
// Get the local day name based on language. Note 2000-01-02 is a Sunday.
function day_name($daynumber)
{
- return utf8_strftime("%A", mktime(0,0,0,1,2+$daynumber,2000));
+ global $strftime_format;
+
+ return utf8_strftime($strftime_format['dayname'],
+ mktime(0,0,0,1,2+$daynumber,2000));
}
// Returns a list of repeat days as a string (eg "Thursday Friday")
@@ -742,20 +747,21 @@
function hour_min_format()
{
- global $twentyfourhour_format;
+ global $twentyfourhour_format, $strftime_format;
+
if ($twentyfourhour_format)
{
- return "%H:%M";
+ return $strftime_format['time24'];
}
else
{
- return "%I:%M%p";
+ return $strftime_format['time12'];
}
}
function period_date_string($t, $mod_time=0)
{
- global $periods;
+ global $periods, $strftime_format;
$time = getdate($t);
$p_num = $time["minutes"] + $mod_time;
@@ -767,9 +773,9 @@
{
$p_num = count($periods ) - 1;
}
- // I have made the separater a ',' as a '-' leads to an ambiguious
+ // I have made the separator a ',' as a '-' leads to an ambiguious
// display in report.php when showing end times.
- return array($p_num, $periods[$p_num] . utf8_strftime(", %A %d %B %Y",$t));
+ return array($p_num, $periods[$p_num] . utf8_strftime(", " .
$strftime_format['day'], $t));
}
function period_time_string($t, $mod_time=0)
@@ -791,15 +797,15 @@
function time_date_string($t)
{
- global $twentyfourhour_format;
+ global $twentyfourhour_format, $strftime_format;
if ($twentyfourhour_format)
{
- return utf8_strftime("%H:%M:%S - %A %d %B %Y",$t);
+ return utf8_strftime($strftime_format['datetime24'], $t);
}
else
{
- return utf8_strftime("%I:%M:%S%p - %A %d %B %Y",$t);
+ return utf8_strftime($strftime_format['datetime12'], $t);
}
}
Modified: mrbs/trunk/web/functions_mail.inc
===================================================================
--- mrbs/trunk/web/functions_mail.inc 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/functions_mail.inc 2011-01-26 17:17:35 UTC (rev 1756)
@@ -102,7 +102,7 @@
*/
function getMailPeriodDateString($t, $mod_time=0)
{
- global $periods;
+ global $periods, $strftime_format;
//
$time = getdate($t);
$p_num = $time['minutes'] + $mod_time;
@@ -116,7 +116,7 @@
$mailperiod = $periods[$p_num];
$mailperiod = mrbs_entity_decode($mailperiod, ENT_COMPAT,
get_mail_charset());
$mailperiod = strip_tags($mailperiod);
- return array($p_num, $mailperiod . strftime(", %A %d %B %Y",$t));
+ return array($p_num, $mailperiod . strftime(", " . $strftime_format['date'],
$t));
}
// }}}
@@ -131,22 +131,22 @@
*/
function getMailTimeDateString($t, $inc_time=TRUE)
{
- global $twentyfourhour_format;
+ global $twentyfourhour_format, $strftime_format;
if ($inc_time)
{
if ($twentyfourhour_format)
{
- return mail_strftime("%H:%M:%S - %A %d %B %Y",$t);
+ return mail_strftime($strftime_format['datetime24'], $t);
}
else
{
- return mail_strftime("%I:%M:%S%p - %A %d %B %Y",$t);
+ return mail_strftime($strftime_format['datetime12'], $t);
}
}
else
{
- return mail_strftime("%A %d %B %Y",$t);
+ return mail_strftime($strftime_format['date'], $t);
}
}
Modified: mrbs/trunk/web/functions_view.inc
===================================================================
--- mrbs/trunk/web/functions_view.inc 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/functions_view.inc 2011-01-26 17:17:35 UTC (rev 1756)
@@ -38,6 +38,7 @@
{
global $enable_periods, $confirmation_enabled, $approval_enabled;
global $is_private_field, $standard_fields, $typel;
+ global $strftime_format;
// Get the duration if we haven't got it already
if (!isset($data['duration']))
@@ -194,7 +195,10 @@
$tbody .= create_details_row(get_vocab("rep_rep_day"),
get_rep_day_list($data['rep_opt']), $as_html);
}
// Repeat end date
- $tbody .= create_details_row(get_vocab("rep_end_date"), utf8_strftime('%A
%d %B %Y',$data['end_date']), $as_html);
+ $tbody .= create_details_row(get_vocab("rep_end_date"),
+ utf8_strftime($strftime_format['date'],
+ $data['end_date']),
+ $as_html);
}
$tbody .= ($as_html) ? "</tbody>\n" : "";
Modified: mrbs/trunk/web/help.php
===================================================================
--- mrbs/trunk/web/help.php 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/help.php 2011-01-26 17:17:35 UTC (rev 1756)
@@ -15,7 +15,9 @@
echo "<tr><td><a href=\"http://mrbs.sourceforge.net\">" . get_vocab("mrbs") .
"</a>:</td><td>" . get_mrbs_version() . "</td></tr>\n";
echo "<tr><td>" . get_vocab("database") . ":</td><td>" . sql_version() .
"</td></tr>\n";
echo "<tr><td>" . get_vocab("system") . ":</td><td>" . php_uname() .
"</td></tr>\n";
-echo "<tr><td>" . get_vocab("servertime") . ":</td><td>" . utf8_strftime("%c",
time()) . "</td></tr>\n";
+echo "<tr><td>" . get_vocab("servertime") . ":</td><td>" .
+ utf8_strftime($strftime_format['datetime'], time()) .
+ "</td></tr>\n";
echo "<tr><td>PHP:</td><td>" . phpversion() . "</td></tr>\n";
echo "</table>\n";
Modified: mrbs/trunk/web/internalconfig.inc.php
===================================================================
--- mrbs/trunk/web/internalconfig.inc.php 2011-01-26 16:12:45 UTC (rev
1755)
+++ mrbs/trunk/web/internalconfig.inc.php 2011-01-26 17:17:35 UTC (rev
1756)
@@ -34,6 +34,10 @@
{
$mail_settings['on_delete'] = ($mail_settings['admin_on_delete']) ? TRUE :
FALSE;
}
+if (!empty($dateformat))
+{
+ $strftime_format['daymonth'] = "%d %b";
+}
/********************************************************
Modified: mrbs/trunk/web/language.inc
===================================================================
--- mrbs/trunk/web/language.inc 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/language.inc 2011-01-26 17:17:35 UTC (rev 1756)
@@ -720,10 +720,10 @@
// %p doesn't actually work in some locales, we have to patch it up ourselves
if (preg_match('/%p/', $format))
{
- $ampm = strftime('%p', $time);
+ $ampm = strftime('%p', $time); // Don't relace the %p with the
$strftime_format variable!!
if ($ampm == '')
{
- $ampm = date('a',$time);
+ $ampm = date('a', $time);
}
$format = preg_replace('/%p/', $ampm, $format);
Modified: mrbs/trunk/web/mincals.inc
===================================================================
--- mrbs/trunk/web/mincals.inc 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/mincals.inc 2011-01-26 17:17:35 UTC (rev 1756)
@@ -91,13 +91,13 @@
function getFirstDays()
{
- global $weekstarts;
+ global $weekstarts, $strftime_format;
$basetime = mktime(12,0,0,6,11+$weekstarts,2000);
for ($i = 0, $s = ""; $i < 7; $i++)
{
$show = $basetime + ($i * 24 * 60 * 60);
- $fl = utf8_strftime('%a',$show);
+ $fl = utf8_strftime($strftime_format['dayname_cal'], $show);
// add a class if it's a hidden day so that we can apply special
styling
if (is_hidden_day(($i + $weekstarts) % 7))
{
@@ -115,10 +115,9 @@
{
global $weekstarts;
global $PHP_SELF;
- global $day;
- global $month;
- global $year;
+ global $day, $month, $year;
global $mincals_week_numbers;
+ global $strftime_format;
if (!isset($weekstarts)) $weekstarts = 0;
$s = "";
@@ -156,7 +155,7 @@
$date = mktime(12, 0, 0, $this->month, 1, $this->year);
$first = (strftime("%w",$date) + 7 - $weekstarts) % 7; // day number of
the first day of the month
- $monthName = utf8_strftime("%B",$date);
+ $monthName = utf8_strftime($strftime_format['month_cal'], $date);
//$prevMonth = $this->getCalendarLink($this->month - 1 > 0 ?
$this->month - 1 : 12, $this->month - 1 > 0 ? $this->year : $this->year - 1);
//$nextMonth = $this->getCalendarLink($this->month + 1 <= 12 ?
$this->month + 1 : 1, $this->month + 1 <= 12 ? $this->year : $this->year + 1);
Modified: mrbs/trunk/web/month.php
===================================================================
--- mrbs/trunk/web/month.php 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/month.php 2011-01-26 17:17:35 UTC (rev 1756)
@@ -120,7 +120,7 @@
// Show Month, Year, Area, Room header:
echo "<div id=\"dwm\">\n";
-echo "<h2>" . utf8_strftime("%B %Y", $month_start)
+echo "<h2>" . utf8_strftime($strftime_format['monthyear'], $month_start)
. " - " . htmlspecialchars("$this_area_name - $this_room_name") . "</h2>\n";
echo "</div>\n";
Modified: mrbs/trunk/web/mrbs_sql.inc
===================================================================
--- mrbs/trunk/web/mrbs_sql.inc 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/mrbs_sql.inc 2011-01-26 17:17:35 UTC (rev 1756)
@@ -18,8 +18,8 @@
function mrbsCheckFree($room_id, $starttime, $endtime, $ignore, $repignore)
{
global $tbl_entry;
- global $enable_periods;
- global $periods;
+ global $enable_periods, $periods, $twentyfourhour_format;
+ global $strftime_format;
$user = getUserName();
// Select any meetings which overlap ($starttime,$endtime) for this room:
@@ -63,12 +63,12 @@
if ($enable_periods)
{
$p_num =$starts['minutes'];
- $startstr = utf8_strftime('%A %d %B %Y, ',
+ $startstr = utf8_strftime($strftime_format['date'] . ", ",
$row['start_time']) . $periods[$p_num];
}
else
{
- $startstr = utf8_strftime('%A %d %B %Y %H:%M:%S',
+ $startstr = utf8_strftime(($twentyfourhour_format) ?
$strftime_format['datetime24'] : $strftime_format['datetime12'],
$row['start_time']);
}
Modified: mrbs/trunk/web/report.php
===================================================================
--- mrbs/trunk/web/report.php 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/report.php 2011-01-26 17:17:35 UTC (rev 1756)
@@ -30,42 +30,14 @@
define('APPROVED_BOTH', 2); // Can be anything other than 0 or 1
-function date_time_string($t)
-{
- global $twentyfourhour_format;
- if ($twentyfourhour_format)
- {
- $timeformat = "%H:%M:%S";
- }
- else
- {
- $timeformat = "%I:%M:%S%p";
- }
- return utf8_strftime("%A %d %B %Y ".$timeformat, $t);
-}
-
-function hours_minutes_seconds_format()
-{
- global $twentyfourhour_format;
-
- if ($twentyfourhour_format)
- {
- $timeformat = "%H:%M:%S";
- }
- else
- {
- $timeformat = "%I:%M:%S%p";
- }
- return $timeformat;
-}
-
// Convert a start time and end time to a plain language description.
// This is similar but different from the way it is done in view_entry.
function describe_span($starts, $ends)
{
- global $twentyfourhour_format;
- $start_date = utf8_strftime('%A %d %B %Y', $starts);
- $start_time = utf8_strftime(hours_minutes_seconds_format(), $starts);
+ global $twentyfourhour_format, $strftime_format;
+
+ $start_date = utf8_strftime($strftime_format['date'], $starts);
+ $start_time = utf8_strftime(hour_min_format(), $starts);
$duration = $ends - $starts;
if ($start_time == "00:00:00" && $duration == 60*60*24)
{
@@ -90,12 +62,13 @@
// date/time of an entry
function start_to_end($starts, $ends)
{
- global $twentyfourhour_format;
- $start_date = utf8_strftime('%A %d %B %Y', $starts);
- $start_time = utf8_strftime(hours_minutes_seconds_format(), $starts);
+ global $twentyfourhour_format, $strftime_format;
+
+ $start_date = utf8_strftime($strftime_format['date'], $starts);
+ $start_time = utf8_strftime(hour_min_format(), $starts);
- $end_date = utf8_strftime('%A %d %B %Y', $ends);
- $end_time = utf8_strftime(hours_minutes_seconds_format(), $ends);
+ $end_date = utf8_strftime($strftime_format['date'], $ends);
+ $end_time = utf8_strftime(hour_min_format(), $ends);
return $start_date . " " . $start_time . " - " . $end_date . " " . $end_time;
}
@@ -215,13 +188,14 @@
global $csv_row_sep;
global $custom_fields, $field_natures, $field_lengths, $tbl_entry;
global $approval_somewhere, $confirmation_somewhere;
+ global $strftime_format;
// Initialise the line for CSV reports
$line = "";
// Display Area/Room, but only when it changes:
$area_room = $row['area_name'] . " - " . $row['room_name'];
- $date = utf8_strftime("%d-%b-%Y", $row['start_time']);
+ $date = utf8_strftime($strftime_format['date'], $row['start_time']);
// entries to be sorted on area/room
echo $output_as_csv ? '' : "<div class=\"div_report\">\n";
@@ -437,13 +411,13 @@
// Last updated:
if ($output_as_csv)
{
- $line = csv_row_add_value($line, date_time_string($row['last_updated']));
+ $line = csv_row_add_value($line, time_date_string($row['last_updated']));
}
else
{
echo "<tr>\n";
echo "<td>" . get_vocab("lastupdate") . ":</td>\n";
- echo "<td>" . date_time_string($row['last_updated']) . "</td>\n";
+ echo "<td>" . time_date_string($row['last_updated']) . "</td>\n";
echo "</tr>\n";
}
Modified: mrbs/trunk/web/systemdefaults.inc.php
===================================================================
--- mrbs/trunk/web/systemdefaults.inc.php 2011-01-26 16:12:45 UTC (rev
1755)
+++ mrbs/trunk/web/systemdefaults.inc.php 2011-01-26 17:17:35 UTC (rev
1756)
@@ -298,6 +298,26 @@
// in 24 hour format
$twentyfourhour_format = 1;
+// Formats used for dates and times. For formatting options
+// see http://php.net/manual/function.strftime.php
+$strftime_format['date'] = "%A %d %B %Y"; // Used in Day view
+$strftime_format['dayname'] = "%A"; // Used in Month view and
edit_entry form
+$strftime_format['dayname_cal'] = "%a"; // Used in mini calendars
+$strftime_format['month_cal'] = "%B"; // Used in mini calendars
+$strftime_format['mon'] = "%b"; // Used in date selectors
+$strftime_format['ampm'] = "%p";
+$strftime_format['time12'] = "%I:%M%p"; // 12 hour clock
+$strftime_format['time24'] = "%H:%M"; // 24 hour clock
+$strftime_format['datetime'] = "%c"; // Used in Help
+$strftime_format['datetime12'] = "%I:%M:%S%p - %A %d %B %Y"; // 12 hour
clock
+$strftime_format['datetime24'] = "%H:%M:%S - %A %d %B %Y"; // 24 hour
clock
+// If you prefer dates as "10 Jul" instead of "Jul 10" ($dateformat = TRUE in
+// MRBS 1.4.5 and earlier) then use
+// $strftime_format['daymonth'] = "%d %b";
+$strftime_format['daymonth'] = "%b %d"; // Used in trailer
+$strftime_format['monyear'] = "%b %Y"; // Used in trailer
+$strftime_format['monthyear'] = "%B %Y"; // Used in Month view
+
// Whether or not to display the timezone
$display_timezone = FALSE;
Modified: mrbs/trunk/web/trailer.inc
===================================================================
--- mrbs/trunk/web/trailer.inc 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/trailer.inc 2011-01-26 17:17:35 UTC (rev 1756)
@@ -60,7 +60,7 @@
{
$ctime = mktime(0, 0, 0, $month, $day + $i, $year);
- $str = utf8_strftime(empty($dateformat)? "%b %d" : "%d %b", $ctime);
+ $str = utf8_strftime($strftime_format['daymonth'], $ctime);
$class = "";
$cyear = date("Y", $ctime);
@@ -142,7 +142,7 @@
}
else
{
- $str = utf8_strftime(empty($dateformat)? "%b %d" : "%d %b", $ctime);
+ $str = utf8_strftime($strftime_format['daymonth'], $ctime);
}
if ($i == 0)
{
@@ -169,7 +169,7 @@
for ($i = -2; $i <= 6; $i++)
{
$ctime = mktime(0, 0, 0, $month + $i, 1, $year);
- $str = utf8_strftime("%b %Y", $ctime);
+ $str = utf8_strftime($strftime_format['monyear'], $ctime);
$cmonth = date("m", $ctime);
$cyear = date("Y", $ctime);
Modified: mrbs/trunk/web/week.php
===================================================================
--- mrbs/trunk/web/week.php 2011-01-26 16:12:45 UTC (rev 1755)
+++ mrbs/trunk/web/week.php 2011-01-26 17:17:35 UTC (rev 1756)
@@ -241,15 +241,7 @@
echo "<thead>\n";
$header = "<tr>\n";
-if (empty($dateformat))
-{
- $dformat = "%a<br>%b %d";
-}
-else
-{
- $dformat = "%a<br>%d %b";
-}
-
+$dformat = "%a<br>" . $strftime_format['daymonth'];
// If we've got a table with times along the top then put everything on the
same line
// (ie replace the <br> with a space). It looks slightly better
if ($times_along_top)
@@ -308,7 +300,7 @@
{
// These days are to be hidden in the display (as they are hidden, just
give the
// day of the week in the header row
- $header .= "<th class=\"hidden_day\">" . utf8_strftime('%a', $t) .
"</th>\n";
+ $header .= "<th class=\"hidden_day\">" .
utf8_strftime($strftime_format['dayname_cal'], $t) . "</th>\n";
}
else
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits