George T. Joseph wrote:
> I agree that 30D isn't always equal to 1M, I just don't know what to do
> about
> it.
[JBDP]  I think you have to accept that you can't transform months into days
and vice versa with knowing the base date.  This means that a duration can't
be represented as a single number but must be a structure with several
fields.

>  I don't think there's going to be a way to make everyone happy with
> timeDuration.
[JBDP] The best you can do is provide utility functions that help people to
do the calculations they typically want to do when they have all the
necessary data available, i.e. when the duration is applied to a base date.
 
>   If you specify a duration of 1M, do you mean 30D, or "this date
> next month", or "4 weeks from today"?
[JBDP]  I mean "this date next month"  If I meant 30 days I would write 30D;
if I meant 4 weeks I'd write 4W (or 28D).  When people say "one month" or
"thirty days" or "four weeks" they mean something specific.  To arbitrarily
say that 1 month = 30 days is to fail to represent the specific meaning.

> Should a start instant even be assumed at all?
[JBDP]  No, you cannot assume a start date.  An interval of 1 month starting
on 1 Jan does not last as many days as one of 1 month starting in 1 Feb.  As
I have said, this means you cannot simply convert a duration into a
day-count.  If the guy says "one month" you must remember "one month".

What's more there are people who normalize months to weeks using a 4/4/5
schedule or something similar.  If you remember "one month" they can apply
their own rules to get the answer they want.  If you normalize they can't.

Of course, there are additional complications such as the meaning of "1/2 a
month" -- "pay me on the 1st and on the 15th of each month (but on the 14th
in February)" -- the two halves of a month often have different numbers of
days.  But these are relatively rare and because we can't do everything that
doesn't mean we shouldn't do the best we can.

-- jP --


This message is for the named person's use only.  It may contain
confidential, proprietary or legally privileged information.  No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender.  You must not, directly or indirectly, use, disclose, distribute, 
print, or copy any part of this message if you are not the intended 
recipient. CREDIT SUISSE GROUP, CREDIT SUISSE FIRST BOSTON, and each of
their subsidiaries each reserve  the right to monitor all e-mail 
communications through its networks.  Any views expressed in this message
are those of the individual sender, except where the message states 
otherwise and the sender is authorised to state them to be the views of 
any such entity.



Reply via email to