chrono icon indicating copy to clipboard operation
chrono copied to clipboard

Date and time library for Rust

Results 262 chrono issues
Sort by recently updated
recently updated
newest added
trafficstars

Is there a way to add some number of months to `NaiveDate`? I'm looking for something with the following behavior ``` assert_eq!(NaiveDate::from_ymd(2015, 1, 5).add_months(10), Some(NaiveDate::from_ymd(2015, 11, 5))); assert_eq!(NaiveDate::from_ymd(2015, 1, 31).add_months(1),...

help-wanted

How to get the next year and next month? how about Date addition and subtraction,

Consider this snippet: ```rust let t = Utc::now(); let a = t.naive_utc(); let b = t.naive_local(); ``` `a` and `b` are always equal, while one would expect `a` to be...

I'm getting `input is not enough for unique date and time` when trying to parse: `2021-06-03 08:11:16.207 +00:00` And format: ```const TIMESTAMP_FMT: &str = "%Y-%m-%d %H:%M:%S.%3f %Z";``` Interestingly, printing with...

DateTime::parse_from_rfc3339 lacks of some iso-8601 format supports which makes it very hard to collaborate with tools such as GNU date. This commit adds support for thoses formats generated by GNU...

Currently an invalid formatting string gives `Item::Error` in the iterator, and it invokes `std::fmt::Error` on the actual formatting. I initially assumed that, while this does not immediately fail, a vast...

api-stabilization
error-handling

```rust extern crate chrono; use chrono::NaiveDateTime; fn main() { println!("{}:", 1); if let Err(e) = NaiveDateTime::parse_from_str("2019010101", "%Y%m%d%H") { println!("{}", e); } println!("{}:", 2); if let Err(e) = NaiveDateTime::parse_from_str("201901010100", "%Y%m%d%H%M") {...

D-medium
help-wanted

I'm not sure if you guys are interested in taking a change like this. If you are, I'd be happy to fill in more impls.

Hi! I wrote a small library that provides the following on top of `chrono`: * CalendarDuration that is able to add months and years (which have varying lengths and thus...

It's hard to understand how to use things in `chrono` because there are no doctests that show the functions in action. Could these please be added?