amitgaru2 / nepali-datetime

Python's core datetime inspired Bikram Sambat (BS date) & Nepal Time (NPT) package🇳🇵
https://pypi.org/project/nepali-datetime/
MIT License
61 stars 30 forks source link

Need to add datetime converter (AD to BS) and vice versa #10

Closed vector65536 closed 4 years ago

vector65536 commented 4 years ago

hello there. I have also had experience with this package also (Nepali: v 0.4.1) in pip. however I love this module and seen how this has evolved..!

If its not asking too much, can we have more features - AD to BS and vice versa converter,, months' name in Nepali (unicode) also.. strfdate and time nepali (unicode) as well.. render nepali calendar with tabbed/spacing month view (np/en)...

thanks for adding more datetime operations.. I have starred this project for your effort.

amitgaru2 commented 4 years ago

Hi @designjeevan thanks for the enhancement proposals. Everything you mentioned is a valid case for enhancements. I will require some of your helps. I will summarize the enhancements in 3 points

  1. AD to BS converter & vice-versa
  2. Nepali unicode support for month and other part of datetime (day, year, time) along with strftime support
  3. Render Nepali calendar with unicode support

Regarding point 1 there is actually AD to BS converter already but not BS to AD. From AD to BS you can use from_datetime_date method of date class.

nepali_datetime.date.from_datetime_date(datetime.date(2020,10,10))

For BS to AD I will create new method to_datetime_date.

For point 2 can you comment out the list of Nepali months unicode. I will try to use them.

And after that will work in point 3.

Thanks

vector65536 commented 4 years ago

thanks for the response ))

(for no. 2) वैशाख, जेठ, असार, श्रावण, भाद्र, आश्विन, कार्तिक, मंसिर, पौष, माघ, फागुन, चैत्र Source if we could add more functions as seen in this javascript implementaion of the same. I am a beginner in python and after getting used to this, I wish I could also contribute to this module.

P.S. I have also discovered this package, but can't find the resemblance between the two.