Likewise for the business definitions of months and years. I've got clients
that have 13 EVEN 4 week months and one has 12 'months' offset by "no-one
knows why" days and an off year. For example, today, July 11, 2007 is period
06/08, meaning period 06 in year '08'. I ain't making this stuff up.

The 13 EVEN 4 weeks months client has a parent company in Holland. The 06/08
client has their HQ in USA and offices in Belgium and China. Go figure.

It's heavily dependent on control tables as I haven't been able to create a
calculation using a base date and constants to tell me what period September
27, 2004 was in.

BTW this was one of those Y2K things that didn't get resolved, ie the 06/08,
so theres dozens of dict items for sorting in the long-term history files.

One of my client's software REQUIRES that the end of month processing is
performed exactly on the last day of the month, regardless if it's a
saturday, sunday or New Year's Eve. Who were the brain surgeons that wrote
this? I've offered to add some hamburger helper but they wouldn't pay for it
as "it's the way it's always been..."

Finally, what is the calculation that MV uses for its internal dates? (Don't
bother telling me the base date, what's the calculation? I don't think it's
"Thirty days hath September...") I've heard it called Zeller's Congruence
and I've looked it up but didn't get the direct connection to how our dates
are incredibly fastly derived/converted.

Thanks in advance
Mark Johnson


----- Original Message -----
From: "Ray Wurlod" <[EMAIL PROTECTED]>
To: <u2-users@listserver.u2ug.org>
Sent: Wednesday, July 11, 2007 2:00 AM
Subject: Re: [U2] [UV] Conversion code for week number


> There isn't one, and for a very good reason - you have to nail the
business rules, and these won't be the same everywhere.  For example, on
what dat does your week start?  It's Sunday for you (I assume, since you're
in Australia), but it's Monday in the USA.  Some businesses run Thursday
through Wednesday as their week.  The other business rule is the definition
of week number 1 in the year.  Assuming that you want to implement the ISO
8601 standard format yyyyWnn, in which every week has seven days, you must
decide some kind of rule for week number 1 - for example the first week that
has four dates in the calendar year.  Using such a rule January 1st is often
in week #53 of the preceding year.
>
> Of course, if you don't require seven days in every week, and week number
1 starts on January 1st, then you can go with something like
> Int(Oconv(TheDate, "DJ") / 7)
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to