Nepali DateNepali DateBikram Sambat Date Engine
Methods

Packagistdate->getYear()

Retrieve the four digit Bikram Sambat year number from a NepaliDate instance.

The getYear method returns the full four digit Bikram Sambat year as an integer for the current NepaliDate instance. It returns the complete calendar year such as 2081 within the supported range of 1976 through 2100 BS.


Import

use NepaliDateLibrary\NepaliDate;

Signature

public function getYear(): int;

Parameters

  • None.

Return Value

  • Type: int
  • Range: 1976 to 2100
  • Description: Four digit Bikram Sambat year integer.

Example

use NepaliDateLibrary\NepaliDate;

$date = new NepaliDate('2081-07-15');
echo $date->getYear(); // 2081

Advertisement

On this page