billroper: (0)
billroper ([personal profile] billroper) wrote 2004-06-18 02:55 pm (UTC)

Re: While I looked around at my possibilities

I hadn't heard of that particular trick, but it's a cute one.

For calendar dates, I'm using the COleDateTime class that MFC provides (and which -- I suspect -- is optimized to use some of these tricks).

When I'm dealing with non-calendar dates (which occur in those pesky 360-day and 364-day years), I do my own calculation, but those are much more regular than the real calendar. The problem is in mapping the calendar dates onto the non-calendar time periods, but I think what I'm going to do is work with elapsed days from the start of the year; then ram the extra days into the last month of the fiscal year. I won't calculate interest on those days, but if a payment is due in that range, I'll do it on the last day of the fiscal year.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org