logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: First timer: lib/date/format.rb: msg#00006

Subject: Re: First timer: lib/date/format.rb
On Mon, Jun 19, 2006 at 01:20:46PM -0400, Mat Schaffer wrote:
>   #Mapping English day of the week names to numebers (reverse lookup for 
> DAYNAMES)

Spelling error ----------------------------------^

Also, doesn't DAYNAMES need to be +DAYNAMES+ for rdoc to make a link for
it to the docs for that constant? Perhaps my memory is failing, and rdoc
is smart enough to make the link.

>   #A list of common timezone abbreviations and their respective offset from 
> GMT in seconds.
>   ZONES = {
>     'ut'  =>  0*3600, 'gmt' =>  0*3600, 'est' => -5*3600, 'edt' => -4*3600,
...

Timezone abbreviations aren't even close to unique on this world, use of
the ZONES table is a terrible hack (IMNSHO).

Could I request that if you are putting in docs that you explicitly
caution users about the way this ZONES table is used, and the effect it
will have if, for example, you live in Australia or Brazil instead of
North America (EST)?

  http://en.wikipedia.org/wiki/Eastern_Standard_Time

Information about landmines in an API are particularly useful to users
of documentation, so if you have a bit more time to go through the code,
figure out what the effect of this magic handling of certain zone
abbreviations is, and can describe it in the API documentaion, I think
it would be very, very handy.

Thanks!
Sam





<Prev in Thread] Current Thread [Next in Thread>