Methods
date->getCurrentQuarter()
Return the standard Bikram Sambat calendar quarter number from one to four for the current date.
The getCurrentQuarter method returns an integer from 1 to 4 designating the standard calendar quarter containing the current date. Calendar quarters divide the Bikram Sambat year into four sequential segments starting from 1 Baisakh, which differs from government fiscal trimesters that commence in Shrawan.
Import
use NepaliDateLibrary\NepaliDate;Signature
public function getCurrentQuarter(): int;Parameters
- None.
Return Value
- Type:
int - Range:
1to4 - Description: Standard calendar quarter number.
Example
use NepaliDateLibrary\NepaliDate;
$date = new NepaliDate('2081-01-15'); // Baisakh
echo $date->getCurrentQuarter(); // 1
$date2 = new NepaliDate('2081-07-15'); // Kartik
echo $date2->getCurrentQuarter(); // 3Related
date->getCurrentFiscalYearQuarter(): Official fiscal trimester number.Calendar Quarters Guide: Comparison guide.
Advertisement
date->getWeeksInMonth()
Calculate the number of calendar week rows required to render the current month in a grid.
date->format()
Format a NepaliDate instance into a custom string using token patterns for English and Nepali output.