You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into an issue recently where I wanted to parse some date strings (e.g. 2024-10-01) and assumed that birl.parse would handle them (that's on me - should've read the docs). It seems like there's no good way to get a Time (or Day) out of a value like this without some funky string shenanigans that seem a bit brittle.
Also, there doesn't seem to be a way to turn a Day into a Time without doing something like:
Hello!
I ran into an issue recently where I wanted to parse some date strings (e.g.
2024-10-01
) and assumed thatbirl.parse
would handle them (that's on me - should've read the docs). It seems like there's no good way to get aTime
(orDay
) out of a value like this without some funky string shenanigans that seem a bit brittle.Also, there doesn't seem to be a way to turn a
Day
into aTime
without doing something like:It would be nice to be able to get a
Time
value from a date string (assuming00:00:00
would be fine and pretty normal), so I suggest either:birl.parse
(which might be a nightmare)birl.parse_day
function and afrom_day
function:fn(day: Day) -> Time
Happy to look into implementing these myself :)
The text was updated successfully, but these errors were encountered: