home bbs files messages ]

Just a sample of the Echomail archive

Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.

   PERL      Support for the Perl scripting language      79 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9 of 79   
   Maurice Kinal to Jame Clay   
   Perl & FTN   
   07 Jul 11 15:13:56   
   
   Hey Jame!   
      
    JC> the localtime function itself returns it as a zero based integer   
      
   You're right.  I never noticed that before.  Everything I have ever used   
   relating to dating has months numbered from 1 to 12.  Mind you I haven't   
   used Perl all that much and when I have it looked more like a shell   
   script.  Live and learn eh?   
      
    JC> a zero based index is just as valid as a 1 based index   
      
   I'll have to take your word on that.  Everything I have ever used up to   
   this point in time has been 1 based relating to months.  I'll have to   
   check (again) if Posix time in Perl behaves like localtime.  According   
   to the DateTime module;   
      
     $month  = $dt->month;          # 1-12   
      
   so it appears that the posix modules in Perl follow the 1 based index   
   which explains why I was under the impression it was a universal   
   standard given that the DateTime module uses 'time' which is a Perl   
   posix function (number of seconds since the epoch) and resembles   
   coreutils' date which is what I am most familiar with.    
      
    JC> If you or anyone else do find such issues, please comment on it,   
    JC> preferably in the PERL echo   
      
   :-)   
      
   Turns out that I was wrong.  I think I'll stick with bash scripting.   
      
   Life is good,   
   Maurice   
      
   --- VIM - Vi IMproved 7.3 on x86_64-core2-linux-gnu   
    * Origin: Pointy Stick Society (1:261/38.9)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca