Skip to content

Commit

Permalink
Fix revolving dates
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowbean committed Dec 24, 2023
1 parent 916f1e7 commit 0f8f136
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Asset.hs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ class (Show a,IR.UseRate a) => Asset a where
-- | ! Internal use
calcAlignDate :: a -> Date -> Date
calcAlignDate ast d = let
payDates = getPaymentDates ast 0
payDates = getOriginDate ast:getPaymentDates ast 0
remainTerms = getRemainTerms ast
benchDate = reverse payDates!!pred remainTerms `debug` ("\nPayDates"++show payDates++"\nremain terms"++ show remainTerms)
benchDate = reverse payDates!! remainTerms
offset = daysBetween benchDate d
in
T.addDays offset $ getOriginDate ast
Expand Down

0 comments on commit 0f8f136

Please sign in to comment.