Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the DateTime CPAN distribution.

Report information
The Basics
Id: 6981
Status: resolved
Priority: 0/
Queue: DateTime

People
Owner: DROLSKY [...] cpan.org
Requestors: schwern [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 0.23



Subject: Default stringification format
Its really important that date objects masquarade well as strings so you don't have to redesign your whole interface when you introduce them. DateTime currently only stringifies as an ISO8601 date. This is limiting. To get it in any other format you have to drop down to a plain string which sorta defeats the point. DateTime should have a default_format() method that takes a strftime pattern. This is the format it will use when stringifing. I'm writing a subclass that does this for my own purposes. Let me know if you think its a good idea and want a patch.