Methods
date->getDate()
Retrieve the numeric day of the month from a NepaliDate instance.
The getDate method returns the day of the month as an integer from 1 to 32 for the current NepaliDate instance. Unlike Gregorian months which have at most 31 days, Bikram Sambat calendar months can extend up to 32 days depending on the year and month.
Import
use NepaliDateLibrary\NepaliDate;Signature
public function getDate(): int;Parameters
- None.
Return Value
- Type:
int - Range:
1to32 - Description: Day of the month integer.
Example
use NepaliDateLibrary\NepaliDate;
$date = new NepaliDate('2081-07-15');
echo $date->getDate(); // 15Related
date->setDate(): Mutate the day of the month.date->getDay(): Retrieve the day of the week.
Advertisement
date->getMonth()
Retrieve the zero based Bikram Sambat month index from zero for Baisakh to eleven for Chaitra.
date->getDay()
Retrieve the numeric day of the week index from zero for Sunday through six for Saturday.