dates

dates

Functions

Name Description
closest Round a date to the closest hour, by steps of h hours
date_range Returns a list of days starting from date_start, up to date_end included
duration Returns a timedelta from a string s
get_month_range Returns a couple of date corresponding to start and end of the month
now_isofmt Returns now in iso format
round_date Round a date to the bracketing hours, by steps of h hours
time_range Returns a list of datetime starting from start, up to end included

closest

dates.closest(date, h)

Round a date to the closest hour, by steps of h hours

date_range

dates.date_range(date_start, date_end)

Returns a list of days starting from date_start, up to date_end included

duration

dates.duration(s)

Returns a timedelta from a string s

get_month_range

dates.get_month_range(year, month)

Returns a couple of date corresponding to start and end of the month

now_isofmt

dates.now_isofmt()

Returns now in iso format

round_date

dates.round_date(date, h)

Round a date to the bracketing hours, by steps of h hours

time_range

dates.time_range(start, end, step)

Returns a list of datetime starting from start, up to end included