First day of week: Monday

Author Message

Softriva .com

Saturday 17 June 2006 12:51:49 pm

in the aaa-AA.ini in share/locale directory there is a configuration key=value as:

MondayFirst=yes

With the above, First day of week is Monday. If

MondayFirst=no 

then First day of week: Sunday

In some countries the first day of the week is neither Monday nor Sunday. Is there away around this. I mean is there away to set the first day of the week to be different from Monday or Sunday.

Steven E. Bailey

Monday 19 June 2006 6:35:51 am

Looks like the MondayFirst is only used in lib/ezlocale/classes/ezlocale.php which has this defined:

        $this->DayNames = array( 0 => 'sun', 1 => 'mon', 2 => 'tue',
                                 3 => 'wed', 4 => 'thu', 5 => 'fri', 6 => 'sat' );

        $this->WeekDays = array( 0, 1, 2, 3, 4, 5, 6 );

Looks like you could hack WeekDays if you need a different start day. As in:

$this->WeekDays = array( 5, 6, 0, 1, 2, 3, 4 );

for a Friday start...

Of course, I haven't tested this and there may be a more elegant solution...

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.