diff --git a/src/my_package/date_to_unix.py b/src/my_package/date_to_unix.py index 89da30b..119d6f5 100644 --- a/src/my_package/date_to_unix.py +++ b/src/my_package/date_to_unix.py @@ -3,6 +3,12 @@ import time def get_unix_timestamp(): + ''' + This function will make the user input a start_date and end_date, then return a unix timestamp. + The user get asked to input in this format: yyyy, mm, dd, hh, mm. But if the user only insert + yyyy, mm, dd. The function will say the hour is 00, the same with minutes. + ''' + start_date_input = input("Choose a start date (yyyy, mm, dd, hh, mm): ") end_date_input = input("Choose an end date (yyyy, mm, dd, hh, mm): ") @@ -49,11 +55,16 @@ def get_unix_timestamp(): return unix_start, unix_end def from_unix_timestamp(unix_start, unix_end): + ''' + This function will take in the parameters unix_start, unix_end, and then convert from unix + timestamp to the inserted: yyyy, mm, dd, hh, mm + ''' + start_from_unix = datetime.datetime.fromtimestamp(unix_start) end_from_unix = datetime.datetime.fromtimestamp(unix_end) return start_from_unix, end_from_unix - - - +# This prints the documentation for the functions written inside '''these''' +print(get_unix_timestamp.__doc__) +print(from_unix_timestamp.__doc__)