Darren Duncan wrote:
Philip Kime wrote:
Greetings,
I can't seem to find a DateTime::Format module which will leave
day/month undef if I pass just a year like "2008". When parsing
bibliographies, it's important to be able to distinguish between, say
2008
2008-01
2008-01-01
Every module I've found sets the day or month to "1" if it's not in
the input which makes it impossible to tell if there really is a
day/month in the input without parsing the input (which makes using a
DateTime::Format module pointless ...). Is there a way to do this? I
know about DateTime::Incomplete but that doesn't parse dates, you have
to have already split the date up to pass to it ...
It seems that all of the DateTime::Format::* modules parse into
DateTime objects which always default day/month to "1".
I understand your pain, which is felt by users of any program that
insists on shoehorning dates into year-month-day and won't let you
specify the level of accuracy that you actually know.
Have you seen DateTime::Incomplete which may be what you want?
Sorry, you already mentioned DateTime::Incomplete as known. I have no further
suggestions for now. But any systems that I make in the future will support
incomplete dates. -- Darren Duncan