> TJ> The month and day indices should stay zero since they are array > TJ> indices. The manual will reflect this. > > [rspier@localhost rspier]$ perl -wle 'print +(localtime)[3] ' > 31 > > To what index do you refer? > > month days are currently 1 based. > > _consistency_ would be nice, C be dammed. Yes. Sorry. Perusing the docs, months start at zero, days start at 1 and years start at year-1900. Mainly because you never use day as an array index of course... > > I propose "consistency" as a "goal". > Yes. > (Consistent with what? With itself.) > And the manual will reflect _everything_. If it's not documented, it > might as well not exist. Agreed. The localtime() docs suffer from a 'read the C manual' problem at the moment.... -- Tim Jenness JCMT software engineer/Support scientist http://www.jach.hawaii.edu/~timj
- Re: formats and localtime Matthew Persico
- Re: formats and localtime Bryan C . Warnock
- Re: formats and localtime Dan Sugalski
- Re: formats and localtime Simon Cozens
- Re: formats and localtime Matthew Persico
- Re: formats and localtime Chaim Frenkel
- Re: formats and localtime Damian Conway
- Re: formats and localtime Nathan Wiger
- Re: formats and localtime Tim Jenness
- Re: formats and localtime Robert Spier
- Re: formats and localtime Tim Jenness
- Re: formats and localtime Randal L. Schwartz
- Re: formats and localtime Tim Bunce
- Re: formats and localtime Nathan Wiger
- Re: formats and localtime Chaim Frenkel
- Re: formats and localtime Nathan Torkington
- Re: formats and localtime Larry Wall
- Re: formats and localtime Chaim Frenkel
- Re: formats and localtime Matthew Persico
- Re: formats and localtime Dan Sugalski
- Re: formats and localtime Damian Conway