Date Ranges¶
Fiscal range methods are inclusive and constrained to the represented fiscal year.
Count Days¶
from datetime import date
start_date = date( 2026, 7, 1 )
end_date = date( 2026, 7, 31 )
weekends = fy.count_weekends( start_date, end_date )
holidays = fy.count_holidays( start_date, end_date )
workdays = fy.count_workdays( start_date, end_date )
Calculate Hours¶
Calculate OMB compensable hours by counting every Monday-through-Friday date, including federal holidays:
Calculate scheduled federal work hours after excluding observed holidays:
Both methods default to eight hours per day and return Decimal. Supply a different positive daily
schedule when needed:
Calculate FTE¶
Calculate the annual regular-method FTE represented by the range:
fte_between() divides compensable range hours by the database-provided CompensableHours value
for the selected fiscal year. The result is the portion of one annual FTE represented by the range;
it is not annualized to make a partial period equal one FTE. Supply hours_per_day=6 to calculate
the annual FTE represented by a six-hour-per-day schedule.
Return Holiday Dates¶
Preferred native-date contract:
Compatibility ISO-string contract:
A reversed range or a range that does not intersect the represented fiscal year raises boogr.Error.