Static Methods
NepaliDate.get_day_name()
Static utility to retrieve the localized English or Nepali name for any day of the week index.
The get_day_name static method converts a numeric weekday index from 0 for Sunday through 6 for Saturday into its localized name. It supports both English and Nepali Devanagari script output, allowing flexible localization across international and local application interfaces.
Import
from nepali_date_library import NepaliDateSignature
@staticmethod
def get_day_name(
day: int,
short: bool = False,
nepali: bool = False
) -> str:Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
day | int | Yes | - | Weekday index from 0 for Sunday to 6 for Saturday. |
short | bool | No | False | Return abbreviated name. |
nepali | bool | No | False | Return name in Devanagari Nepali script. |
Return Value
- Type:
str - Description: Localized weekday name string.
Examples
from nepali_date_library import NepaliDate
# English full name (5 is Friday)
print(NepaliDate.get_day_name(5)) # "Friday"
# English abbreviation
print(NepaliDate.get_day_name(5, short=True)) # "Fri"
# Devanagari full name
print(NepaliDate.get_day_name(5, nepali=True)) # "शुक्रबार"
# Devanagari abbreviation
print(NepaliDate.get_day_name(5, short=True, nepali=True)) # "शु"Related
NepaliDate.get_month_name(): Retrieve localized month names.week_en: Complete list of English weekday names.
Advertisement
NepaliDate.get_month_name()
Static utility to retrieve the localized English or Nepali month name for any month index.
NepaliDate.get_calendar_days()
Static utility to generate a complete forty two cell calendar grid matrix for any month and year.