Methods
date->isLeapYear()
Determine whether the current Bikram Sambat calendar year has three hundred sixty six or more days.
The isLeapYear method checks whether the active Bikram Sambat year contains 366 or more days based on official solar calendar tables. Because Bikram Sambat year lengths depend on astronomical calculations rather than fixed leap year cycles, this method checks the actual cumulative day count for the year.
Import
use NepaliDateLibrary\NepaliDate;Signature
public function isLeapYear(): bool;Parameters
- None.
Return Value
- Type:
bool - Description: Returns
trueif the year has 366 or more days.
Example
use NepaliDateLibrary\NepaliDate;
$date = new NepaliDate('2081-01-01');
var_dump($date->isLeapYear());Related
date->daysInMonth(): Total days in a month.Constants::$NEPALI_DATE_MAP: Calendar mapping table.
Advertisement
date->isValidInstance()
Validate whether the current NepaliDate instance represents a legitimate calendar date within supported bounds.
date->daysInMonth()
Retrieve the total number of days in the current or specified Bikram Sambat month.