Getting the weekday name

Peter Haworth pete at mollysrevenge.com
Sat Nov 13 17:46:43 EST 2010


That sounds simpler!  I've never used convert and dateitems - what  
format would tdate have to be in?

Pete Haworth

On Nov 13, 2010, at 2:42 PM, Dick Kriesel wrote:

> On 11/13/10 1:44 PM, "Peter Haworth" <pete at mollysrevenge.com> wrote:
>
>> I'm using the datetimetoJulian function in Sarah's great datetime
>> stack as part of a way to get the alpha weekday name.  The words in
>> Sarah's stack say that it's possible to get the day number of the  
>> week
>> by taking the remainder of dividing the Julian days by 7 but when I  
>> do
>> that, I consistently get a day number that is 2 less than it should  
>> be
>> - that's assuming of course that day 1 would be Sunday.
>>
>> I can always just add 2 to the day number but wondering if anyone
>> knows why this would happen?
>>
>> Pete Haworth
>>
>
> Hi, Pete.  Might your task be easier using "dateItems" as this  
> example does?
>
> function dayOfWeek tDate
>   convert tDate to dateItems
>   return item last item of tDate of \
>          "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday"
> end dayOfWeek
>
> -- Dick
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list