Methods
date->endOfYear()
Return a new NepaliDate instance set to the final day of the Bikram Sambat year on the last day of Chaitra.
The endOfYear method returns a new NepaliDate instance set to the closing day of the current Bikram Sambat calendar year. This corresponds to the final day of Chaitra, which is commonly needed for annual reconciliations and fiscal year preparations.
Import
use NepaliDateLibrary\NepaliDate;Signature
public function endOfYear(): self;Parameters
- None.
Return Value
- Type:
NepaliDate - Description: New date instance on the final day of Chaitra.
Example
use NepaliDateLibrary\NepaliDate;
$date = new NepaliDate('2081-07-15');
$yearEnd = $date->endOfYear();
echo $yearEnd->format('YYYY-MM-DD');Related
date->startOfYear(): First day of the year.date->isLeapYear(): Total year day check.
Advertisement
date->startOfYear()
Return a new NepaliDate instance set to the first day of the Bikram Sambat year on 1 Baisakh.
date->isBefore()
Check whether the current date occurs chronologically before another specified date.