Nepali DateNepali DateBikram Sambat Date Engine
Fiscal Year & Quarters

NepaliDate.get_fiscal_quarter()

Static method to determine the fiscal trimester number for any specified month index.

The static get_fiscal_quarter method determines the fiscal trimester number corresponding to a given Bikram Sambat month index from 0 to 11. It allows quick lookups without needing to instantiate a full NepaliDate object, making it useful in financial aggregation pipelines and reporting utilities.


Import

from nepali_date_library import NepaliDate

Signature

@staticmethod
def get_fiscal_quarter(
    quarter: int,
    fiscal_year: Optional[int] = None
) -> Dict[str, NepaliDate]:

Parameters

ParameterTypeRequiredDescription
quarterintYesTrimester index from 1 to 4.
fiscal_yearOptional[int]NoStarting Bikram Sambat year of the fiscal period. Defaults to current fiscal year.

Return Value

  • Type: Dict[str, NepaliDate]
  • Structure: Dictionary with "start" and "end" keys holding boundary NepaliDate instances.

Examples

from nepali_date_library import NepaliDate

# Get boundaries for Q2 of fiscal year 2081/82 BS
q2_dates = NepaliDate.get_fiscal_quarter(quarter=2, fiscal_year=2081)

print(f"Start: {q2_dates['start'].format('YYYY-MM-DD')}") # 1 Kartik
print(f"End:   {q2_dates['end'].format('YYYY-MM-DD')}")   # Last day of Poush

Advertisement

On this page