Add get_resolution functionality

Merged
#4 · Created  · Last updated

Merged pull request

Merged in edrevo/aniso8601/add-resolution (pull request #4)

1662077·Author: ·Closed by: ·2014-11-26

Description

As per the feedback in https://bitbucket.org/nielsenb/aniso8601/pull-request/3/optionally-return-date-and-time-format, the get_resolution method has been added in this pull request.

If you want, I can also reimplement the parse_date and parse_time functions in terms of the get_resolution function, like:

def parse_date(isodatestr): resolution = get_resolution(isodatestr) if resolution == DateResolution.Year: return parse_year(isodatestr) elif resolution == DateResolution.Ordinal: return parse_ordinal(isodatestr) [...]

0 attachments

0 comments

Loading commits...