Skip to content

Commit

Permalink
partially addresses casact#456
Browse files Browse the repository at this point in the history
  • Loading branch information
John Bogaardt committed Sep 19, 2023
1 parent 857b872 commit c59b4e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chainladder/core/triangle.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,10 @@ def grain(self, grain="", trailing=False, inplace=False):
obj = self.dev_to_val()
if ograin_new != ograin_old:
freq = {"Y": "A", "S": "2Q"}.get(ograin_new, ograin_new)
if trailing or obj.origin.freqstr[-3:] != "DEC":
print(trailing, obj.origin.freqstr[-3:])
if trailing or (obj.origin.freqstr[-3:] != "DEC" and ograin_old != 'M'):
origin_period_end = self.origin[-1].strftime("%b").upper()
print(origin_period_end)
else:
origin_period_end = "DEC"
indices = (
Expand Down

0 comments on commit c59b4e4

Please sign in to comment.