Dave, thanks for your reply.

* Dave Rolsky:
> The reason it's omitted is historical, though I can't remember
> why. I don't plan to change it now, since that'd be a pointless
> breaking of backwards compatibility.
>
> You can change the stringification, however. Search the DateTime.pm
> docs for "formatter".

The formatter functionality is indeed very useful and I'm already
using it in the view parts of the systems. But I'm afraid it wont
entirely solve my problem satisfactory.

To my understanding, the formatter can't be set globally as a
default. It must be set on every object. To rely on every object to
have set the formatter-attribute is too fragile in my case.

So if you don't want to change the default behavior or make it
configurable, I think the most robust solution for me is to make all
my systems use a module that redefines DateTime::_stringify().

If you are interested I can make a patch for DateTime that makes the
format configurable, in a way that don't break backwards
compatibility.

-- 
Kjell-Magne

Reply via email to