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 }}
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
ctparse - Parse natural language time expressions in python version: 0.3.6
Python version: 3.11.1
Operating System: MacOS
Description
What is the easiest / best way to convert a timedelta object from a Duration object? I want to go from the string "in two days" to a timedelta -> datetime, but the only thing I can think of is to manually try to match up the ctparse enums and fill out the timedelta myself. Is that the best way or is there something I'm missing?
The text was updated successfully, but these errors were encountered:
I am afraid you are right: you have to code that yourself. Duration does not have a build-in property to turn it into a timedelta. Likely somethings that would make sense to add.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
What is the easiest / best way to convert a
timedelta
object from aDuration
object? I want to go from the string "in two days" to a timedelta -> datetime, but the only thing I can think of is to manually try to match up the ctparse enums and fill out the timedelta myself. Is that the best way or is there something I'm missing?The text was updated successfully, but these errors were encountered: