commits
error: Type mismatch
```
error: Type mismatch
┌─ C:\coding\projects\realtime_chat\build\packages\birl\src\birl.gleam:1163:3
│
1163 │ range
│ ^^^^^
The type of this returned value doesn't match the return type
annotation of this function.
instead
error: Type mismatch
┌─ C:\coding\projects\realtime_chat\build\packages\birl\src\birl.gleam:1163:3
│
1163 │ range
│ ^^^^^
The type of this returned value doesn't match the return type
annotation of this function.
Expected type:
iterator.Iterator(Time)
Found type:
yielder.Yielder(Time)
```
Add helper function for determining if a Time has occured
Fix deprecation warnings in gleam_stdlib 0.44
Fix unmatched assert on blur of round value
fix #33 monotonic_now() to be OS agnostic
Dividing by 1000 only works when the OS's native time is in nanoseconds. Using erlang:convert_time_unit/3 should work on all platforms.
Fix deprecation warnings with latest stdlib version
Set date from small to large time unit
This avoids ambiguous situations where the desired month does not have a
many days as the current date, leading to unexpected behavior.
For example, intending to create a date in June on the 31st of May, will
result in the date being in July instead:
```javascript
const date = new Date(); // May 31st, 2024
date.setUTCFullYear(2024); // Still May 31st, 2024
date.setUTCMonth(5); // No such thing as June 31st, sets to July 1st
```
Add functions to get and create Time based on Unix timestamps with a millisecond or microsecond precision.
Added to_string and parse functions for TimeOfDay and Weekday
- Add functions to also get the Unix time with a millisecond or microsecond precision.
- Add functions to also get the time based on Unix time with a millisecond or microsecond precision.
Remove deprecated `list.at` usage
This reverts commit d1a797ebfd404f7ccd1d1830af2d4f3172728a0d.
Revert "Add failing test with iso8601 date format"
Add failing test with iso8601 date format
I found this confusing that it doesn't either parse correctly or error.
From the discord, our understanding it that the code is expecting some
kind of valid offset in the value but YYYY-MM-DD is a valid iso8601
format, I believe.
Imports reordered due to gleam 1.1 formatting.
fix for offset check when month or year changes
If the local time is at the start of the day but the universal time is the previous day a month or year check is required.
fix: Update to_parts JS ffi to use getUTCFullYear
```
error: Type mismatch
┌─ C:\coding\projects\realtime_chat\build\packages\birl\src\birl.gleam:1163:3
│
1163 │ range
│ ^^^^^
The type of this returned value doesn't match the return type
annotation of this function.
instead
error: Type mismatch
┌─ C:\coding\projects\realtime_chat\build\packages\birl\src\birl.gleam:1163:3
│
1163 │ range
│ ^^^^^
The type of this returned value doesn't match the return type
annotation of this function.
Expected type:
iterator.Iterator(Time)
Found type:
yielder.Yielder(Time)
```
This avoids ambiguous situations where the desired month does not have a
many days as the current date, leading to unexpected behavior.
For example, intending to create a date in June on the 31st of May, will
result in the date being in July instead:
```javascript
const date = new Date(); // May 31st, 2024
date.setUTCFullYear(2024); // Still May 31st, 2024
date.setUTCMonth(5); // No such thing as June 31st, sets to July 1st
```