You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
from ctparse import ctparse
|
|
from datetime import datetime
|
|
|
|
def parsetime(phrase):
|
|
ts = datetime.now()
|
|
return ctparse(phrase, ts=ts)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
print(parsetime('May 5th 2:30 in the afternoon').ref_time) |