Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1526
Modified Files:
serendipity_functions.inc.php
Log Message:
Yeah, okay... so saturday is day 6, not day 7... gah!
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.220
retrieving revision 1.221
diff -u -d -r1.220 -r1.221
--- serendipity_functions.inc.php 27 Feb 2004 20:04:59 -0000 1.220
+++ serendipity_functions.inc.php 27 Feb 2004 20:15:02 -0000 1.221
@@ -319,16 +319,13 @@
$nrOfDays = date('t', $ts);
$firstDayWeekDay = date('w', $ts);
- // Hack if the selected first day is sunday, then we move it to the last day of the week
- if ( $firstDayWeekDay == 0 ) {
- $firstDayWeekDay = 6;
- }
-
// Calculate the first day of the week, based on the beginning of the week ($bow)
if ( $bow > $firstDayWeekDay ) {
$firstDayWeekDay = $firstDayWeekDay+7-$bow;
- } else {
+ } elseif ( $bow < $firstDayWeekDay ) {
$firstDayWeekDay = $firstDayWeekDay-$bow;
+ } else {
+ $firstDayWeekDay = 0;
}
// Calculate the number of next/previous month
|