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

Support recurring seasons #33

Open
bradgarropy opened this issue Dec 6, 2021 · 3 comments
Open

Support recurring seasons #33

bradgarropy opened this issue Dec 6, 2021 · 3 comments

Comments

@bradgarropy
Copy link
Contributor

bradgarropy commented Dec 6, 2021

Okay okay, one more suggestion. Last one, I promise.

With the current configuration, I would have to update my codebase each year to adjust the snowfall dates from December 1, 2021 00:00:00 to December 1, 2022 00:00:00.

season: {
    start: new Date("December 1, 2021 00:00:00"),
    end: new Date("January 1, 2022 00:00:00"),
}

Would it be possible to allow for a recurring date range? So that it could snow from December 1 to January 1 every year?

@raae
Copy link
Member

raae commented Dec 6, 2021

Okay okay, one more suggestion. Last one, I promise.

Keep them coming! Makes me so happy 🤩

With the current configuration, I would have to update my codebase each year to adjust the snowfall dates from December 1, 2021 00:00:00 to December 1, 2022 00:00:00.

season: {
    start: new Date("December 1, 2021 00:00:00"),
    end: new Date("January 1, 2022 00:00:00"),
}

Would it be possible to allow for a recurring date range? So that it could snow from December 1 to January 1 every year?

It actually strips out the year and makes it recurring, but I wanted proper dates to make it easier to validate.
I will try to convey that better in the docs. The default is December 1st to January 4th every year.

@bradgarropy
Copy link
Contributor Author

bradgarropy commented Dec 7, 2021

Sweet! Then maybe the example in the documentation could show something like this:

season: {
    start: new Date("December 1"),
    end: new Date("January 1"),
}

It still parses to a valid date, even though it's in 1970. But if you strip off the year anyways, that could work!

@raae
Copy link
Member

raae commented Dec 7, 2021

It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants