From 42a7c8e5899b1e0087294779df27c8ecd095fa8c Mon Sep 17 00:00:00 2001 From: Kang Seonghoon Date: Wed, 21 Jun 2017 21:58:42 +0900 Subject: [PATCH] Fixed more documentation links. Linkchecker recognizes the distinction between internal and external links (which are not checked by default), and considers URLs which does not have the starting URL base as a prefix internal... This commit has been verified against a proper set of options to Linkchecker, but there are several false positives (for our purposes) which would make the automated checking not as effective. --- src/date.rs | 2 +- src/datetime.rs | 6 +++--- src/format/mod.rs | 2 +- src/format/parsed.rs | 8 ++++---- src/naive/date.rs | 16 ++++++++-------- src/naive/datetime.rs | 16 ++++++++-------- src/naive/time.rs | 10 +++++----- src/offset/fixed.rs | 2 +- src/offset/local.rs | 2 +- src/offset/utc.rs | 2 +- 10 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/date.rs b/src/date.rs index 05a1c32..f3cad10 100644 --- a/src/date.rs +++ b/src/date.rs @@ -261,7 +261,7 @@ impl Date where Tz::Offset: fmt::Display { } /// Formats the date with the specified format string. - /// See the [`format::strftime` module](../format/strftime/index.html) + /// See the [`format::strftime` module](./format/strftime/index.html) /// on the supported escape sequences. #[inline] pub fn format<'a>(&self, fmt: &'a str) -> DelayedFormat> { diff --git a/src/datetime.rs b/src/datetime.rs index ecf6e73..e478ea5 100644 --- a/src/datetime.rs +++ b/src/datetime.rs @@ -21,7 +21,7 @@ use format::{parse, Parsed, ParseError, ParseResult, DelayedFormat, StrftimeItem /// /// There are some constructors implemented here (the `from_*` methods), but /// the general-purpose constructors are all via the methods on the -/// [`TimeZone`](../trait.TimeZone.html) implementations. +/// [`TimeZone`](./offset/trait.TimeZone.html) implementations. #[derive(Clone)] pub struct DateTime { datetime: NaiveDateTime, @@ -208,7 +208,7 @@ impl DateTime { /// Parses a string with the specified format string and /// returns a new `DateTime` with a parsed `FixedOffset`. - /// See the [`format::strftime` module](../format/strftime/index.html) + /// See the [`format::strftime` module](./format/strftime/index.html) /// on the supported escape sequences. /// /// See also `Offset::datetime_from_str` which gives a local `DateTime` on specific time zone. @@ -241,7 +241,7 @@ impl DateTime where Tz::Offset: fmt::Display { } /// Formats the combined date and time with the specified format string. - /// See the [`format::strftime` module](../format/strftime/index.html) + /// See the [`format::strftime` module](./format/strftime/index.html) /// on the supported escape sequences. #[inline] pub fn format<'a>(&self, fmt: &'a str) -> DelayedFormat> { diff --git a/src/format/mod.rs b/src/format/mod.rs index 503ef16..fc05fcc 100644 --- a/src/format/mod.rs +++ b/src/format/mod.rs @@ -558,7 +558,7 @@ impl<'a, I: Iterator> + Clone> fmt::Display for DelayedFormat { // this implementation is here only because we need some private code from `scan` -/// Parsing a `str` into a `Weekday` uses the format [`%W`](../../format/strftime/index.html). +/// Parsing a `str` into a `Weekday` uses the format [`%W`](./format/strftime/index.html). /// /// # Example /// diff --git a/src/format/parsed.rs b/src/format/parsed.rs index 1ab0099..00686d8 100644 --- a/src/format/parsed.rs +++ b/src/format/parsed.rs @@ -41,13 +41,13 @@ pub struct Parsed { /// Year modulo 100. Implies that the year is >= 1 BCE when set. pub year_mod_100: Option, - /// Year in the [ISO week date](../../naive/date/index.html#week-date). + /// Year in the [ISO week date](../naive/struct.NaiveDate.html#week-date). /// /// This can be negative unlike [`isoyear_div_100`](#structfield.isoyear_div_100) and /// [`isoyear_mod_100`](#structfield.isoyear_mod_100) fields. pub isoyear: Option, - /// Year in the [ISO week date](../../naive/date/index.html#week-date), divided by 100. + /// Year in the [ISO week date](../naive/struct.NaiveDate.html#week-date), divided by 100. /// Implies that the year is >= 1 BCE when set. /// /// Due to the common usage, if this field is missing but @@ -55,7 +55,7 @@ pub struct Parsed { /// it is inferred to 19 when `isoyear_mod_100 >= 70` and 20 otherwise. pub isoyear_div_100: Option, - /// Year in the [ISO week date](../../naive/date/index.html#week-date), modulo 100. + /// Year in the [ISO week date](../naive/struct.NaiveDate.html#week-date), modulo 100. /// Implies that the year is >= 1 BCE when set. pub isoyear_mod_100: Option, @@ -70,7 +70,7 @@ pub struct Parsed { /// (0--53, 1--53 or 1--52 depending on the year). pub week_from_mon: Option, - /// [ISO week number](../../naive/date/index.html#week-date) + /// [ISO week number](../naive/struct.NaiveDate.html#week-date) /// (1--52 or 1--53 depending on the year). pub isoweek: Option, diff --git a/src/naive/date.rs b/src/naive/date.rs index 277b6c2..8acea8e 100644 --- a/src/naive/date.rs +++ b/src/naive/date.rs @@ -64,12 +64,12 @@ const MAX_BITS: usize = 44; /// /// * ISO 8601 calendars has the year 0, which is 1 BCE (a year before 1 CE). /// If you need a typical BCE/BC and CE/AD notation for year numbers, -/// use the [`Datelike::year_ce`](../../trait.Datelike.html#method.year_ce) method. +/// use the [`Datelike::year_ce`](../trait.Datelike.html#method.year_ce) method. /// /// # Week Date /// /// The ISO 8601 **week date** is a triple of year number, week number -/// and [day of the week](../../enum.Weekday.html) with the following rules: +/// and [day of the week](../enum.Weekday.html) with the following rules: /// /// * A week consists of Monday through Sunday, and is always numbered within some year. /// The week number ranges from 1 to 52 or 53 depending on the year. @@ -81,7 +81,7 @@ const MAX_BITS: usize = 44; /// For example, January 3, 2016 (Sunday) was on the last (53rd) week of 2015. /// /// Chrono's date types default to the ISO 8601 [calendar date](#calendar-date), -/// but the [`Datelike::isoweekdate`](../../trait.Datelike.html#tymethod.isoweekdate) method +/// but the [`Datelike::isoweekdate`](../trait.Datelike.html#tymethod.isoweekdate) method /// can be used to get the corresponding week date. /// /// # Ordinal Date @@ -398,7 +398,7 @@ impl NaiveDate { } /// Parses a string with the specified format string and returns a new `NaiveDate`. - /// See the [`format::strftime` module](../../format/strftime/index.html) + /// See the [`format::strftime` module](../format/strftime/index.html) /// on the supported escape sequences. /// /// # Example @@ -913,7 +913,7 @@ impl NaiveDate { } /// Formats the date with the specified format string. - /// See the [`format::strftime` module](../../format/strftime/index.html) + /// See the [`format::strftime` module](../format/strftime/index.html) /// on the supported escape sequences. /// /// This returns a `DelayedFormat`, @@ -1382,7 +1382,7 @@ impl Sub for NaiveDate { } /// The `Debug` output of the naive date `d` is same to -/// [`d.format("%Y-%m-%d")`](../../format/strftime/index.html). +/// [`d.format("%Y-%m-%d")`](../format/strftime/index.html). /// /// The string printed can be readily parsed via the `parse` method on `str`. /// @@ -1417,7 +1417,7 @@ impl fmt::Debug for NaiveDate { } /// The `Display` output of the naive date `d` is same to -/// [`d.format("%Y-%m-%d")`](../../format/strftime/index.html). +/// [`d.format("%Y-%m-%d")`](../format/strftime/index.html). /// /// The string printed can be readily parsed via the `parse` method on `str`. /// @@ -1443,7 +1443,7 @@ impl fmt::Display for NaiveDate { } /// Parsing a `str` into a `NaiveDate` uses the same format, -/// [`%Y-%m-%d`](../../format/strftime/index.html), as in `Debug` and `Display`. +/// [`%Y-%m-%d`](../format/strftime/index.html), as in `Debug` and `Display`. /// /// # Example /// diff --git a/src/naive/datetime.rs b/src/naive/datetime.rs index fbdd0eb..bd13edd 100644 --- a/src/naive/datetime.rs +++ b/src/naive/datetime.rs @@ -35,8 +35,8 @@ const MAX_SECS_BITS: usize = 44; /// # let _ = dt; /// ~~~~ /// -/// You can use typical [date-like](../../trait.Datelike.html) and -/// [time-like](../../trait.Timelike.html) methods, +/// You can use typical [date-like](../trait.Datelike.html) and +/// [time-like](../trait.Timelike.html) methods, /// provided that relevant traits are in the scope. /// /// ~~~~ @@ -99,7 +99,7 @@ impl NaiveDateTime { /// and the number of nanoseconds since the last whole non-leap second. /// /// For a non-naive version of this function see - /// [`TimeZone::timestamp`](../../offset/trait.TimeZone.html#method.timestamp). + /// [`TimeZone::timestamp`](../offset/trait.TimeZone.html#method.timestamp). /// /// The nanosecond part can exceed 1,000,000,000 in order to represent the /// [leap second](./struct.NaiveTime.html#leap-second-handling). (The true "UNIX @@ -162,7 +162,7 @@ impl NaiveDateTime { } /// Parses a string with the specified format string and returns a new `NaiveDateTime`. - /// See the [`format::strftime` module](../../format/strftime/index.html) + /// See the [`format::strftime` module](../format/strftime/index.html) /// on the supported escape sequences. /// /// # Example @@ -594,7 +594,7 @@ impl NaiveDateTime { } /// Formats the combined date and time with the specified format string. - /// See the [`format::strftime` module](../../format/strftime/index.html) + /// See the [`format::strftime` module](../format/strftime/index.html) /// on the supported escape sequences. /// /// This returns a `DelayedFormat`, @@ -1256,7 +1256,7 @@ impl Sub for NaiveDateTime { } /// The `Debug` output of the naive date and time `dt` is same to -/// [`dt.format("%Y-%m-%dT%H:%M:%S%.f")`](../../format/strftime/index.html). +/// [`dt.format("%Y-%m-%dT%H:%M:%S%.f")`](../format/strftime/index.html). /// /// The string printed can be readily parsed via the `parse` method on `str`. /// @@ -1289,7 +1289,7 @@ impl fmt::Debug for NaiveDateTime { } /// The `Debug` output of the naive date and time `dt` is same to -/// [`dt.format("%Y-%m-%d %H:%M:%S%.f")`](../../format/strftime/index.html). +/// [`dt.format("%Y-%m-%d %H:%M:%S%.f")`](../format/strftime/index.html). /// /// It should be noted that, for leap seconds not on the minute boundary, /// it may print a representation not distinguishable from non-leap seconds. @@ -1320,7 +1320,7 @@ impl fmt::Display for NaiveDateTime { } /// Parsing a `str` into a `NaiveDateTime` uses the same format, -/// [`%Y-%m-%dT%H:%M:%S%.f`](../../format/strftime/index.html), as in `Debug`. +/// [`%Y-%m-%dT%H:%M:%S%.f`](../format/strftime/index.html), as in `Debug`. /// /// # Example /// diff --git a/src/naive/time.rs b/src/naive/time.rs index 6c4632e..f51b2dc 100644 --- a/src/naive/time.rs +++ b/src/naive/time.rs @@ -426,7 +426,7 @@ impl NaiveTime { } /// Parses a string with the specified format string and returns a new `NaiveTime`. - /// See the [`format::strftime` module](../../format/strftime/index.html) + /// See the [`format::strftime` module](../format/strftime/index.html) /// on the supported escape sequences. /// /// # Example @@ -725,7 +725,7 @@ impl NaiveTime { } /// Formats the time with the specified format string. - /// See the [`format::strftime` module](../../format/strftime/index.html) + /// See the [`format::strftime` module](../format/strftime/index.html) /// on the supported escape sequences. /// /// This returns a `DelayedFormat`, @@ -1114,7 +1114,7 @@ impl Sub for NaiveTime { } /// The `Debug` output of the naive time `t` is same to -/// [`t.format("%H:%M:%S%.f")`](../../format/strftime/index.html). +/// [`t.format("%H:%M:%S%.f")`](../format/strftime/index.html). /// /// The string printed can be readily parsed via the `parse` method on `str`. /// @@ -1164,7 +1164,7 @@ impl fmt::Debug for NaiveTime { } /// The `Display` output of the naive time `t` is same to -/// [`t.format("%H:%M:%S%.f")`](../../format/strftime/index.html). +/// [`t.format("%H:%M:%S%.f")`](../format/strftime/index.html). /// /// The string printed can be readily parsed via the `parse` method on `str`. /// @@ -1196,7 +1196,7 @@ impl fmt::Display for NaiveTime { } /// Parsing a `str` into a `NaiveTime` uses the same format, -/// [`%H:%M:%S%.f`](../../format/strftime/index.html), as in `Debug` and `Display`. +/// [`%H:%M:%S%.f`](../format/strftime/index.html), as in `Debug` and `Display`. /// /// # Example /// diff --git a/src/offset/fixed.rs b/src/offset/fixed.rs index 168880c..ca3a23c 100644 --- a/src/offset/fixed.rs +++ b/src/offset/fixed.rs @@ -15,7 +15,7 @@ use super::{TimeZone, Offset, LocalResult}; /// The time zone with fixed offset, from UTC-23:59:59 to UTC+23:59:59. /// -/// Using the [`TimeZone`](../../../chrono/offset/trait.TimeZone.html) methods +/// Using the [`TimeZone`](./trait.TimeZone.html) methods /// on a `FixedOffset` struct is the preferred way to construct /// `DateTime` instances. See the [`east`](#method.east) and /// [`west`](#method.west) methods for examples. diff --git a/src/offset/local.rs b/src/offset/local.rs index 77f1413..1f65f1a 100644 --- a/src/offset/local.rs +++ b/src/offset/local.rs @@ -65,7 +65,7 @@ fn datetime_to_timespec(d: &NaiveDateTime, local: bool) -> oldtime::Timespec { /// The local timescale. This is implemented via the standard `time` crate. /// -/// Using the [`TimeZone`](../../../chrono/offset/trait.TimeZone.html) methods +/// Using the [`TimeZone`](./trait.TimeZone.html) methods /// on the Local struct is the preferred way to construct `DateTime` /// instances. /// diff --git a/src/offset/utc.rs b/src/offset/utc.rs index bb8a029..684be75 100644 --- a/src/offset/utc.rs +++ b/src/offset/utc.rs @@ -13,7 +13,7 @@ use super::{TimeZone, Offset, LocalResult, FixedOffset}; /// The UTC time zone. This is the most efficient time zone when you don't need the local time. /// It is also used as an offset (which is also a dummy type). /// -/// Using the [`TimeZone`](../../../chrono/offset/trait.TimeZone.html) methods +/// Using the [`TimeZone`](./trait.TimeZone.html) methods /// on the UTC struct is the preferred way to construct `DateTime` /// instances. ///