-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent months data for date conversion #82
Comments
@aj3sh i have created those data calculation algorithm in https://github.com/opensource-nepal/nepdate-cli/tree/main/src bikram.h and used in main.cpp. you can check npm package bikram-js or https://github.com/build-for-nepal/bikram-calendar for typescript implementation. |
Wow thats great. Will look into it. :-) Thanks for sharing. |
@khumnath, Your algorithm has 32 days in Ashar 2082, but Hamropatro and Nepalipatro both have 31 days. Do you have any idea about that? |
The data for the year 2082 on Hamropatro has been updated and now aligns with the data on Nepalipatro, as opposed to the data previously mentioned in the issue. However, Hamropatro still contains incorrect data for the year 2087, showing 367 days in a year. Therefore, the current data will be updated using the Nepalipatro source. |
i think month index should change. every 32 days in a month should in shravan. let me see if i got time |
@aj3sh If the past dates (for which we have data) align correctly with my calculations, future dates may still have incorrect data on Nepali Patro or Hamro Patro. i have tested only some birthdays and aligned current month with weekday name. |
@khumnath I will check if your data matches with the past data. |
@khumnath I have cross-checked your data with
|
I think the calculation for the first day of the solar month should be re-evaluated here: https://github.com/build-for-nepal/bikram-calendar/blob/main/src/index.ts#L90-L115. First, we need to research whether the Bikram Sambat in Nepal uses the Drik Siddhanta or Surya Siddhanta method for its calculations. |
These are my questions, concerns before approving the PRs on the repos that I have been requested: @aj3sh , you have highlighted inconsistencies between hamropatro, nepalipatro and bikraj-js #82 (comment). Upon closer inspection it looks like hamropatro and nepalipatro are consistent in the table. Are there inconsistencies between the two for future date, like 2087 that you mentioned? Which source are we using as authoritative for the PRs opensource-nepal/go-nepali#26 (comment) and opensource-nepal/py-nepali#80 (comment)? On a somewhat higher level, could you please share your perspective on why making the BS calendar has been so challenging? We should have always used a library that algorithmically calculates the days in a month, but that seems to be challenging to build. Every year when the joytis come up with the calendar, what algorithm do they use? Work of @khumnath seems to make a way for this. But without knowing the algorithm ourselves, we cannot verify or change the code. Can you tell us more about how this stuff works? Is there a blog or a video? I have seen that you've used magic numbers such as source:
Would a library like astropy help us in any way, for example knowing the positions of the planets and the stars in the past/present/future? |
@sumanchapai, Currently, I have used NepaliPatro as my source. Based on the data I have collected while creating the issue, it appears that HamroPatro has now updated its data for the year 2082 and it still has 367 days in the year 2087. Therefore, I have chosen to follow NepaliPatro. These PR is also for the immediate fix for year 2082. Regarding your question about which algorithm to use for building the calendar, I still don’t have any idea about it. @khumnath is currently working on figuring out the algorithm. FYI: The comment was only for the previous years data. Future years data are still inconsistent. |
Nepal has had an inconsistent standard time over the years. Initially, Nepal used the Indian Ujjain longitude time, then switched to Kathmandu local time, followed by Indian Standard Time. Currently, Nepal operates on a 5:45 offset from UTC. I am unsure how longitude and latitude are used in calculating the Bikram date. The correct day and month transitions can vary depending on the time and location used, causing discrepancies in the month-changing day. I am still working on understanding these discrepancies by comparing available data. |
@khumnath thanks for the info. The work you're doing is important. Please let us know if we can be of help in any way. |
We have noticed inconsistencies in the monthly data across Hamro Patro and Nepali Patro, starting from the year 2081. This inconsistency was initially highlighted in the
go-nepali
project (opensource-nepal/go-nepali#15). The issue was addressed in this project through PR #79. However, this PR only fixes the data for the year 2081.After a thorough examination, here's what I discovered:
Here are the data from different sources:
Possible solutions
The text was updated successfully, but these errors were encountered: