faker.providers.date_timeΒΆ

fake.date_time_this_decade(before_now=True, after_now=False, tzinfo=None)
# datetime(2010, 7, 3, 14, 42, 6)

fake.date_time_ad(tzinfo=None)
# datetime.datetime(391, 2, 24, 12, 1, 5)

fake.month_name()
# 'October'

fake.date_time(tzinfo=None)
# datetime(1994, 6, 29, 2, 7, 44)

fake.month()
# '11'

fake.timezone()
# 'Asia/Rangoon'

fake.time_object()
# datetime.time(0, 14, 48)

fake.date_time_between(start_date="-30y", end_date="now", tzinfo=None)
# datetime(1987, 10, 4, 21, 52, 9)

fake.date_time_this_month(before_now=True, after_now=False, tzinfo=None)
# datetime(2017, 4, 10, 18, 34, 58)

fake.century()
# 'I'

fake.day_of_month()
# '21'

fake.date_time_this_century(before_now=True, after_now=False, tzinfo=None)
# datetime(2003, 12, 20, 3, 34, 40)

fake.day_of_week()
# 'Sunday'

fake.time_delta()
# datetime.timedelta(128, 65858)

fake.time(pattern="%H:%M:%S")
# '21:26:11'

fake.iso8601(tzinfo=None)
# '2002-05-21T10:13:56'

fake.year()
# '2008'

fake.unix_time()
# 125995798

fake.am_pm()
# 'PM'

fake.date(pattern="%Y-%m-%d")
# '2013-05-22'

fake.date_object()
# date(1999, 7, 6)

fake.date_time_this_year(before_now=True, after_now=False, tzinfo=None)
# datetime(2017, 4, 10, 17, 46, 9)

fake.date_time_between_dates(datetime_start=None, datetime_end=None, tzinfo=None)
# datetime(2017, 4, 26, 21, 22, 17)