Re: Discarding some fifteen functions/methods in favour of an enhanced strftime

2003-01-12 Thread Matthew Simon Cavalletto
On January 12, 2003, at 07:29 AM, Antonios Christofides wrote:


Get rid of the methods/functions returning year, month, day of week, 
day of month, day of year, hour, minute, second, week of year, week of 
month, whatever, and use an enhanced strftime [...]

This enhanced strftime is a very nice interface, in line with Perl 
idiom, and should be easy to add to the code, but I think eliminating 
the standalone methods is going to sharply reduce user acceptance of 
the new module.

# Change the hour to 17
datetime_object - strptime('%Y-%m-%d %H:%M:%S',
   datetime_object - strftime('%Y', '%m', '%d', '17', '%M', 
%S'));

Ick. That's clearly not as nice as just saying $dt-hour(17).

-Simon




Re: Discarding some fifteen functions/methods in favour of an enhanced strftime

2003-01-12 Thread Dave Rolsky
On Sun, 12 Jan 2003, Matthew Simon Cavalletto wrote:

 Ick. That's clearly not as nice as just saying $dt-hour(17).

Whether this method is an updater is an entirely different can of worms ;)


-dave

/*===
House Absolute Consulting
www.houseabsolute.com
===*/