File tree 1 file changed +4
-5
lines changed
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -246,15 +246,14 @@ def get_start_end_field(
246
246
if freqstr:
247
247
if freqstr == " C" :
248
248
raise ValueError (f" Custom business days is not supported by {field}" )
249
- is_business = freqstr[0 ] == " B"
250
-
249
+ period_str = " " .join([
250
+ dt_char for dt_char in list (freqstr.split(" -" )[0 ]) if not dt_char.isdigit()
251
+ ])
252
+ is_business = period_str == " B"
251
253
# YearBegin(), BYearBegin() use month = starting month of year.
252
254
# QuarterBegin(), BQuarterBegin() use startingMonth = starting
253
255
# month of year. Other offsets use month, startingMonth as ending
254
256
# month of year.
255
- period_str = " " .join([
256
- dt_char for dt_char in list (freqstr.split(" -" )[0 ]) if not dt_char.isdigit()
257
- ])
258
257
if (period_str in [" MS" , " QS" , " YS" ]):
259
258
end_month = 12 if month_kw == 1 else month_kw - 1
260
259
start_month = month_kw
You can’t perform that action at this time.
0 commit comments