Replace nil-returning year-gate functions with year_ranges#331
Merged
Conversation
Signed-off-by: Phil Peble <phil@peble.net>
5d9a5b3 to
7634231
Compare
Member
Author
|
This is as no-op and simplify codifies existing behavior. For this reason I am not waiting for additional approval. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
nilpurely as a year-range gate to use theyear_rangesdefinition field insteadpl.yamlandau.yamlChanges
pl.yaml
pl_trzech_kroliandpl_trzech_kroli_informalfunctions; replaces withmday: 6+year_ranges: from: 2011/until: 2010au.yaml
march_pub_hol_sa: addsyear_ranges: from: 2006; simplifies functionmay_pub_hol_sa: addsyear_ranges: until: 2005; simplifies functionqld_queens_birthday_june: addsyear_ranges: until: 2015; simplifies functionqld_labour_day_may: splits into two definitions (until: 2012,from: 2016); simplifies functionqld_labour_day_october: addsyear_ranges: between: {start: 2013, end: 2015}; simplifies functionqld_queens_bday_october: splits intomday: 1+limited: [2012]and function +between: {start: 2016, end: 2022}; simplifies functionqld_kings_bday_october: already hadyear_ranges: from: 2023; drops nil branch from functiong20_day_2014_only: removes function entirely; replaces withmday: 14+limited: [2014]What was not changed
Functions where
nilis a legitimate computation result (not a year gate) are left as-is:jp_citizens_holiday,jp_substitute_holiday,us_inauguration_day,even_year_election_day.Test plan