why not just truncate down to the unit and then add one of the unit?
On Tuesday 24 October 2006 14:08, Eliot, Christopher wrote:
> I would like to be able to parse date / time strings that may be
> anything from just "2005" to "2005-07-13 14:03:21", and have the
> unspecified part be set by default. But I want it to default to later
> rather than earlier, i.e. "2005" would default to "2005-12-31 23:59:59";
> "2005-07-16" would default to "2005-07-16 23:59:59". I don't actually
> need to be able to handle incomplete time strings; I'll either have a
> complete time or not.
>
> Of course all the parsing facilities I've looked at that can handle
> incomplete specifications default in the downward (earlier) direction.
>
> I don't want to have to do my own parsing.
>
> Right now the package I'm working on uses Date::Manip because some
> earlier developer chose it; I'm not wedded to that. Well I am, but only
> with the lasting power of a typical marriage these days :-)
>
> Any suggestions?
>
> Thanks,
>
> Topher Eliot
> [EMAIL PROTECTED]
--
----------------------------------------------
Jason Thaxter GoMOOS
350 Commercial Street, Suite 308
Portland, ME 0410
Office: 207.773.0423
Tel: 207.228.1665
Email: [EMAIL PROTECTED]
----------------www.gomoos.org----------------