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
{{ message }}
Repository navigation
parse_dt method that specifically returns a DateTime #917
I have searched the issues of this repo and believe that this is not a duplicate.
I have searched the documentation and believe that my question is not covered.
Feature Request
pdl.parse can return a Date, Time, Duration, or DateTime, depending on the args you pass to it. This is annoying in type-checked codebases, because you have to write
I wish there were a function parse_dt that was guaranteed to return a DateTime, and raises if you pass it something else like '2024-09-12T10:00:00Z/2024-09-12T15:30:00Z'.
changed the title [-]`parse_datetime` method that specifically returns a datetime.[/-][+]`parse_dt` method that specifically returns a DateTime[/+]on Sep 12, 2025
Activity
[-]`parse_datetime` method that specifically returns a datetime.[/-][+]`parse_dt` method that specifically returns a DateTime[/+]Secrus commentedon Sep 12, 2025
Sounds interesting. Maybe you want to make a PR implementing those 4 variants for the types you mentioned? We could discuss it further then.