Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbarsky committed Oct 4, 2023
1 parent cbc2803 commit b6a3eb0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,15 @@ impl Default for UtcTime {
}
}

/// Formats the current [UTC time] using [`chrono` crate].
///
/// To format the current local time instead, use the [`ChronoLocalTime`]
/// or the [`LocalTime`] type.
///
/// [UTC time]: ChronoUtc
/// [`chrono` crate]: chrono
#[cfg(feature = "chrono")]
#[derive(Clone, Debug)]
pub struct ChronoUtcTime {
time: ChronoUtc,
}
Expand Down Expand Up @@ -223,6 +231,13 @@ where
}
}

/// Formats the current [`local time`] using [`chrono` crate].
///
/// To format the UTC time instead, use the [`ChronoUtcTime`]
/// or the [`UtcTime`] type.
///
/// [`local time`]: ChronoLocal
/// [`chrono` crate]: chrono
#[cfg(feature = "chrono")]
pub struct ChronoLocalTime {
time: ChronoLocal,
Expand Down

0 comments on commit b6a3eb0

Please sign in to comment.