On Fri, 6 Aug 2004, Daisuke Maki wrote: > I'd prefer being able to pass a formatter: > > http://marc.theaimsgroup.com/?l=perl-datetime&m=108995979225140&w=2 > > Then if your formatter supports strftime notation, you could just do > > my $dt = DateTime->new( ..., > formatter => My::Formatter->new(pattern => $strftime_pattern) > ); > > print "$dt\n"; > > This has a significant advantage for non-English users who just want > their DT objects magically appear in the format of their choice... > > (Although, now that I think about it this raises a problem with cyclic > dependencies between DateTime and the default formatter (presumably > DT::F::Strptime)
There's really no huge problem. DateTime.pm would just have to skip the relevant tests if a given formatter wasn't installed. Since this would be an optional feature, it'd be okay, I think. Anyway, patches are still welcome. I don't really need this, so I don't think I'll be implementing it myself any time soon ;) -dave /*======================= House Absolute Consulting www.houseabsolute.com =======================*/
