commit
725d88e0dc
|
@ -241,7 +241,7 @@ release due to the compatibility concern raised.
|
||||||
- The major version was made to fix the broken Serde dependency issues. (#146, #156, #158, #159)
|
- The major version was made to fix the broken Serde dependency issues. (#146, #156, #158, #159)
|
||||||
|
|
||||||
The original intention to technically break the dependency was
|
The original intention to technically break the dependency was
|
||||||
to faciliate the use of Serde 1.0 at the expense of temporary breakage.
|
to facilitate the use of Serde 1.0 at the expense of temporary breakage.
|
||||||
Whether this was appropriate or not is quite debatable,
|
Whether this was appropriate or not is quite debatable,
|
||||||
but it became clear that there are several high-profile crates requiring Serde 0.9
|
but it became clear that there are several high-profile crates requiring Serde 0.9
|
||||||
and it is not feasible to force them to use Serde 1.0 anyway.
|
and it is not feasible to force them to use Serde 1.0 anyway.
|
||||||
|
|
|
@ -55,7 +55,7 @@ impl<Tz: TimeZone> Date<Tz> {
|
||||||
/// Makes a new `Date` with given *UTC* date and offset.
|
/// Makes a new `Date` with given *UTC* date and offset.
|
||||||
/// The local date should be constructed via the `TimeZone` trait.
|
/// The local date should be constructed via the `TimeZone` trait.
|
||||||
//
|
//
|
||||||
// note: this constructor is purposedly not named to `new` to discourage the direct usage.
|
// note: this constructor is purposely not named to `new` to discourage the direct usage.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn from_utc(date: NaiveDate, offset: Tz::Offset) -> Date<Tz> {
|
pub fn from_utc(date: NaiveDate, offset: Tz::Offset) -> Date<Tz> {
|
||||||
Date { date: date, offset: offset }
|
Date { date: date, offset: offset }
|
||||||
|
|
|
@ -82,7 +82,7 @@ impl<Tz: TimeZone> DateTime<Tz> {
|
||||||
/// assert_eq!(Utc.timestamp(61, 0), dt);
|
/// assert_eq!(Utc.timestamp(61, 0), dt);
|
||||||
/// ~~~~
|
/// ~~~~
|
||||||
//
|
//
|
||||||
// note: this constructor is purposedly not named to `new` to discourage the direct usage.
|
// note: this constructor is purposely not named to `new` to discourage the direct usage.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn from_utc(datetime: NaiveDateTime, offset: Tz::Offset) -> DateTime<Tz> {
|
pub fn from_utc(datetime: NaiveDateTime, offset: Tz::Offset) -> DateTime<Tz> {
|
||||||
DateTime { datetime: datetime, offset: offset }
|
DateTime { datetime: datetime, offset: offset }
|
||||||
|
@ -137,7 +137,7 @@ impl<Tz: TimeZone> DateTime<Tz> {
|
||||||
/// Note that this does reduce the number of years that can be represented
|
/// Note that this does reduce the number of years that can be represented
|
||||||
/// from ~584 Billion to ~584. (If this is a problem, please file
|
/// from ~584 Billion to ~584. (If this is a problem, please file
|
||||||
/// an issue to let me know what domain needs nanosecond precision over
|
/// an issue to let me know what domain needs nanosecond precision over
|
||||||
/// millenia, I'm curious.)
|
/// millennia, I'm curious.)
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
|
|
|
@ -411,7 +411,7 @@ impl NaiveDate {
|
||||||
Of::new(ordinal, flags))
|
Of::new(ordinal, flags))
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Makes a new `NaiveDate` by counting the number of occurances of a particular day-of-week
|
/// Makes a new `NaiveDate` by counting the number of occurrences of a particular day-of-week
|
||||||
/// since the beginning of the given month. For instance, if you want the 2nd Friday of March
|
/// since the beginning of the given month. For instance, if you want the 2nd Friday of March
|
||||||
/// 2017, you would use `NaiveDate::from_weekday_of_month(2017, 3, Weekday::Fri, 2)`.
|
/// 2017, you would use `NaiveDate::from_weekday_of_month(2017, 3, Weekday::Fri, 2)`.
|
||||||
///
|
///
|
||||||
|
@ -440,7 +440,7 @@ impl NaiveDate {
|
||||||
NaiveDate::from_weekday_of_month_opt(year, month, weekday, n).expect("out-of-range date")
|
NaiveDate::from_weekday_of_month_opt(year, month, weekday, n).expect("out-of-range date")
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Makes a new `NaiveDate` by counting the number of occurances of a particular day-of-week
|
/// Makes a new `NaiveDate` by counting the number of occurrences of a particular day-of-week
|
||||||
/// since the beginning of the given month. For instance, if you want the 2nd Friday of March
|
/// since the beginning of the given month. For instance, if you want the 2nd Friday of March
|
||||||
/// 2017, you would use `NaiveDate::from_weekday_of_month(2017, 3, Weekday::Fri, 2)`. `n` is 1-indexed.
|
/// 2017, you would use `NaiveDate::from_weekday_of_month(2017, 3, Weekday::Fri, 2)`. `n` is 1-indexed.
|
||||||
///
|
///
|
||||||
|
|
|
@ -317,7 +317,7 @@ impl NaiveDateTime {
|
||||||
/// 2262-04-11T23:47:16.854775804.
|
/// 2262-04-11T23:47:16.854775804.
|
||||||
///
|
///
|
||||||
/// (If this is a problem, please file an issue to let me know what domain
|
/// (If this is a problem, please file an issue to let me know what domain
|
||||||
/// needs nanosecond precision over millenia, I'm curious.)
|
/// needs nanosecond precision over millennia, I'm curious.)
|
||||||
///
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
|
|
Loading…
Reference in New Issue