File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -421,6 +421,26 @@ def get_period_alias(offset_str):
421421 """ alias to closest period strings BQ->Q etc"""
422422 return _offset_to_period_map .get (offset_str , None )
423423
424+ _pure_alias = {
425+ # 'A' is equivalent to 'Y'.
426+ 'Y' : 'A' ,
427+ 'YS' : 'AS' ,
428+ 'BY' : 'BA' ,
429+ 'BYS' : 'BAS' ,
430+ 'Y-DEC' : 'A-DEC' ,
431+ 'Y-JAN' : 'A-JAN' ,
432+ 'Y-FEB' : 'A-FEB' ,
433+ 'Y-MAR' : 'A-MAR' ,
434+ 'Y-APR' : 'A-APR' ,
435+ 'Y-MAY' : 'A-MAY' ,
436+ 'Y-JUN' : 'A-JUN' ,
437+ 'Y-JUL' : 'A-JUL' ,
438+ 'Y-AUG' : 'A-AUG' ,
439+ 'Y-SEP' : 'A-SEP' ,
440+ 'Y-OCT' : 'A-OCT' ,
441+ 'Y-NOV' : 'A-NOV' ,
442+ }
443+
424444
425445_lite_rule_alias = {
426446 'W' : 'W-SUN' ,
@@ -718,6 +738,7 @@ def get_standard_freq(freq):
718738
719739
720740def _period_str_to_code (freqstr ):
741+ freqstr = _pure_alias .get (freqstr , freqstr )
721742 freqstr = _lite_rule_alias .get (freqstr , freqstr )
722743
723744 if freqstr not in _dont_uppercase :
You can’t perform that action at this time.
0 commit comments