pygeodes.utils.datetime_utils#

This module contains all things related to date and time

Functions

a_day_ago()

Returns a datetime object from 24h ago

a_week_ago()

Returns a datetime object from a week ago

complete_datetime_from_str(string)

Returns a valid string for format pygeodes.utils.consts.DATETIME_FORMAT from a non-valid string (under some defined formats)

datetime_to_str(datetime_obj)

Returns a datetime string from a datetime obj

is_in_format(string, format)

Returns wether string string is in format format

str_to_datetime(string)

Returns a datetime object from the provided datetime string

time_ago(date)

Returns a string with how long ago was the date provided

today()

Returns two datetime objects, today at first time (00:00), today at last time (23:59)