Skip to content

Commit

Permalink
forgot to add file in the last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
knipknap committed Nov 23, 2018
1 parent e8b20b5 commit 7842e2e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions django_find/serializers/util.py
@@ -0,0 +1,15 @@
from dateparser import parse

DATEPARSER_SETTING = {
'TIMEZONE': 'UTC',
'STRICT_PARSING': True
}

def parse_date(thedate):
thedatetime = parse(thedate)
if not thedatetime:
return None
return thedatetime.date()

def parse_datetime(thedate):
return parse(thedate)

0 comments on commit 7842e2e

Please sign in to comment.