datetime.info
Return a dict
describing the datetime.
Arguments:
def datetime.info(
dt: <datetime> = None,
):
Returns:
{
'day_of_month': <dec>,
'day_of_week': <str>, # monday, tuesday, ...
'day_of_year': <dec>,
'hour': <dec>,
'minute': <dec>,
'month': <str>, # january, february, ...
'month_as_number': <dec>,
'quarter': <dec>,
'second': <dec>,
'timezone': <str>,
'unix': <dec>,
'week_of_year': <dec>,
'year': <dec>,
}
Example:
now_as_dict = datetime.info(dt=datetime.now())