DATE lookup table (1990/01/01:2041/12/31)

前端 未结 4 1828
抹茶落季
抹茶落季 2021-01-23 23:17

I use a DATE\'s master table for looking up dates and other values in order to control several events, intervals and calculations within my app. It has rows for every single day

4条回答
  •  终归单人心
    2021-01-23 23:52

    OK, so I tested my app using 31 days/month to calculate interest rates & pawnshops are happy with it! Local Law prays as follows: From pawn or last int. pymt. date to 5 elapsed days, 5% interest on principal, 6 to 10 days = 10%, 11 to 15 days = 15%, and 16 days to 1 "month" = 20%.

    So the interest table is now defined as follows:

    NUMBER OF ELAPSED DAYS SINCE
    PAWN DATE OR LAST INTEREST PYMT
    
     FROM     TO  ACUMULATED
      DAY    DAY    INTEREST
    -----   ----  ----------
        0      5       5.00%
        6     10      10.00%
       11     15      15.00%
       16     31      20.00%
       32     36      25.00%
       37     41      30.00%
       42     46      35.00%
       47     62      40.00%
    
       [... until day 90 (forfeiture allowed)]
       from day 91 to 999, daily prorate based on 20%/month.
    

    Did something bad happen in the UK on MAR-13 or SEP-1752?

提交回复
热议问题