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 adding days to Instant #179

Open
ariebovenberg opened this issue Oct 26, 2024 · 2 comments
Open

Support adding days to Instant #179

ariebovenberg opened this issue Oct 26, 2024 · 2 comments
Labels
discussion Discussion is needed before proceeding

Comments

@ariebovenberg
Copy link
Owner

Instant currently doesn't support adding days because they're treated as "calendar days" in the rest of the library (which aren't always 24 hours due to DST). However, for Instant days can be assumed to always be 24 hours.

Implementing this needs to be weighed with the downside of muddying the water between "standard" days and "calendar" days

@ariebovenberg ariebovenberg added the discussion Discussion is needed before proceeding label Oct 26, 2024
@BurntSushi
Copy link

Strong precedent here would be that Temporal doesn't support adding days (or higher) to an Instant.

@filmor
Copy link

filmor commented Oct 28, 2024

As someone who just had to deal with people circumventing NodaTime 's intentionally missing Instant.PlusDays via Instant.Plus(Duration.FromDays(...)), I second Temporal's decision. Adding days to an Instant is one of those things that work well for almost all times and looks reasonable enough that it only really blows up on DST change days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion is needed before proceeding
Projects
None yet
Development

No branches or pull requests

3 participants