Coder Social home page Coder Social logo

ledahulevogyre / threeten-extra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from threeten/threeten-extra

0.0 0.0 0.0 1 MB

Provides additional date-time classes that complement those in JDK 8

Home Page: http://www.threeten.org/threeten-extra/

License: BSD 3-Clause "New" or "Revised" License

Java 99.95% CSS 0.05%

threeten-extra's People

Contributors

catull avatar clockwork-muse avatar jodastephen avatar jpgough avatar ledahulevogyre avatar nsommer avatar raupachz avatar steve-o avatar

Watchers

 avatar  avatar

threeten-extra's Issues

When does/did the French Republican year start ?

The French constitution declared three conflicting articles on the beginning of the year, which can be read here or here

Article premier: L'ère des Français compte de la fondation de la république, qui a eu lieu le 22 septembre 1792 de l'ère vulgaire, jour où le soleil est arrivé à l'équinoxe vrai d'automne, en entrant dans le signe de la balance à 9 heures 18 minutes 30 secondes du matin, pour l'observatoire de Paris.

In short: the year starts with the day of the autumnal equinox as seen from the observatory in Paris.

Article III: Le commencement de chaque année est fixé à minuit, commençant le jour où tombe l'équinoxe vrai d'automne pour l'observatoire de Paris.

In short: same as article 1, the beginning of the year is on the day of the autumnal equinox as seen in Paris.

The last article - 16 - though "fixes" the leap-year to every 4th year:

Article XVI: Tous les quatre ans, ou toutes les Franciades, au jour de la Révolution, il sera célébré des jeux républicains en mémoire de la révolution française.

The equinoxes do not follow this strict rule.

So, there are 4 variants to consider:

  1. equinox: only obeying article 1 and 3, follow the astronomical event.
    Most years will have 5, some will have 6 complimentary days.
  2. Romme: 6th complimentary day - leap day - is at the end of every 4th year, in years 4 * n
  3. continuous: leap day before every 4th year or century starts, thus years 4 * n or 400 * n, but not n * 100 or n * 4000
    -> 3, 7, 11, 15, .., 96, 104, ..., 296, 304, ..., 396, 400, 404, ..., 796, 800, 804, ..., 3996, 4004, ...
  4. 128-year: leap day in years divisible by 4 but not divisible by 128

According to Wikipedia article French Republican Calendar, variant 2 (Romme) would have had the entire 3rd century (from Gregorian year 1992 - 2091) start each year on September 22nd in the Gregorian Calendar.

Also, variant 4 has the benefit that for the Gregorian years 1920 - 2047, the French Republican years all start on September 23rd.

About formatting and parsing

Nice to see people who are also interested in the French Revolutionary Calendar. I have so far understood that you are mainly interested in the algorithmic details of historic calendar around year 1792.

My plan is to also implement this calendar but with a strong focus on text representation, too. For example, I would like to see the representation "18. Brumaire VIII" (famous coupe of Bonaparte) by just specifying a format pattern in a formatter. I know, this will not be possible with the Oracle-calendar-design of Threeten-Extra and java.time.format-API, one of many reasons why I prefer my own time library Time4J. However, you could manually add extra format()- and parse()-methods to your FrenchRepublicanDate-class... Interesting for people who are not willing to consider alternatives to Threeten-Extra for whatever reason.

Of course, if you have any special feature requests for this calendar not yet realized then just let me know.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.