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