mhajiloo / persiantools

Jalali date and datetime with other tools
MIT License
69 stars 5 forks source link

Allow conversion of month names to month numbers #9

Open Huji opened 5 years ago

Huji commented 5 years ago

While jdatetime defines MONTH_NAMES_FA and similar constants, they are not accessible directly through any methods. It would be great if we had a method that would accept the string 'خرداد' and would return the number 3.

Ideally, similar methods should be also available to get the month number given the transliterated month names (for 'Khordad' return 3), and for the days of the week.