File tree 1 file changed +22
-0
lines changed
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):
422
422
return _offset_to_period_map .get (offset_str , None )
423
423
424
424
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
+
425
446
_lite_rule_alias = {
426
447
'W' : 'W-SUN' ,
427
448
'Q' : 'Q-DEC' ,
@@ -718,6 +739,7 @@ def get_standard_freq(freq):
718
739
719
740
720
741
def _period_str_to_code (freqstr ):
742
+ freqstr = _pure_alias .get (freqstr , freqstr )
721
743
freqstr = _lite_rule_alias .get (freqstr , freqstr )
722
744
723
745
if freqstr not in _dont_uppercase :
You can’t perform that action at this time.
0 commit comments