Skip to content

Commit

Permalink
Fix end date methodology
Browse files Browse the repository at this point in the history
  • Loading branch information
mcarans committed Dec 30, 2024
1 parent b6daa9f commit d3358dc
Show file tree
Hide file tree
Showing 4 changed files with 328 additions and 326 deletions.
8 changes: 5 additions & 3 deletions common/dataset_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,14 +289,16 @@ def get_end_date_freshness(self):
self.end_date_uptodate = ""
if self.exclude_from_stats == "Y":
return
if self.enddate == "ongoing":
self.end_date_uptodate = "UpToDate"
return
if self.update_frequency:
update_frequency = int(self.update_frequency)
if update_frequency < 0:
return
if update_frequency == 0:
self.end_date_uptodate = "UpToDate"
elif update_frequency > 0:
if self.enddate == "ongoing":
self.end_date_uptodate = "UpToDate"
return
enddate = parse_date(self.enddate)
self.end_date_uptodate = self.calculate_ed_uptodate(
enddate, update_frequency
Expand Down
Loading

0 comments on commit d3358dc

Please sign in to comment.