× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I feel like my head is about to explode. I have been digging into date math
logic for hours, and I think am almost there.

BPCS date math uses work fields like POPE and ROME, because the Vatican
invented our calendar. In some of my modifications I have added to this
with ITALY and similar names. So I can do the math to get date plus or
minus # days to get at valid another date result.

FSC file is read into array 1-366 days, and what I am working on is a
sub-set, I not have to sweat work center, facility, hours shifts etc., just
go with global days.

We know the first day of the year is YYYY Jan-01 or YYYY001 in the JULIAN
calendar (named after POPE who invented our calendar), so I can use POPE
ROME logic to calculate what is DDD of year of some BPCS date by subtracting
Jan-01 of that year from it, then add 1 to result. For example Jan-13 minus
Jan-01 is 12 days difference, add 1 to get correct DDD for Jan-13.

Then I can read the FSC array in a loop of subtracting each of the X
business days they want, starting with that DDD, and when contents other
than blank or A, then subtract another day, which will get me to the YYYYDDD
Julian day which we need. I then can use the POPE ROME logic to recalculate
what CCYYMMDD date corresponds to the resulting DDD, by doing math with
Jan-01 of the year. My loop must check for DDD getting down to zero, which
means a re-set based on YYYY Jan-01 rolled to YYYY minus 1 Dec-31.

Al Mac



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.