How can I translate dates and times from natural language to datetime? [closed]
parsedatetime – Python module that is able to parse ‘human readable’ date/time expressions. #!/usr/bin/env python from datetime import datetime import parsedatetime as pdt # $ pip install parsedatetime cal = pdt.Calendar() now = datetime.now() print(“now: %s” % now) for time_string in [“tomorrow at 6am”, “next moday at noon”, “2 min ago”, “3 weeks ago”, “1 … Read more