From 75ff1f50b69c380d8880ceb4d89db2bfe3e903af Mon Sep 17 00:00:00 2001 From: Shun Sakai Date: Wed, 2 Sep 2026 22:50:47 +0900 Subject: [PATCH] docs(time): clarify exact seconds for week and day --- library/core/src/time.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/core/src/time.rs b/library/core/src/time.rs index 816da7a2fb7f2..1dafd6cbe080d 100644 --- a/library/core/src/time.rs +++ b/library/core/src/time.rs @@ -345,6 +345,8 @@ impl Duration { /// Creates a new `Duration` from the specified number of weeks. /// + /// For this method, one week is defined as 7 days, or 604,800 seconds. + /// /// # Panics /// /// Panics if the given number of weeks overflows the `Duration` size. @@ -373,6 +375,8 @@ impl Duration { /// Creates a new `Duration` from the specified number of days. /// + /// For this method, one day is defined as 24 hours, or 86,400 seconds. + /// /// # Panics /// /// Panics if the given number of days overflows the `Duration` size.