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