Configurations

class dateparser.conf.Settings(settings=None)[source]

Control and configure default parsing behavior of dateparser. Currently, supported settings are:

  • PREFER_DATES_FROM: defaults to current_period. Options are future or past.
  • SUPPORT_BEFORE_COMMON_ERA: defaults to False.
  • PREFER_DAY_OF_MONTH: defaults to current. Could be first and last day of month.
  • SKIP_TOKENS: defaults to [‘t’]. Can be any string.
  • TIMEZONE: defaults to UTC. Can be timezone abbreviation or any of tz database name as given here.
  • RETURN_AS_TIMEZONE_AWARE: return tz aware datetime objects in case timezone is detected in the date string.