Skip to content

Commit

Permalink
#145: Make small changes to date handler
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Oct 9, 2020
1 parent 1f866f1 commit b8534e4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions common/date_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def is_str_a_date(potential_date):
except ValueError:
return False

@staticmethod
def str_to_datetime_object(data):
"""
Convert a string to a `datetime.datetime` object. This is commonly used when
Expand Down Expand Up @@ -64,9 +65,6 @@ def datetime_object_to_str(date_obj):
"""
Convert a datetime object to a string so it can be outputted in JSON
There's currently no reason to make this function static, but it could be useful
in the future if a use case required this functionality.
:param date_obj: Datetime object from data from an ICAT entity
:type date_obj: :class:`datetime.datetime`
:return: Datetime (of type string) in the agreed format
Expand Down

0 comments on commit b8534e4

Please sign in to comment.