Ignore:
Timestamp:
Jan 12, 2011, 2:41:55 PM (13 years ago)
Author:
plg
Message:

feature 2103 added: week may start on sunday/monday in the monthly calendar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/calendar_monthly.class.php

    r6363 r8626  
    331331function build_month_calendar(&$tpl_var)
    332332{
    333   global $page;
     333  global $page, $lang, $conf;
    334334
    335335  $query='SELECT '.pwg_db_get_dayofmonth($this->date_field).' as period,
     
    369369    $items[$day]['height'] = $row['height'];
    370370    $items[$day]['dow'] = $row['dow'];
    371   }
    372 
    373   global $lang, $conf;
     371
     372    if ('sunday' == $conf['week_starts_on'])
     373    {
     374      $items[$day]['dow']++;
     375    }
     376  }
    374377
    375378  if ( !empty($items)
     
    396399      $first_day_dow -= 1;
    397400    }
    398     array_push( $wday_labels, array_shift($wday_labels) );
     401
     402    if ('monday' == $conf['week_starts_on'])
     403    {
     404      array_push( $wday_labels, array_shift($wday_labels) );
     405    }
    399406    // END - pass now in week starting Monday
    400407
Note: See TracChangeset for help on using the changeset viewer.