Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: REBOL Documentation Project and Minor Bug report

From: al:bri:xtra at: 27-Sep-2001 15:58

Paul asked:
> Ok. Information Request - Trying to give a summary of these sections of
the system object:
> /locale >> probe rebol/locale
make object! [ months: [ "January" "February" "March" "April" "May" "June" "July" "August" "September" "October" "November" "December" ] days: [ "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" Sunday ] ] /locale is an object! that contains locale-specific names for the months of the year ('month), and the days in each week ('days). The index of each name is exactly the same as the number returned by the appropriate refinement on date! values. For example:
>> now/date ; It's a Thursday.
== 27-Sep-2001
>> now/month
== 9
>> rebol/locale/months/9
== "September"
>> now/weekday
== 4
>> rebol/locale/days/4
== "Thursday" Note that this points out a name problem with /locale -- the word 'days in the /locale object should really be 'weekdays, so as to match with the refinement /weekday for date! values. 'probe rebol/locale should return: make object! [ months: [ "January" "February" "March" "April" "May" "June" "July" "August" "September" "October" "November" "December" ] weekdays: [ "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" Sunday ] ] where 'days has been replaced with 'weekdays. I've reported this to [feedback--rebol--com]. A suitable patch is: rebol/locale: make object! [ months: rebol/locale/months weekdays: rebol/locale/days ] Just place the above in %User.r. I hope that helps! Andrew Martin ICQ: 26227169