weekdaynames

Pete pete at mollysrevenge.com
Fri Apr 15 11:52:29 EDT 2011


Not sure about other platforms but the Mac lets you set the first day of the
week in user preferences so I guess the most flexible thing to do would be
to get hold of that setting and use it as a reference point.

Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Fri, Apr 15, 2011 at 7:48 AM, zryip theSlug <zryip.theslug at gmail.com>wrote:

> On Fri, Apr 15, 2011 at 4:14 PM, Klaus on-rev <klaus at major.on-rev.com>
> wrote:
> > Hi all,
> >
> > when I query "the weekdaynames" I get
> > Sunday
> > Monday
> > Tuesday
> > etc.
> >
> > When I query "the system weekdaynames" I get
> > Sonntag (Sunday)
> > Montag
> > Dienstag
> > ...
> >
> > But in germany the first day of week is MONDAY?
> >
> > I am not sure if the function should also return the correct ORDER
> > of the system weekday names?
> >
> > This makes it extremely hard to scripts proper mulit-language support
> > in calendars etc...
> >
> > Or is this behaviour reliable?
> > I mean will I ALWAYS get this order, no matter what the current system
> > language is? Know what I mean?
> >
> > Any opinions?
>
> Hi Klaus,
>
> Same here.
>
> Here is the code I'm using for dealing with:
>
> function weekDayNamesList pFirstDayIsMonday
>    local tWeekdayNames
>
>    put the abbr system weekdayNames into tWeekdayNames
>    if pFirstDayIsMonday then
>          put cr & line 1 of tWeekdayNames after tWeekdayNames
>          delete line 1 of tWeekdayNames
>    end if
>
>    return tWeekDayNames
> end weekDayNamesList
>
>
> Best regards,
> --
> -Zryip TheSlug- wish you the best! 8)
> http://www.aslugontheroad.co.cc
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



More information about the use-livecode mailing list