I apologize ahead for this long ranty post, and thank you for bearing with me by spending your precious time.
It is unfortunate for Nepal that joda-time does not already have support for Vikram Samvat let alone any other hindu calendar system. But then it may be the case that Nepal perhaps needs to adopt a more algorithmically straightforward calendar system for official purposes.
All this maybe out of the scope of the initiative :( ?
I have been desperately researching on how I can perhaps add support and I have found some promising leads(at the moment these are way over my head) that might lead to an answer:
Books/Research Paper:
- Calendrical Calculations (Provides Common Lisp Code for Saka Samvat)
- Astronomical Algorithms
- Indian Calendrical Calculations (http://web.archive.org/web/20160417074512/http://emr.cs.iit.edu/~reingold/hindu-paper.pdf) (Common Lisp, same authors as #1)
There are also a bunch of github repositories on the subject with different approaches.
- https://github.com/espinielli/pycalcal - Python Port of "Calendrical Calculations" Common Lisp Code. has Saka Samvat calculations.
- https://github.com/dzucconi/calendrical - Javascript (Saka Samvat)
- https://github.com/kbwood/calendars - jQuery - has Nepali Calendar based on data of precalculated dates (I'd say that's a inelegant but practical hack that may pontentially bite the users in the *** like Y2K). This approach is what has been used in local software, perhaps even in proprietary Government(Tax, Internal Revenue) software.
Note: My preliminary knowledge indicates that Saka Samvat is similar to Vikram Samvat with maybe only few differences. Vikram Samvat is more usually spelled as Bikram Sambat(BS) in Nepal.
My thinking is that it may suffice to have application/UI level support for Bikram Sambat. What I mean by that is that we keep the storage and manipulation of dates in AD as it is. Date/Time is stored as Unix Time isn't it anyway? We display and do all UI level manipulation in BS based on Calendar code we derive from above resources. Actually there exists in github, a Java and an AngularJS library too for jQuery lib above(#3 - hack) kind of approach .
There might only be a need to do a little bit of architectural change required in the core in the definition of months and fiscal year. If definition of month and fiscal year could be customized(if it is not already customizable - I know fiscal year is customizable), that maybe all we need, besides the UI widgets. If that is the case then Aliens in another galaxy could theoretically use MifosX? :D
Thoughts?
I am also thinking of joining or igniting a movement for government to base official work be done in terms of AD like most of the world does including our neighbor India. As far as I have gone in finding the solution to perceived problem, I still do not know the government's actual position on AD usage so I'll be doing that soon first. It certainly is the case though that doing official work in BS makes things easier with government in Nepal.
Thanks Much!
Yalu