aerawatcorp / bikram Goto Github PK
View Code? Open in Web Editor NEWPythonic date object, parser, converter to work with Bikram Samwat (Nepali) dates
Home Page: https://bikram.readthedocs.io
License: MIT License
Pythonic date object, parser, converter to work with Bikram Samwat (Nepali) dates
Home Page: https://bikram.readthedocs.io
License: MIT License
It should return YYYY-MM-DD so that string representation is predictable and similar to datetime.date
Adding samwat object with timedelta object didn't return the correct output.
samwat(2000, 2, 2) + timedelta(days=1)
Out[1]: samwat(2000, 10, 21)
Expected output --> samwat(2000, 2, 3)
was curious how did you get those values?
need to check for a max day in the month
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
Currently it parses the date, but does not format the date object to string.
I had done a similar converter few months ago, and when I was thinking of taking it to public, I found yours.
Upon curiosity, the first thing I checked was the map of dates :)
My approach was something like this
2087-9-1 => December, 17 2030 | <span>२०८७ पौष १</span>
2087-10-1 => January, 15 2031 | <span>२०८७ माघ १</span>
2087-11-1 => February, 14 2031 | <span>२०८७ फाल्गुण १</span>
2087-12-1 => March, 16 2031 | <span>२०८७ चैत्र १</span>
2088-1-1 => April, 15 2031 | <span>२०८८ बैशाख १</span>
2088-2-1 => May, 15 2031 | <span>२०८८ जेठ १</span>
2088-3-1 => June, 15 2031 | <span>२०८८ आषाढ १</span>
2088-4-1 => July, 17 2031 | <span>२०८८ श्रावण १</span>
2088-5-1 => August, 18 2031 | <span>२०८८ भाद्र १</span>
The first date of the month in BS calendar stored with the equivalent Gregorian Calendar date.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.