Skip to content

Commit

Permalink
Improve docs for Holiday::with_utc_offset
Browse files Browse the repository at this point in the history
  • Loading branch information
sd2k committed Nov 21, 2024
1 parent 1baf0d1 commit 057dc23
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions crates/augurs-prophet/src/features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,12 @@ impl Holiday {

/// Set the UTC offset for the holiday, in seconds.
///
/// The UTC offset is used when deciding whether a timestamp is
/// on the holiday.
/// Timestamps of a holiday's occurrences are rounded down to the nearest day,
/// but since we're using Unix timestamps rather than timezone-aware dates,
/// holidays default to assuming the 'day' was for 24h from midnight UTC.
///
/// If instead the holiday should be from midnight in a different timezone,
/// use this method to set the offset from UTC of the desired timezone.
///
/// Defaults to 0.
pub fn with_utc_offset(mut self, utc_offset: TimestampSeconds) -> Self {
Expand Down

0 comments on commit 057dc23

Please sign in to comment.