Skip to content

Commit 5d74815

Browse files
committed
feat: add gleam_time interoperability layer
Add conversion functions between birl and gleam_time types: - to_timestamp/from_timestamp for Time <-> Timestamp - day_to_date/date_to_day for Day <-> calendar.Date - time_of_day_to_calendar/calendar_to_time_of_day for TimeOfDay - to_gleam_duration/from_gleam_duration for Duration Also fixes CI formatting issues and updates Gleam version to 1.14 in workflow files.
1 parent 1cf7c03 commit 5d74815

File tree

8 files changed

+686
-308
lines changed

8 files changed

+686
-308
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: erlef/setup-beam@v1
1414
with:
1515
otp-version: '26'
16-
gleam-version: '1.6'
16+
gleam-version: '1.14'
1717

1818
- run: |
1919
version="v$(cat gleam.toml | grep -m 1 "version" | sed -r "s/version *= *\"([[:digit:].]+)\"/\1/")"

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: erlef/setup-beam@v1
1515
with:
1616
otp-version: '26'
17-
gleam-version: '1.6'
17+
gleam-version: '1.14'
1818
rebar3-version: '3'
1919
- run: gleam test
2020
- run: gleam format --check src test

gleam.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ links = [{ title = "Gleam", href = "https://gleam.run" }]
1212
ranger = ">= 1.4.0 and < 2.0.0"
1313
gleam_stdlib = ">= 0.48.0 and < 2.0.0"
1414
gleam_regexp = ">= 1.0.0 and < 2.0.0"
15+
gleam_time = ">= 1.0.0 and < 2.0.0"
1516

1617
[dev-dependencies]
1718
gleeunit = ">= 1.2.0 and < 2.0.0"

manifest.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
packages = [
55
{ name = "gleam_regexp", version = "1.0.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_regexp", source = "hex", outer_checksum = "A3655FDD288571E90EE9C4009B719FEF59FA16AFCDF3952A76A125AF23CF1592" },
66
{ name = "gleam_stdlib", version = "0.48.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "6C7799F315EB3AC53271078685297579183A287F2E65C6DD36C6583C76F12BBE" },
7+
{ name = "gleam_time", version = "1.7.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_time", source = "hex", outer_checksum = "56DB0EF9433826D3B99DB0B4AF7A2BFED13D09755EC64B1DAAB46F804A9AD47D" },
78
{ name = "gleam_yielder", version = "1.1.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleam_yielder", source = "hex", outer_checksum = "8E4E4ECFA7982859F430C57F549200C7749823C106759F4A19A78AEA6687717A" },
89
{ name = "gleeunit", version = "1.2.0", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "F7A7228925D3EE7D0813C922E062BFD6D7E9310F0BEE585D3A42F3307E3CFD13" },
910
{ name = "ranger", version = "1.4.0", build_tools = ["gleam"], requirements = ["gleam_stdlib", "gleam_yielder"], otp_app = "ranger", source = "hex", outer_checksum = "C8988E8F8CDBD3E7F4D8F2E663EF76490390899C2B2885A6432E942495B3E854" },
@@ -12,5 +13,6 @@ packages = [
1213
[requirements]
1314
gleam_regexp = { version = ">= 1.0.0 and < 2.0.0" }
1415
gleam_stdlib = { version = ">= 0.48.0 and < 2.0.0" }
16+
gleam_time = { version = ">= 1.0.0 and < 2.0.0" }
1517
gleeunit = { version = ">= 1.2.0 and < 2.0.0" }
1618
ranger = { version = ">= 1.4.0 and < 2.0.0" }

0 commit comments

Comments
 (0)