Use iso year instead of normal year for alert__year #204
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request checklist
Please check if your PR fulfills the following requirements:
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
For extracting alert__week from alert__date in the VIIRS analysis, we use a function that returns the iso week. The iso week can sometimes extend across years to keep week definitions consistent (e.g. December 2020 has a week 53 that extends into January 2021).
For the corresponding alert__year value, we're using a normal year function, not the iso year function. So in the case above, January 1st 2021 will return 2021 instead of 2020. So the date will be return as week 53 of 2021, when it should be week 53 of 2020.
Issue Number: GTC-2644
What is the new behavior?
Use a new extraction function that gets the iso year from the date.
Does this introduce a breaking change?