Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1a31c05

Browse files
committed
v0.3.38 release
1 parentaddf231 commit1a31c05

File tree

7 files changed

+56
-8
lines changed

7 files changed

+56
-8
lines changed

‎CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,53 @@ The format is based on [Keep a Changelog]. This project adheres to [Semantic Ver
66

77
---
88

9+
##0.3.38[2025-03-05]
10+
11+
###Added
12+
13+
- The`[year]` component (in format descriptions) now supports a`range` modifier, which can be
14+
either`standard` or`extended`. The default is`extended` for backwards compatibility. This is
15+
intended as a manner to opt_out_ of the extended range when the`large-dates` feature is enabled.
16+
When the`large-dates` feature is not enabled, the modifier has no effect.
17+
-`UtcDateTime`, which is semantically equivalent to an`OffsetDateTime` with UTC as its offset. The
18+
advantage is that it is the same size as a`PrimitiveDateTime` and has improved operability with
19+
well-known formats.
20+
21+
As part of this, there were some other additions:
22+
-`utc_datetime!` macro, which is similar to the`datetime!` macro but constructs a`UtcDateTime`.
23+
-`PrimitiveDateTime::as_utc`
24+
-`OffsetDateTime::to_utc`
25+
-`OffsetDateTime::checked_to_utc`
26+
-`time::serde::timestamp::milliseconds_i64`, which is a module to serialize/deserialize timestamps
27+
as the Unix timestamp. The pre-existing module does this as an`i128` where an`i64` would
28+
suffice. This new module should be preferred.
29+
30+
###Changed
31+
32+
-`error::Format` has had its`source()` implementation changed to no longer return a boxed value
33+
from the`ComponentRange` variant. If you were explicitly expecting this, you will need to update
34+
your code. The method API remains unchanged.
35+
-`[year repr:century]` supports single-digit values.
36+
- All`format_into` methods accept`?Sized` references.
37+
38+
###Miscellaneous
39+
40+
- Some non-exhaustive enum variants that are no longer used have been modified to be statically
41+
proven as uninhabited. The relevant fields are doc-hidden and not semver-guaranteed to remain as
42+
such, though it is unlikely to change.
43+
- An unnecessary check when parsing RFC 2822 has been removed.
44+
- Various methods have had their implementations changed, resulting in significant performance
45+
gains. Among the methods changed are
46+
-`util::is_leap_year`
47+
-`util::weeks_in_year`
48+
-`Month::length`
49+
-`Date::to_calendar_date`
50+
-`Date::month`
51+
-`Date::day`
52+
-`Date::from_julian_day`
53+
-`Date::to_julian_day`
54+
- other methods that call into these methods
55+
956
##0.3.37[2024-12-03]
1057

1158
###Added

‎Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ members = ["time", "time-core", "time-macros"]
44
resolver ="2"
55

66
[workspace.dependencies]
7-
time-core = {path ="time-core",version ="=0.1.2" }
8-
time-macros = {path ="time-macros",version ="=0.2.19" }
7+
time-core = {path ="time-core",version ="=0.1.3" }
8+
time-macros = {path ="time-macros",version ="=0.2.20" }
99

1010
criterion = {version ="0.5.1",default-features =false }
1111
deranged = {version ="0.3.9",default-features =false,features = [

‎time-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name ="time-core"
3-
version ="0.1.2"
3+
version ="0.1.3"
44
authors = ["Jacob Pratt <open-source@jhpratt.dev>","Time contributors"]
55
edition ="2021"
66
rust-version ="1.67.1"

‎time-macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name ="time-macros"
3-
version ="0.2.19"
3+
version ="0.2.20"
44
authors = ["Jacob Pratt <open-source@jhpratt.dev>","Time contributors"]
55
edition ="2021"
66
rust-version ="1.67.1"

‎time/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name ="time"
3-
version ="0.3.37"
3+
version ="0.3.38"
44
authors = ["Jacob Pratt <open-source@jhpratt.dev>","Time contributors"]
55
edition ="2021"
66
rust-version ="1.67.1"

‎time/src/error/parse.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use crate::error::{self, ParseFromDescription, TryFromParsed};
77

88
/// An error that occurred at some stage of parsing.
99
#[non_exhaustive]
10+
#[allow(variant_size_differences)]
1011
#[derive(Debug,Clone,Copy,PartialEq,Eq)]
1112
pubenumParse{
1213
#[allow(missing_docs)]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp