1"""
2config for datetime formatting
3"""
4
5from __future__ import annotations
6
7from pandas._config import config as cf
8
9pc_date_dayfirst_doc = """
10: boolean
11 When True, prints and parses dates with the day first, eg 20/01/2005
12"""
13
14pc_date_yearfirst_doc = """
15: boolean
16 When True, prints and parses dates with the year first, eg 2005/01/20
17"""
18
19with cf.config_prefix("display"):
20 # Needed upstream of `_libs` because these are used in tslibs.parsing
21 cf.register_option(
22 "date_dayfirst", False, pc_date_dayfirst_doc, validator=cf.is_bool
23 )
24 cf.register_option(
25 "date_yearfirst", False, pc_date_yearfirst_doc, validator=cf.is_bool
26 )