Skip to content

Commit

Permalink
Added the from_iso8601 and to_iso8601 methods for backwards compa…
Browse files Browse the repository at this point in the history
…tibility (with deprecated warnings)
  • Loading branch information
fuzeman committed Dec 20, 2016
1 parent cd8a55c commit 281e21d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions trakt/core/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ def try_convert(value, value_type, default=None):
# Date/Time Conversion
#

@deprecated('`from_iso8601(value)` has been renamed to `from_iso8601_datetime(value)`')
def from_iso8601(value):
return from_iso8601_datetime(value)


def from_iso8601_date(value):
if value is None:
return None
Expand Down Expand Up @@ -113,6 +118,11 @@ def from_iso8601_datetime(value):
return dt.datetime


@deprecated('`to_iso8601(value)` has been renamed to `to_iso8601_datetime(value)`')
def to_iso8601(value):
return to_iso8601_datetime(value)


def to_iso8601_date(value):
if value is None:
return None
Expand Down

0 comments on commit 281e21d

Please sign in to comment.