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

``` rust extern crate chrono; use chrono::{UTC, TimeZone, Timelike}; fn main() { let s = "100102030460Z"; let d = UTC.datetime_from_str(s, "%y%m%d%H%M%SZ").unwrap(); println!("{} -- second={}, nanosecond={}", d, d.second(), d.nanosecond()); } ```...

We have had multiple requests to provide a way to get DST information for a `DateTime`. Not all offset types carry this information. `Utc` and `FixedOffset` rightfully only encode an...

Currently the type returned for `DateTime`s with a `Local` time zone is a `FixedOffset`. This makes it impossible to add information to the `DateTime` such as the time zone name,...

Just learned that adding a type parameter is a backwards-compatible change if it has a default type, thanks to [RFC 0213](https://rust-lang.github.io/rfcs/0213-defaulted-type-params.html). That means we can fix the biggest remaining performance...

A list to keep score. Not yet complete, and only lists the public API. Currently at 61/153. ### NaiveDate - [x] `NaiveDate::from_ymd`: #1444 - [x] `NaiveDate::from_yo`: #1460 - [x] `NaiveDate::from_isoywd`:...

See the discussion in https://github.com/chronotope/chrono/pull/1551#discussion_r1550405238. Smaller types may give more potential for optimizations, but may also introduce more fallible conversions.

Test that `cargo publish` and `cargo package` succeed.

I put in the effort to slice the first commit of #1457 into 17 commits that each are readable as a refactor. The goal is to move all logic for...

See the discussion starting in https://github.com/chronotope/chrono/pull/1018#issuecomment-1591763775 and an implementation in #1148

Continuing from #1523. How do we want to consistently name methods that turn one type into another more complete type? Currently we have little consistency, starting with `and_`, `with_`, `from_`,...