Nepali DateNepali DateBikram Sambat Date Engine
Methods

Packagistdate->endOfWeek()

Return a new NepaliDate instance set to the final day of the current week on Saturday.

The endOfWeek method produces a new NepaliDate instance representing the last day of the week containing the current date. In standard Nepali calendar practice, Saturday is regarded as the final day of the weekly cycle.


Import

use NepaliDateLibrary\NepaliDate;

Signature

public function endOfWeek(int $startOfWeek = 0): self;

Parameters

ParameterTypeRequiredDefaultDescription
$startOfWeekintNo0Weekday index treated as week start.

Return Value

  • Type: NepaliDate
  • Description: New date instance set to Saturday (index 6).

Example

use NepaliDateLibrary\NepaliDate;

$date = new NepaliDate('2081-07-15');
$weekEnd = $date->endOfWeek();
echo $weekEnd->getDay(); // 6 (Saturday)

Advertisement

On this page