On Fri, 31 Jan 2003, Aaron Sherman wrote:
> 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);
Depends on what date is. If it's an epoch:
$something = DateTime->from_epoch( epoch => $date );
> $tomorrow = $something->tomorrow;
$something->add( days => 1 );
> $file = strftime("file.%Y%m%d",$tomorrow->coretime);
$file = $tomorrow->strftime( 'File.%Y%m%d' );
> * Many features (e.g. strftime) are good, and already exist
I agree
> * Simple data manipulation is most common
Also agreed
> * Conversion to core time (POSIX epoch) should always be easy
It's easy, but using epochs is not encouraged, since you cannot represent
a very wide range of datetimes with epoch format, at least on 32 bit
machines.
-dave
/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/