Skip to content

Commit

Permalink
Merge pull request #19 from DominikStiller/fix-date-conversion
Browse files Browse the repository at this point in the history
Fix resolution bug in datetime2year_float
  • Loading branch information
fzhu2e authored Sep 5, 2024
2 parents 5e1b0ec + ab569d3 commit a99c13b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cfr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def datetime2year_float(date, resolution='month'):
day = [d.day for d in date]
if resolution == 'month': day = np.ones(np.size(day))

year_float = ymd2year_float(year, month, day)
year_float = ymd2year_float(year, month, day, resolution)

return year_float

Expand Down Expand Up @@ -701,4 +701,4 @@ def download(url: str, fname: str, chunk_size=1024, show_bar=True, verify=False)

ensts_url_dict = {
'BC09_NINO34': 'https://github.com/fzhu2e/cfr-data/raw/main/BC09_NINO34.csv',
}
}

0 comments on commit a99c13b

Please sign in to comment.