[Frontaccounting-cvs_updates] /hgroot/frontaccounting/frontaccounting: Prettier code in get_da...
Brought to you by:
frontaccounting,
itronics
From: FrontAccounting <fro...@us...> - 2013-02-25 15:33:42
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hgroot/frontaccounting/frontaccounting/rev/abd53c524e0e changeset: 3193:abd53c524e0e user: Joe Hunt <joe...@gm...> date: Mon Feb 25 16:32:49 2013 +0100 description: Prettier code in get_date_picker. Worked anyhow. diffstat: includes/ui/ui_view.inc | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diffs (74 lines): diff -r c4274a7a9793 -r abd53c524e0e includes/ui/ui_view.inc --- a/includes/ui/ui_view.inc Mon Feb 25 10:50:44 2013 +0100 +++ b/includes/ui/ui_view.inc Mon Feb 25 16:32:49 2013 +0100 @@ -845,7 +845,7 @@ $back = _("Back"); if ($date_system == 1) list($cyear, $cmon, $cday) = gregorian_to_jalali(date("Y"), date("n"), date("j")); - else if ($date_system == 2) + elseif ($date_system == 2) list($cyear, $cmon, $cday) = gregorian_to_islamic(date("Y"), date("n"), date("j")); @@ -966,7 +966,7 @@ $js .= " return [31,31,31,31,31,31,30,30,30,30,30,(((((((year - ((year > 0) ? 474 : 473)) % 2820) + 474) + 38) * 682) % 2816) < 682 ? 30 : 29)][month-1]; "; - else if ($date_system == 2) + elseif ($date_system == 2) $js .= " return [30,29,30,29,30,29,30,29,30,29,30,(((((11 * year) + 14) % 30) < 11) ? 30 : 29)][month-1]; "; @@ -999,7 +999,7 @@ Math.floor(((epyear * 682) - 110) / 2816) + (epyear - 1) * 365 + Math.floor(epbase / 2820) * 1029983 + (1948320.5 - 1); "; - else if ($date_system == 2) + elseif ($date_system == 2) $js .= " var t; t = Math.floor((11 * year + 3) / 30) + 354 * year + 30 * month - @@ -1053,11 +1053,11 @@ $js .= " var dateString = month+'$sep'+day+'$sep'+year; "; - else if ($how == 1 || $how == 4) + elseif ($how == 1 || $how == 4) $js .= " var dateString = day+'$sep'+month+'$sep'+year; "; - else if ($how == 2 || $how == 5) + elseif ($how == 2 || $how == 5) $js .= " var dateString = year+'$sep'+month+'$sep'+day; "; @@ -1187,25 +1187,25 @@ selectedDay = parseInt(dateParts[1],10); selectedYear = parseInt(dateParts[2],10); "; - else if ($how == 1) + elseif ($how == 1) $js .= " selectedDay = parseInt(dateParts[0],10); selectedMonth = parseInt(dateParts[1],10); selectedYear = parseInt(dateParts[2],10); "; - else if ($how == 2) + elseif ($how == 2) $js .= " selectedYear = parseInt(dateParts[0],10); selectedMonth = parseInt(dateParts[1],10); selectedDay = parseInt(dateParts[2],10); "; - else if ($how == 3) + elseif ($how == 3) $js .= " selectedDay = parseInt(dateParts[1],10); selectedMonth = parseInt(tmonths.indexOf(dateParts[0]),10); selectedYear = parseInt(dateParts[2],10); "; - else if ($how == 4) + elseif ($how == 4) $js .= " selectedDay = parseInt(dateParts[0],10); selectedMonth = parseInt(tmonths.indexOf(dateParts[1]),10); |