faker.providers.date_timeΒΆ

fake.date_time_this_month(before_now=True, after_now=False, tzinfo=None)
# datetime.datetime(2017, 6, 8, 9, 1, 46)

fake.date_time_ad(tzinfo=None)
# datetime.datetime(1138, 11, 5, 4, 24, 25)

fake.century()
# 'XI'

fake.date_object()
# date(2000, 11, 2)

fake.past_date(start_date="-30d", tzinfo=None)
# datetime.date(2017, 6, 5)

fake.iso8601(tzinfo=None)
# '2004-03-14T06:26:48'

fake.date_time_between(start_date="-30y", end_date="now", tzinfo=None)
# datetime.datetime(1991, 9, 7, 14, 38, 50)

fake.am_pm()
# 'PM'

fake.year()
# '2016'

fake.date_time(tzinfo=None)
# datetime(2012, 3, 21, 4, 57, 28)

fake.day_of_month()
# '01'

fake.future_date(end_date="+30d", tzinfo=None)
# datetime.date(2017, 7, 6)

fake.date_time_this_decade(before_now=True, after_now=False, tzinfo=None)
# datetime.datetime(2017, 4, 21, 14, 55, 38)

fake.past_datetime(start_date="-30d", tzinfo=None)
# datetime.datetime(2017, 5, 29, 0, 30, 20)

fake.time_object()
# datetime.time(9, 20, 53)

fake.time_delta()
# datetime.timedelta(7215, 74478)

fake.time(pattern="%H:%M:%S")
# '04:47:44'

fake.month()
# '11'

fake.month_name()
# 'April'

fake.date_time_this_year(before_now=True, after_now=False, tzinfo=None)
# datetime.datetime(2017, 4, 8, 1, 54, 50)

fake.timezone()
# 'Europe/Andorra'

fake.date(pattern="%Y-%m-%d")
# '1976-02-23'

fake.date_time_between_dates(datetime_start=None, datetime_end=None, tzinfo=None)
# datetime.datetime(2017, 6, 22, 17, 52, 3)

fake.future_datetime(end_date="+30d", tzinfo=None)
# datetime.datetime(2017, 7, 12, 13, 21, 7)

fake.day_of_week()
# 'Wednesday'

fake.date_time_this_century(before_now=True, after_now=False, tzinfo=None)
# datetime.datetime(2008, 2, 24, 2, 21, 45)

fake.unix_time()
# 471617369