| Msg # 35 of 79 on FPERL164, Sunday 1-14-12, 8:31 |
| From: JAME CLAY |
| To: MAURICE KINAL |
| Subj: Perl & FTN |
> Hey Jame! >> 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. I first noticed it because I found I had to take it into account when I rewrote a shell script using Date information as a Perl script. One of the many things that emphasized that reading the Man pages is a good thing... > 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? Indeed! > .... 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. So you're mostly coming from the shell scripting side of things? Jame --- BBBS/LiI v4.01 Flag * Origin: Rocasa BBS (1:120/546)
|