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

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

Thread Next
Aaron Sherman
January 31, 2003 08:40
Dates and epochs (was: Re: Picking up the ball)
Message ID:
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 <>
This message granted to the Public Domain in 2023.
Fight the DMCA and copyright extension!

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About