Static Methods
NepaliDate.get_month_name()
Static utility to retrieve the localized English or Nepali month name for any month index.
The get_month_name static method returns the localized name of a Bikram Sambat month given its zero based index from 0 for Baisakh to 11 for Chaitra. It supports full names as well as short abbreviations in both English and Devanagari script.
Import
from nepali_date_library import NepaliDateSignature
@staticmethod
def get_month_name(
month: int,
short: bool = False,
nepali: bool = False
) -> str:Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
month | int | Yes | - | Zero based month index from 0 to 11. |
short | bool | No | False | Return abbreviated three letter or short string. |
nepali | bool | No | False | Return name in native Devanagari Nepali script. |
Return Value
- Type:
str - Description: Localized month name string.
Examples
from nepali_date_library import NepaliDate
# English full name (Kartik is index 6)
print(NepaliDate.get_month_name(6)) # "Kartik"
# English abbreviation
print(NepaliDate.get_month_name(6, short=True)) # "Kar"
# Devanagari full name
print(NepaliDate.get_month_name(6, nepali=True)) # "कार्तिक"
# Devanagari abbreviation
print(NepaliDate.get_month_name(6, short=True, nepali=True)) # "का"Related
NepaliDate.get_day_name(): Retrieve localized weekday names.month_en: Complete list of English month names.
Advertisement
NepaliDate.maximum()
Static method returning the maximum supported date boundary for the NepaliDate calendar engine.
NepaliDate.get_day_name()
Static utility to retrieve the localized English or Nepali name for any day of the week index.