-
Notifications
You must be signed in to change notification settings - Fork 507
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
Add MIN_DATETIME and MAX_DATETIME #386
Comments
Agreed! The naive versions should be pretty trivial to add based on the impls of |
Hi, is it possible to get alittle more clarification on this? |
@technetos something like: // in naive
pub const MIN_TIME: NaiveTime = { secs: 0, frac: 0 };
pub const MAX_TIME: NaiveTime = { secs: u32::MAX, frac: u32::MAX };
pub const MIN_DATETIME: NaiveDateTime = { date: MIN_DATE, time: MIN_TIME };
pub const MAX_DATETIME: NaiveDateTime = { date: MAX_DATE, time: MAX_TIME };
// in root
pub const MIN_DATETIME: DateTime<Utc> = { datetime: naive::MIN_DATETIME, offset: Utc };
pub const MAX_DATETIME: DateTime<Utc> = { datetime: naive::MAX_DATETIME, offset: Utc }; Perhaps |
Hi, while I can confirm these are now in the code, they're not in the docs (Came in here to ask about them!). |
Where are you looking? I can find them in the docs. Note: these are not associated constants, they're just bare constants in for example the |
https://docs.rs/chrono/0.4.0/chrono/index.html#constants Pretty much here. I'm pretty new to rust, so very possible this is my issue, but I can't find them documented anywhere. |
The issue is that See Lines 475 to 490 in 13e1d48
|
Feel free to submit a PR fixing that. |
Also add the naive versions. These would just be useful to have for completeness in the library.
The text was updated successfully, but these errors were encountered: