Skip to content

Commit d13d0c2

Browse files
committed
Remove deprecated bool.to_int use
1 parent d9a476d commit d13d0c2

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

gleam.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name = "gtempo"
2-
version = "5.1.1"
2+
version = "5.1.2"
33

44
# Fill out these fields if you intend to generate HTML documentation or publish
55
# your project to the Hex package manager.

src/tempo/date.gleam

+4-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
//// }
3434
//// ```
3535

36-
import gleam/bool
3736
import gleam/dynamic
3837
import gleam/int
3938
import gleam/list
@@ -582,7 +581,10 @@ pub fn from_unix_utc(unix_ts: Int) -> tempo.Date {
582581
True -> 3
583582
False -> -9
584583
}
585-
let y = y + bool.to_int(m <= 2)
584+
let y = case m <= 2 {
585+
True -> y + 1
586+
False -> y
587+
}
586588

587589
let assert Ok(month) = month.from_int(m)
588590

0 commit comments

Comments
 (0)