File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -422,6 +422,27 @@ def get_period_alias(offset_str):
422422 return _offset_to_period_map .get (offset_str , None )
423423
424424
425+ _pure_alias = {
426+ # 'A' is equivalent to 'Y'.
427+ 'Y' : 'A' ,
428+ 'YS' : 'AS' ,
429+ 'BY' : 'BA' ,
430+ 'BYS' : 'BAS' ,
431+ 'Y-DEC' : 'A-DEC' ,
432+ 'Y-JAN' : 'A-JAN' ,
433+ 'Y-FEB' : 'A-FEB' ,
434+ 'Y-MAR' : 'A-MAR' ,
435+ 'Y-APR' : 'A-APR' ,
436+ 'Y-MAY' : 'A-MAY' ,
437+ 'Y-JUN' : 'A-JUN' ,
438+ 'Y-JUL' : 'A-JUL' ,
439+ 'Y-AUG' : 'A-AUG' ,
440+ 'Y-SEP' : 'A-SEP' ,
441+ 'Y-OCT' : 'A-OCT' ,
442+ 'Y-NOV' : 'A-NOV' ,
443+ }
444+
445+
425446_lite_rule_alias = {
426447 'W' : 'W-SUN' ,
427448 'Q' : 'Q-DEC' ,
@@ -718,6 +739,7 @@ def get_standard_freq(freq):
718739
719740
720741def _period_str_to_code (freqstr ):
742+ freqstr = _pure_alias .get (freqstr , freqstr )
721743 freqstr = _lite_rule_alias .get (freqstr , freqstr )
722744
723745 if freqstr not in _dont_uppercase :
You can’t perform that action at this time.
0 commit comments