Re: Extended-Range Time Type



David R Tribble wrote:
I've assumed that a given date within a given calender type is
unambiguous, so that differences between two dates within the
same calendric system can be calculated exactly, i.e., as if they
were first converted into longtime_t values. If there are calendric
systems where this is not the case, then the implementation will
have to make allowances for it and hopefully do the most logical
or expected thing.


Hartmut Brandt wrote:
I once worked as a programmer for one of the big german banks. I asked one
of the finance guys how many days I would have to pay for a credit that I
took on 28th of february and give back at the 1st of march. He looked very
puzzled at me (obviously nobody of them had every thought of this) and
after some days he came up with an answer that this would be something
between 1 and 4 days (they use 360 days per year). This should be fun to
standardize... :-)

Actually, I expect very little in the way of support for regional
business rules, at least from the ISO C library. It would not
surprise me to learn that there are variances even between
US banks and financial companies about what days they use
and don't use, not to mention all of the other regions.

But we might get lucky and someone will create acceptable
open source libraries to provide calendar types for the most
commonly used "standard" business calendars.

I've simply tried to provide a reasonable framework for such
things to exist in.

-drt
.



Relevant Pages

  • Re: Extended-Range Time Type
    ... arithmetic time values into calendar dates, then into characters, ... I've assumed that a given date within a given calender type is ... same calendric system can be calculated exactly, i.e., as if they ...
    (comp.std.c)
  • Re: Possible bug in Calendar
    ... in providing the localized user interfaces, including selection of which business rules to apply, but in the core logic classes I *hope* your Dates are all represented in one particular time base and that when the chosen business rules say "x is three days after y" it just adds 3*86400*1000ms to some number somewhere under the hood. ... - people erroneously calculated intervals of days by multiplying 24 hours times the number of milliseconds in an hour. ... The advantage of Calendar, in this case GregorianCalendar, for all its flaws, is that it correctly calculates intervals like "three days after y", rather than by such a naive and incorrect means. ... Some years back I worked on a warehouse project where the client billed their customers according to the number of days their goods were in storage, but also gave special deals as incentives. ...
    (comp.lang.java.programmer)
  • Re: How do I setup Fiscal Yr to begin in October in Access
    ... I have the quarter column set up for the beginning assessment date ... If your fiscal months always begin on the first of the calendar months, ... then the solutions suggested by the other responders will work fine. ... company's actual business rules. ...
    (microsoft.public.access.queries)
  • Re: Relative time in SQL
    ... "Tom Ogilvy" wrote ... ... I had my suspicions. ... but additionally refers to their calendar table (their business rules ...
    (microsoft.public.excel.programming)
  • Re: Date query
    ... Just ignore this guy - the number of times he's been told the yyyy-mm-dd format is problematic and doesn't work across national boundaries is countless. ... holds your temporal data and business rules. ... the last calendar date of each month or the last business date of each ...
    (microsoft.public.sqlserver.programming)