Nepali DateNepali DateBikram Sambat Date Engine
Methods

Packagistdate->startOfYear()

Return a new NepaliDate instance set to the first day of the Bikram Sambat year on 1 Baisakh.

The startOfYear method returns a new NepaliDate instance set to 1 Baisakh, the first day of the Bikram Sambat calendar year. This is useful for year to date financial tracking and annual summary reports.


Import

use NepaliDateLibrary\NepaliDate;

Signature

public function startOfYear(): self;

Parameters

  • None.

Return Value

  • Type: NepaliDate
  • Description: New date instance positioned on 1 Baisakh of the current year.

Example

use NepaliDateLibrary\NepaliDate;

$date = new NepaliDate('2081-07-15');
$yearStart = $date->startOfYear();
echo $yearStart->format('YYYY-MM-DD'); // "2081-01-01"

Advertisement

On this page