develooper Front page | perl.datetime | Postings from January 2003

Dates and epochs (was: Re: Picking up the ball)

Thread Next
From:
Aaron Sherman
Date:
January 31, 2003 08:40
Subject:
Dates and epochs (was: Re: Picking up the ball)
Message ID:
1044027393.2095.116.camel@localhost.localdomain
Sorry for the delay. Just caught this off of "use Perl;"

One thing to keep in mind: the only thing I (and most people whose code
I maintain) want out of date parsing 9 times out of 10 is:

	$date = <$fh>;
	$something = Some::Thing->new($date);
	$tomorrow = $something->tomorrow;
	$file = strftime("file.%Y%m%d",$tomorrow->coretime);

This is a contrived and silly example, but the points I think it gets
across are:

	* Many features (e.g. strftime) are good, and already exist
	* Simple data manipulation is most common
	* Conversion to core time (POSIX epoch) should always be easy

If those guidelines are adhered to, I'm all for the change! Thanks!

-- 
Aaron Sherman <ajs@ajs.com>
This message granted to the Public Domain in 2023.
Fight the DMCA and copyright extension!



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