-
Notifications
You must be signed in to change notification settings - Fork 419
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
Already set calendar choice for a date can't be forcefully replaced by the preference one #1777
base: master
Are you sure you want to change the base?
Conversation
I don't like your reverse change. |
…ites the calendar on the previously saved dates
Looking further into the code, multiple places default to The side question is the source of truth for the internal data representation. I see Also, there is a lot of custom parsing and date manipulation logic. Would it be better to use Python's Separately, why not factor out the multi-calendar dealing logic into a separate lib, open-source it, and use that lib inside Gramps instead? I see multiple calendar X <-> calendar Y conversion libs, but no comprehensive solutions. |
Updated with a simpler fix, pls take a look @SNoiraud @Nick-Hall |
It's not OK for me. |
@@ -142,6 +142,10 @@ def __init__(self, date, uistate, track): | |||
self.new_year.set_text(self.date.newyear_to_str()) | |||
|
|||
cal = self.date.get_calendar() | |||
# for the brand new dates, use the calendar from user preferences instead of the default Date.CAL_GREGORIAN | |||
if self.date.dateval == Date.EMPTY: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should use self.date.is_empty()
to check for an empty date.
In France, I always use the Gregorian calendar. I never use the date editor because I enter the date as 01/01/1900 or January 1, 1900 in the date field. |
The python The Gramps
Conversion between the SDN and day/month/year is carried out by functions in our |
Do you still want this for dates that have been entered as Gregorian. For example if you edit "1 Jan 1900 Gregorian" it would be converted to "4 Nivôse 108". Although this is the same date, it probably isn't what you want. Perhaps the suggestion of only using the input calendar for new dates would be an acceptable fix? |
The French republican calendar is only used between 22 September 1792 and 31 December 1805.
Perhaps. I don't know. I can test it. |
OK. If we replace by
It works for me. |
See https://gramps-project.org/bugs/view.php?id=13403#c67233
This commit introduced a bug
42b71b2#diff-403f8698a9cc1199c93a43229eaeaed780e54ddae595e4fa5942eee5bb88d084
newyear
for, e.g. Hebrew, needs to be adjusted. The domain owner's feedback is needed.