Fiscal Year & Quarters
NepaliDate::getFiscalYearQuarters()
Static utility returning all four fiscal trimesters with their constituent months and date ranges for a given year.
The static getFiscalYearQuarters method returns a complete structural breakdown of all four fiscal trimesters for a specified Bikram Sambat year. Each quarter entry includes its trimester index, English and Nepali month names, and corresponding calendar boundary information.
Import
use NepaliDateLibrary\NepaliDate;Signature
public static function getFiscalYearQuarters(?int $fiscalYear = null): array;Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
$fiscalYear | int, null | No | Four digit starting Bikram Sambat year. Defaults to current fiscal year. |
Return Value
- Type:
array<string, array{start: NepaliDate, end: NepaliDate}> - Structure: An associative array with keys
'Q1','Q2','Q3', and'Q4', each containing'start'and'end'NepaliDateobjects.
Examples
use NepaliDateLibrary\NepaliDate;
$quarters = NepaliDate::getFiscalYearQuarters(2081);
foreach ($quarters as $qName => $boundaries) {
$startStr = $boundaries['start']->format('YYYY-MM-DD');
$endStr = $boundaries['end']->format('YYYY-MM-DD');
echo "{$qName}: {$startStr} to {$endStr}" . PHP_EOL;
}Related
NepaliDate::getFiscalYearQuarter(): Query a single trimester boundary.date->getCurrentFiscalYearQuarterDates(): Active quarter boundaries for an instance.
Advertisement
NepaliDate::getFiscalYearQuarter()
Static method to determine the fiscal trimester number for any specified month index.
Calendar Quarters
Explanation of standard Bikram Sambat calendar quarters compared to government fiscal trimesters.