Closed acpmasquerade closed 6 years ago
I had wondered if there was a better way to represent the map but couldn't think of anything useful at the time of writing this. I can see how date-to-date map could work instead of the current one but don't see how it's better.
Having said that, even though the converter is a major part of this library, my main objective on writing it was to build an easy to use date object that I could pass around functions, and can perform calculations with the native date object. The converter was a necessary evil because the samwat
object would not be useful without a conversion.
I liked the concept of have a utility around Bikram Sambat and that is portable with the native date objects. #Kudos. (The date-to-date map might not be better, it was the just the first thought I had :P)
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
The first date of the month in BS calendar stored with the equivalent Gregorian Calendar date.