birl icon indicating copy to clipboard operation
birl copied to clipboard

datetime handling for gleam

Results 11 birl issues
Sort by recently updated
recently updated
newest added

Hi ! Following a discussion we had on [gleam-lang/hexpm](https://github.com/gleam-lang/hexpm/issues/2) on timestamps, it appears that when comparing two datetime on different timezones, the behaviour is to just compare the millis. But...

Hey, I've been using this package and am finding it very useful. I'm working a lot with `TimeOfDay` and `Weekday` and found myself writing a few helper functions, particularly `parse_weekday()`,...

Hey there! I'm doing some very basic benchmarking with the following ```gleam fn time(name: String, f: fn() -> a) -> a { let start = birl.now() let x = f()...

The following code ```gleam birl.from_unix(1_711_456_116) |> birl.set_timezone("America/New_York") |> birl.to_iso8601 |> io.debug ``` produces `2024-03-26T07:28:36.000-05:00` when it should produce `2024-03-26T08:28:36.000-04:00` because America/New_York is in EDT time right now, which has the...

The test function: ``` pub fn birl_set_time_of_day_test() { birl.now() |> birl.set_time_of_day(birl.TimeOfDay(9, 30, 0, 0)) } ``` fails when it is past 12:00 AM UTC but before (I assume, haven't waited...

This pull request adds `has_occured(value: Time) -> Bool` --- I've added this as I find myself having to check this condition alot when dealing with JWT's or invalidation, and this...

Hi! The question is in the title. :) Why `from_erlang_universal_datetime` does not target JS, while it is coded in pure Gleam? I mean, OK, the format is somewhat Erlang specific,...

I came across an issue where I tried to do: ``` let now = birl.now() let start_time = birl.set_time_of_day( now, birl.TimeOfDay(hour: 8, minute: 0, second: 0, milli_second: 0), ) let...

At least, I assume it's a windows issue. I tested it on a Ubuntu system and did not have the same issue. Minimal Example: ```gleam import birl import birl/duration import...

Hey everyone, just wanted to start a discussion. Since Gleam has a really nice type system and as a language heavily encourages you to use types to reduce the possibility...