Nepali DateNepali DateBikram Sambat Date Engine
Methods

Packagistdate->startOfMonth()

Return a new NepaliDate instance set to the first day of the current Bikram Sambat month.

The startOfMonth method returns a new NepaliDate instance positioned on day 1 of the active Bikram Sambat month with time set to midnight. It is commonly used for monthly calendar views, statements, and aggregation buckets.


Import

use NepaliDateLibrary\NepaliDate;

Signature

public function startOfMonth(): self;

Parameters

  • None.

Return Value

  • Type: NepaliDate
  • Description: New date instance on day 1 of the month.

Example

use NepaliDateLibrary\NepaliDate;

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

Advertisement

On this page