Nepali DateNepali DateBikram Sambat Date Engine
Fiscal Year & Quarters

PackagistNepaliDate::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

ParameterTypeRequiredDescription
$fiscalYearint, nullNoFour 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' NepaliDate objects.

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;
}

Advertisement

On this page