>The simple way, in REBOL, to convert the day-of-week integers, 0 to 6, to
the corresponding strings, >Sunday, Monday, etc is to create the block
>dowdb: [0 "Sunday" 1 "Monday" 2 "Tuesday" 3 "Wednesday" 4 "Thursday" 5
"Friday" 6 "Saturday"]

>then select dowdb 1 returns "Monday", etc.



now/weekday returns a number in range 1 to 7

So here is the code to retrive the name of today :
>> select [1 "Monday" 2 "Tuesday" 3 "Wednesday" 4 "Thursday" 5 "Friday" 6
"Saturday" 7 "Sunda
y" ] now/weekday
== "Sunday"


Talking about dates, I posted yesterday to-gmt.r on rebol.org (it seems it
is not yet published).


Olivier

Reply via email to