Static Methods
NepaliDate::minimum()
Static method returning the minimum supported date boundary for the NepaliDate calendar engine.
The minimum static method returns a native PHP DateTimeImmutable object representing the earliest Gregorian date supported by the library calendar engine. This corresponds to the first day of Baisakh in year 1976 BS and provides a reliable lower boundary for date pickers and form input validation.
Import
use NepaliDateLibrary\NepaliDate;Signature
public static function minimum(): DateTimeImmutable;Parameters
- None.
Return Value
- Type:
DateTimeImmutable - Value: Gregorian UTC datetime corresponding to
1976-01-01 BS(mid April 1919 AD).
Examples
use NepaliDateLibrary\NepaliDate;
$minDate = NepaliDate::minimum();
echo "Earliest supported AD date: " . $minDate->format('Y-m-d') . PHP_EOL;
// Construct NepaliDate from the minimum boundary
$ndMin = new NepaliDate($minDate);
echo "Earliest BS date: " . $ndMin->format('YYYY-MM-DD'); // "1976-01-01"Related
NepaliDate::maximum(): Latest supported date boundary.NepaliDate::isValid(): Validate date coordinates.
Advertisement
NepaliDate::isValid()
Static validation function to verify whether a given year, month, and day combination forms a valid Bikram Sambat date.
NepaliDate::maximum()
Static method returning the maximum supported date boundary for the NepaliDate calendar engine.