opensource-nepal / py-nepali

py-nepali is a python package containing features that will be useful for Nepali projects.
MIT License
22 stars 13 forks source link

Create a feature for nepali months with nepalimonth class #35

Closed aj3sh closed 1 year ago

aj3sh commented 1 year ago

The class nepalimonth help us to parse the Nepali month data and allow different formatting and operations on it.

Example:

Initialization:

month = nepalimonth(1)  # Baishakh
month = nepalimonth("Baishakh")
month = nepalimonth("बैशाख")

Usage:

month.value        # 1
month.name         # Baishakh
month.name_ne      # बैशाख