-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
French Republican Calendar #71
Comments
The best thing is to start by copying one of the existing calendar systems in the ThreeTen-Extra code base. A calendar system needs three classes - the chronology, date and era. |
Thank you Stephen. I have an early draft of the classes in my fork.
Thank you for any feedback. |
It seems extending AbstractNileDate classes is more appropriate than AbstractDate, even though France is not exactly near the Nile. Would it be okay? |
Extending AbstractNileDate does make sense, maybe it could be renamed after your changes are merged.
|
I renamed as you suggested. The leap years calculation is every four years starting at 3 (thus years 15, 19, 23, 27…). It's almost what wikipedia calls "Continuous", but without the exceptions for centuries. PS : I think the "7" in org.threeten.extra.chrono.AbstractDate.getDayOfWeek() [line 176] can be replaced by "lengthOfWeek()". |
So, what's the next step? Should I create a pull request? Create a new branch on this repo? Thanks. |
@ledahulevogyre One more thing, it is best practice to create a branch first, then make changements in that branch. This makes it more complicated for you to track the master branch of the originating repo. |
This is a suggestion to "fix up" your workspace, you may challenge it if you want.
Now you have two repository in your workspace. Why is this a better situation ?
It is important to keep the branch small and focused, not combine features into 1 branch. The exception is the initial PR, where in this case you provide an implementation for a Chronology + Date + a related test class. And again, you can always check differences against Good luck. |
I have commented your initial commit ledahulevogyre@b87852a Can't wait to review your pull request, though I am not a maintainer. |
@ledahulevogyre I'd suggest responding to @catull comments with a new commit, and then follow his excellent instructions for creating a pull request, thanks |
Thank you both. |
@ledahulevogyre
I will assist you in 3 hours. I don't have access to my workspace at home.
I have a check-out of your repo as of yesterday afternoon.
You have not lost everything, I can help you.
|
By the way, this is the status of your tree yesterday afternoon: https://github.com/ledahulevogyre/threeten-extra/tree/5790541d8a507e1d7aaec33bd4825f53ddb795d9 Since all you have now is the master tree, keep it unchanged. Create a new branch, say implement-french-republic-calendar: Copy FrenchRepublicChronology.java, FrenchRepublicDate.java and FrenchRepublicEra.java from the tree reference above into src/main/java/org/threeten/extra/chrono/ locally. Copy TestFrenchRepublicChronology.java into src/test/java/org/threeten/extra/chrono/ locally. Don't worry about the review findings I filed and you already addressed. Now that you have the 4 files recovered, add them to a change-set and commit them. Push the whole thing up: Then, create a As soon as that is done, I will have a look at the PR. Good luck. |
Sorry I had to leave right after my message. Thank you a lot for your support @catull . So, I think it's not ready yet for a PR. I've commented my commit with my concerns : ledahulevogyre/threeten-extra@92c550c |
This seems to become our modus operandi. I will work on it in .... you guessed right ... about 3 hours from now. |
Initial check-in for implementation of Franch Republican chronology
Thank you @catull for so much energy into implementing this the most accurately possible. I'm really glad that someone who actually knows something about calendars does this. I see you requested more pulls from my own repo. But isn't a branch on this official repo a more appropriate place to continue the development ? |
There is one pull request open, #3 in your repo. It is all part of my plan, to assist you with your pull request here. Right now, you have to bring your branch in shape. E.g. you do not test all range checks yet. This repo is very strict with its requirement, you must implement all aspects, otherwise it will not be included. And that's why we need to carry on in your branch for the moment. Sure, you could create a Pull Request, today even. It is up to you now, either enter a PR or carry on in your repo for a while. |
I have no strong opinion on this either. Of course the master branch should be preserved from developing code. But can't a feature branch on this repo be a better place to centralize development on this calendar? I see this repo already has branches. I don't mind approving your PR's when I'm available for that. But it feels strange that I am the one who will "approve" what I don't master. |
In general, PRs work best when they are almost complete when raised. You can't have shared development on a central branch in the ThreeTen/threeten-extra repo, as you don't have permission. |
@ledahulevogyre If Stephen is working on a new feature, he is free to create as many branches as he wants and manage them. His own work is also reviewed, I guess. We outsiders, you and I included, have to clone this repo. He then is still holding the right to reject PRs, with little explanation. So it is in our best interest to produce a feature-complete PR. This is the way it works. |
Ok. @catull I'll give you permission on my repo then. Are you ok with that ? Or do you prefer to go through my approvals ? |
I plan to implement all 31 calendars described in the book "Calendrical Calculations" by Reingold and Dershowitz ultimately, in more or less alphabetical order. Since you have already started to implement the Sure, I could completely ignore your repo, do my own thing and take away the joy of contributing code to an exciting project. I chose collaboration. I hope this is not putting you off. |
Your suggestion is along the lines of what I call collaboration. In the end, you swing the bottle of champaign and let the boat sail into the waters of the Atlantic to reach the shore of Stephen's coast, symbolically speaking. |
I really don't mind if you appropriate the code. I think you have far more expertise, and you've already written more code than me anyway. Because I basically only copy/pasted the Coptic classes and adapted the epoch. So working on your repo instead of mine would be fine. And I'll be glad to help if I can. Thank you again. |
One day you may discover that this is actually great fun, to implement math properties in a very tangible way. Okay, it is still abstract because you have to think in weeks, months etc. I will try to portion the PRs in small bits, digestible. And if that is not your kind of fun, that's okay too. The |
I share your admiration for the calendar design. |
Hi,
I'd like to implement the French Republican calendar system.
The computation seems relatively feasible, but the problem is I don't know where to start. I'm not sure which classes/interfaces I should extend/implement.
ChronoLocalDate, org.threeten.extra.chrono.AbstractDate, LocalDate, ... ?
AbstractChronology, Chronology, ... ?
Can someone spare me the digging analysis ?
Thanks a lot.
The text was updated successfully, but these errors were encountered: