On Sun, 2 Dec 2001, Sisyphus wrote:

> Seems to me that you would then first have to define what you mean by a
> 'whole month'.
>
> Consider the period 2000-01-07 (7th Jan.) to 2000-02-27 (27th Feb). Do you
> want that reported as zero whole months (because no full calendar month lies
> in that period), or 1 whole month (because more than 4 weeks has elapsed)?
>
> If it's the former, then, in the general case, it would be a matter of
> parsing the date and performing some simple arithmetic.  Subtract the
> earlier date's "month" number from the later date's "month" number and then
> subtract 1. Add this to the difference in years multiplied by 12. ( Hope
> that's right.) There may already be a wheel that does this - but it would
> probably be far quicker and easier to make your own, than it would be to
> find this wheel :-)
>
> If it's the latter then it really comes back to clarifying exactly what is
> meant by a 'whole month' - 4 weeks? - a twelfth of a year ? - 30 days ? -
> some mixture of calendar months and  a time period?.................
>

Or, since I don't seem to be hearing a coherent definition of what he
means by "whole months" perhaps he can give several different date pairs,
tell the "whole month" difference between them and explain why and then
we can see what he means by a "whole month" difference.

**** [EMAIL PROTECTED] <Carl Jolley>
**** All opinions are my own and not necessarily those of my employer ****

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to