Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1""" 

2config for datetime formatting 

3""" 

4from pandas._config import config as cf 

5 

6pc_date_dayfirst_doc = """ 

7: boolean 

8 When True, prints and parses dates with the day first, eg 20/01/2005 

9""" 

10 

11pc_date_yearfirst_doc = """ 

12: boolean 

13 When True, prints and parses dates with the year first, eg 2005/01/20 

14""" 

15 

16with cf.config_prefix("display"): 

17 # Needed upstream of `_libs` because these are used in tslibs.parsing 

18 cf.register_option( 

19 "date_dayfirst", False, pc_date_dayfirst_doc, validator=cf.is_bool 

20 ) 

21 cf.register_option( 

22 "date_yearfirst", False, pc_date_yearfirst_doc, validator=cf.is_bool 

23 )