Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify date to the 15th day of the month #223

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions arpav_ppcv/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,10 @@ def _parse_ncss_dataset(
def _simplify_date(raw_date: str) -> str:
"""Simplify a date by loosing its day and time information.

This will reset a date to the first day of the underlying month.
This will reset a date to the 15th day of the underlying month.
"""
raw_year, raw_month = raw_date.split("-")[:2]
return f"{raw_year}-{raw_month}-01T00:00:00+00:00"
return f"{raw_year}-{raw_month}-15T00:00:00+00:00"


def process_coverage_smoothing_strategy(
Expand Down