On Fri, 30 May 2003, Ben Bennett wrote:

> The general structure of the page is quite likely to change (as are
> the question numbers).  I plan on adding more sections and reordering
> the existing questions, but I wanted to get feedback first.

It generally looks great.

> If people could propose additional questions for the FAQ (if you
> provide answers that would be even better), provide code
> suggestions and answer any QUESTIONs I have that would be fantastic.

First I'll pick some nits.

- Assume it will be hosted on datetime.perl.org, so you can skip the first
4 questions.

- Please don't use fixed number offsets for the time zone examples.  This
only encourages broken code when people do this in real apps when instead
they should use a named time zone.


Now to answer specific questions:

2.3: Why do I need to truncate dates?

QUESTION Is it worthwhile to add an optional resolution argument to
compare to allow easier usage?

Maybe.  My theory is that most people will take advantage of overloading
and just use Perl's built-in comparison operators.


2.4: What is the floating time zone?

QUESTION Should compare_ignore_floating take an optional timezone
argument? (See also the possible argument for resolution...)

I think the section of the floating time zone should have a big fat
warning that mixing floating time zones and real time zones is likely to
lead to a mess.  The floating time zone option exists for people who want
to "abstract" datetime stuff.  Mixing it with actual time zones, unless
you really understand why you're doing so, is bound to lead to trouble.

All of which doesn't answer your question, but the point is I don't want
to make mixing floating & non-floating so easy that people don't think
twice before doing so.


2.21: How can I calculate the last business day (payday!) of a month?

QUESTION: Do we do anything with business logic?

No, I'm waiting for someone to writing a DateTime::Business module.  Any
takers?


2.27: How can I calculate the difference in days between dates, but
without counting Saturdays and Sundays?

QUESTION: Is the best way to do this simply to make a DateTime::Set and
loop over it?

See above ;)




-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to