Make WordPress Core


Ignore:
Timestamp:
04/10/2005 08:07:46 PM (20 years ago)
Author:
ryan
Message:

Weekly archives fixes. http://mosquito.wordpress.org/view.php?id=1217

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r2525 r2526  
    8585    $weekday = date('w',$day);
    8686    $i = 86400;
     87
     88    if ($weekday < get_settings('start_of_week'))
     89        $weekday = 7 - (get_settings('start_of_week') - $weekday);
     90
    8791    while ($weekday > get_settings('start_of_week')) {
    8892        $weekday = date('w',$day);
     93        if ($weekday < get_settings('start_of_week'))
     94            $weekday = 7 - (get_settings('start_of_week') - $weekday);
     95
    8996        $day = $day - 86400;
    9097        $i = 0;
    9198    }
    9299    $week['start'] = $day + 86400 - $i;
    93     $week['end']   = $day + 691199;
     100    //$week['end']   = $day - $i + 691199;
     101    $week['end'] = $week['start'] + 604799;
    94102    return $week;
    95103}
Note: See TracChangeset for help on using the changeset viewer.