Skip to content

Commit

Permalink
Add docstring for SSB date format to contains_date_from and contains_…
Browse files Browse the repository at this point in the history
…date_until
  • Loading branch information
tilen1976 committed Jan 28, 2024
1 parent a9cf82c commit ff14aee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/datadoc/backend/dapla_dataset_path_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ def contains_data_from(self) -> datetime.date:
"""The earliest date from which data in the dataset is relevant for."""
date_format = categorize_period_string(self.first_period_string)
if isinstance(date_format, SsbDateFormat):
"""If dateformat is SSB date format return start month of ssb period."""
period = convert_ssb_period(
self.first_period_string,
"start",
Expand All @@ -318,6 +319,7 @@ def contains_data_until(self) -> datetime.date:
period_string = self.second_period_string or self.first_period_string
date_format = categorize_period_string(period_string)
if isinstance(date_format, SsbDateFormat):
"""If dateformat is SSB date format return end month of ssb period."""
period = convert_ssb_period(period_string, "end", date_format)
return arrow.get(period, date_format.arrow_pattern).ceil("month").date()

Expand Down

0 comments on commit ff14aee

Please sign in to comment.