Nepali DateNepali DateBikram Sambat Date Engine
Methods

date.get_english_date()

Retrieve the equivalent Gregorian date as a native JavaScript Date object.

The get_english_date method returns the native Python datetime object corresponding to the current NepaliDate instance. This allows seamless integration with third party libraries, databases, and standard Python APIs that expect a native Gregorian datetime object.


Import

from nepali_date_library import NepaliDate

Signature

def get_english_date(self) -> datetime:

Parameters

  • None.

Return Value

  • Type: datetime
  • Description: Native Python datetime object in UTC matching the current Bikram Sambat date.

Example

from nepali_date_library import NepaliDate

nd = NepaliDate("2081-07-15")
ad_date = nd.get_english_date()

print(type(ad_date)) # <class 'datetime.datetime'>
print(ad_date.strftime("%Y-%m-%d")) # "2024-10-31"

Advertisement

On this page