-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.
Description
Feature gate: #![feature(duration_constructors_lite)]
This is a tracking issue for duration_constructors_lite
.
duration_constructors_lite
implements the non-controversial bits of duration_constructors
.
Public API
std::time::Duration
from_mins(u64)
from_hours(u64)
History
(Remember to update the S-tracking-*
label when checking boxes.)
- Original
duration_constructors
implementation core: add Duration constructors #120307- Adds new
Duration
constructorsfrom_mins
,from_hours
,from_days
andfrom_weeks
. - Daylight savings time coupled with possible confusion between "standard/scientific/stopwatch" time and "civil/human" time makes using
from_days
andfrom_weeks
wrong too easy. - Without a
CivilDuration
type to disambiguateDuration
as the "standard/scientific" time duration its safer to avoid introducingfrom_days
andfrom_weeks
even ifDuration
explicitly aims to model "standard/scientific".
- Adds new
Steps
Unresolved Questions
- Best way to implement
from_days
and other larger quantities in the future.- It seems we need a Civil time type in
std
to help avoid mis-interpretingstd::time::Duration
.
- It seems we need a Civil time type in
Misc
I want to thank all folks who participated in #120301. It's not fun to argue online for so long, but very much needed to grow the language in a sound way as it's even harder to undo mistakes.
Footnotes
GrantGryczan, tkr-sh, Skgland, Atrox, youknowone and 3 moretkr-sh and ebkalderon
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCS-tracking-unimplementedStatus: The feature has not been implemented.Status: The feature has not been implemented.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.