develooper Front page | perl.perl5.porters | Postings from July 2001

Re: [ID 20010702.001] localtime() returns incorrect day-in-the-year value

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
July 2, 2001 05:36
Subject:
Re: [ID 20010702.001] localtime() returns incorrect day-in-the-year value
Message ID:
200107021236.NAA29568@gizmo.fdgroup.co.uk
"Kenneth Tomiak" <Kenneth.Tomiak@Schunk-Associates.com> wrote:
> perl - Practical Extraction and Report Language
> Sunday July 1, 2001.
> localtime returned 181, but I know it is 182.

day-of-year is indexed from 0, not 1 (ie Jan 1st is day 0).
By my reckoning, Perl has got it right.

Dave M.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About