File tree 1 file changed +21
-0
lines changed
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):
421
421
""" alias to closest period strings BQ->Q etc"""
422
422
return _offset_to_period_map .get (offset_str , None )
423
423
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
+
424
444
425
445
_lite_rule_alias = {
426
446
'W' : 'W-SUN' ,
@@ -718,6 +738,7 @@ def get_standard_freq(freq):
718
738
719
739
720
740
def _period_str_to_code (freqstr ):
741
+ freqstr = _pure_alias .get (freqstr , freqstr )
721
742
freqstr = _lite_rule_alias .get (freqstr , freqstr )
722
743
723
744
if freqstr not in _dont_uppercase :
You can’t perform that action at this time.
0 commit comments