[pLog-svn] firstDayOfWeek

Oscar Renalias oscar at renalias.net
Wed May 24 07:40:22 GMT 2006


I agree. I never liked the current approach but since nobody complained... :-)

Can you research whether there is any way to guess the first day of
the week based on the contents of the locale file? If not possible,
let's consider adding a new field to the locale file that says which
is the first day of the week. To make it backwards compatible, let's
assume Monday is the first day of the week unless otherwise specified.

Oscar

On 5/23/06, Jon Daley <plogworld at jon.limedaley.com> wrote:
> Is there a way for this function to not have a hard-coded case statement,
> but instead use the locale file?  I encourage people to not edit their
> locale files, but instead make a locale_en_JD.class.php that include
> locale_en_US.class.php for easier upgrading, but due to this function, the
> calendar is broken, even though the locale file specifies the order of the
> days.
>
> Oscar says here:
> http://forums.lifetype.net/viewtopic.php?t=2231
>
> that you can just modify the locale file, but I think isn't true?
>
>
>          function firstDayOfWeek()
>          {
>              switch($this->getCountryId()) {
>                  case "US":
>                  case "AU":
>                  case "IE":
>                  case "UK": $day = 0; break;
>                  default: $day = 1; break;
>              }
>
>              return $day;
>          }
>
>
> **************************************
> Jon Daley
> http://jon.limedaley.com/
>
> I was taking pictures of a five-year-old boy and remarked,
> "You have the nicest eyes.  Where did you get them?"
> He looked at me blankly and said, "They came with my head."
> -- Brenda Hord
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>


More information about the pLog-svn mailing list