On Mon, 14 Jul 2003, Rick Measham wrote:
Maybe an example will explain why I want to have an undef DateTime:
print $natural-parse_datetime(Feb 29th, this year)
-set( day = 31 )
-add( days = 12)
-datetime;
Of course, this won't always work because:
1. the string Feb 29th
Rick Measham wrote:
Maybe an example will explain why I want to have an undef DateTime:
print $natural-parse_datetime(Feb 29th, this year)
-set( day = 31 )
-add( days = 12)
-datetime;
Yes, this makes sense to me - but I'm into functional programming.
I learned that
* Rick Measham ([EMAIL PROTECTED]) [14 Jul 2003 08:21]:
[...]
For example: It was 12 o'clock - we know from this the
hour, minute and second but have no idea of the day, month
or year.
Or whether it's noon or midnight.
cheers,
--
Iain.
I vote that you assume the next valid instance of the time (e.g. if
they say 4 o'clock and it is 11 PM now, assume 4AM of the following
day).
I believe this is what Date::Manip does and it seems to be reasonable
most of the time.
As another possibility (which is what I did with my obsolete
I'm working with DateTime::Format::Natural and I really need a time-only
object. In fact I need an object that lets me chose what I want to give
it.
Hi Rick,
I do agree with the need for the _ability_ to handle just times but
I don't think it's worth the hassle of another class to deal with.
Oh, and while we're at it, can there be any way to set an undefined
datetime object constructor:
$undef = DateTime-undef();
If Dave OKs this it should be a separate class. Probably DT::Undef.
It's kind of like an infinite +/- datetime only its .. non existant!
$dt $dt_inf; # always true
On Sun, 13 Jul 2003, Joshua Hoblitt wrote:
Oh, and while we're at it, can there be any way to set an undefined
datetime object constructor:
$undef = DateTime-undef();
If Dave OKs this it should be a separate class. Probably DT::Undef.
If Dave OKs? Does that ever happen.