Nepali DateNepali DateBikram Sambat Date Engine
Methods

date.get_day()

Retrieve the numeric day of the week index from zero for Sunday through six for Saturday.

The get_day method returns an integer representing the day of the week for the current NepaliDate instance. The return value ranges from 0 for Sunday to 6 for Saturday, aligning with standard calendar day conventions.


Import

from nepali_date_library import NepaliDate

Signature

def get_day(self) -> int:

Parameters

  • None.

Return Value

  • Type: int
  • Range: 0 to 6
  • Description: Day of the week integer starting from 0 for Sunday up to 6 for Saturday.

Example

from nepali_date_library import NepaliDate, week_en

date = NepaliDate("2081-07-15")
weekday_index = date.get_day()
print(weekday_index) # 5 (Friday)
print(week_en[weekday_index]) # "Friday"

Advertisement

On this page