1
0
personal-data/test/test_parse_util.py

15 lines
424 B
Python
Raw Normal View History

2024-10-25 20:24:33 +00:00
import datetime
from personal_data.parse_util import parse_date, parse_time
2024-05-09 14:58:09 +00:00
def test_parse_tme():
assert parse_time('06 Apr 2024 06:11:42 PM')
assert parse_time('26 Mar 2024 7:07:01 PM')
2024-10-25 20:24:33 +00:00
def test_parse_date():
assert parse_date('6 April 2024') == datetime.date(2024, 4, 6)
assert parse_date('April 6, 2024') == datetime.date(2024, 4, 6)
assert parse_date('Apr 6, 2024') == datetime.date(2024, 4, 6)