Skip to content

Commit

Permalink
minor doc change
Browse files Browse the repository at this point in the history
  • Loading branch information
massivefermion committed Jan 16, 2024
1 parent 7846ebd commit ad13fa3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/birl/duration.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ pub fn accurate_decompose(duration: Duration) -> List(#(Int, Unit)) {
///
/// if the duration is not an integer multiple of the unit,
/// the remainder will be disgarded if it's less than two thirds of the unit,
/// otherwise a single unit will be added to the multiplier
/// otherwise a single unit will be added to the multiplier.
///
/// - `duration.blur_to(duration.days(16), duration.Month)` -> 0
/// - `duration.blur_to(duration.days(20), duration.Month)` -> 1
/// - `blur_to(days(16), Month)` -> `0`
/// - `blur_to(days(20), Month)` -> `1`
pub fn blur_to(duration: Duration, unit: Unit) -> Int {
let assert Ok(unit_value) = list.key_find(unit_values, unit)
let Duration(value) = duration
Expand Down

0 comments on commit ad13fa3

Please sign in to comment.