Methods
date.get_time()
Retrieve the numeric timestamp in milliseconds since the Unix epoch.
The get_time method returns the number of milliseconds elapsed since the Unix epoch of January 1, 1970 UTC. This integer value matches the return value of standard epoch timestamps and allows direct numerical comparison between date instances.
Import
from nepali_date_library import NepaliDateSignature
def get_time(self) -> int:Parameters
- None.
Return Value
- Type:
int - Description: Milliseconds elapsed since January 1, 1970 00:00:00 UTC.
Example
from nepali_date_library import NepaliDate
d1 = NepaliDate("2081-01-01")
d2 = NepaliDate("2081-01-02")
print(d1.get_time() < d2.get_time()) # TrueRelated
date.get_english_date(): Retrieve Python datetime object.date.diff(): Calculate duration differences.
Advertisement
date.get_milliseconds()
Retrieve the millisecond component from zero to nine hundred ninety nine.
date.get_english_date()
Retrieve the equivalent Gregorian date as a native JavaScript Date object.