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
proposal: time: Add time.Day constant #56460
Comments
I feel sure that this has come up before, but I wasn't able to find an earlier issue. We have historically rejected this because not all days are 24 hours. At a daylight savings transition there are 23 hour days and 25 hour days. While for many uses |
Thanks @ianlancetaylor – I see the logic now, and I'm glad it's documented here. If the goal is to force people to consider what they need, then I feel like it's rather ineffective way to go about it. More prosaically, I'm not sure typing |
Duplicate of #11473 |
@seankhliao – The duplicate is not open for discussion, and seems restricted to collaborators. |
@seankhliao Thanks for finding the earlier issue. @mohamedattahri Our general approach is that once we've made a decision, we don't change that decision unless there is new information that we didn't consider. If we don't follow that policy, we will be get into an endless loop of discussing older decisions, and won't have any time to make any forward progress. So if you have new information, by all means share it here and we can reopen the issue. Otherwise, please respect that we've made a decision here even if it's different than the one that you would have made. Thanks. |
This proposal is a duplicate of a previously discussed proposal, as noted above, |
This is a modest and self-explanatory proposal to add a
time.Day
constant to thetime
package.To restate the obvious:
I personally see any downsides, and the one-liner needed seems worth it.
Github search for code mentioning "24 * time.Hour".
The text was updated successfully, but these errors were encountered: