Date and time functions are now more accurate. And events calendar allows for weeks starting with monday rather than sunday.

This commit is contained in:
JT Smith 2002-08-04 01:29:39 +00:00
parent 948667beaf
commit fa1f4145c5
4 changed files with 44 additions and 34 deletions

View file

@ -40,6 +40,7 @@ sub _calendarLayout {
$calendar->cellclass("tableData");
$calendar->todaycellclass("tableHeader");
$calendar->headerclass("tableHeader");
$calendar->mondayisfirstday($session{user}{firstDayOfWeek});
($start,$end) = monthStartEnd($_[1]);
$sth = WebGUI::SQL->read("select * from EventsCalendar_event where wobjectId=".$_[0]->get("wobjectId")." order by startDate,endDate");
while (%event = $sth->hash) {
@ -174,7 +175,8 @@ sub www_edit {
$output .= '<h1>'.WebGUI::International::get(12,$namespace).'</h1>';
$f = WebGUI::HTMLForm->new;
%hash = (list => WebGUI::International::get(17,$namespace),
calendar => WebGUI::International::get(18,$namespace));
calendarMonth => WebGUI::International::get(18,$namespace),
calendarMonthSmall => WebGUI::International::get(74,$namespace);
$f->select("calendarLayout",\%hash,WebGUI::International::get(16,$namespace),[$_[0]->get("calendarLayout")]);
$f->integer("paginateAfter",WebGUI::International::get(19,$namespace),$paginateAfter);
$f->yesNo("proceed",WebGUI::International::get(21,$namespace),$proceed);
@ -321,7 +323,7 @@ sub www_view {
$minDate = time();
$maxDate = time()+86400;
}
if ($_[0]->get("calendarLayout") eq "calendar") {
if ($_[0]->get("calendarLayout") eq "calendarMonth") {
$nextDate = $minDate;
while ($nextDate <= $maxDate) {
$row[$i] = _calendarLayout($_[0],$nextDate);