Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/caarmen/french-revolutionary-calendar
https://github.com/caarmen/french-revolutionary-calendar
lib
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/caarmen/french-revolutionary-calendar
- Owner: caarmen
- License: lgpl-2.1
- Created: 2014-07-13T22:27:55.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-07-04T11:35:26.000Z (over 6 years ago)
- Last Synced: 2023-12-20T17:05:59.739Z (11 months ago)
- Topics: lib
- Language: Kotlin
- Size: 313 KB
- Stars: 10
- Watchers: 4
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
French Revolutionary Calendar Library
=====================================Library providing conversion between Gregorian calendar dates
and French Revolutionary calendar dates.Also converts 24-hour time to decimal time.
Reference: http://en.wikipedia.org/wiki/French_Republican_Calendar
Library
-------
To use this in your project:Maven:
```ca.rmen
lib-french-revolutionary-calendar
1.8.2
pom```
Gradle:
```
compile 'ca.rmen:lib-french-revolutionary-calendar:1.8.2'```
Usage:
```java
FrenchRevolutionaryCalendar frc =
new FrenchRevolutionaryCalendar(
Locale.getDefault(),
FrenchRevolutionaryCalendar.CalculationMethod.ROMME):FrenchRevolutionaryCalendarDate frenchDate =
frc.getDate((GregorianCalendar) Calendar.getInstance());String text = "Today is " + frenchDate.getWeekdayName()
+ ", " + frenchDate.dayOfMonth
+ " " + frenchDate.getMonthName() + " " + frenchDate.year;
```Command-line program
--------------------
A command-line program is available.Build it with: `mvn clean package`
Run it with `java -jar ./cli/target/french-revolutionary-calendar-cli-1.8.2.jar`
With no arguments, it will print out a usage text.
Examples:
Display the current time in the French Revolutionary Calendar:
```shell
$java -jar ./cli/target/french-revolutionary-calendar-cli-1.8.2.jar now
Quartidi, 04-Thermidor-225, 8:70:99, The plant:Ryegrass
```
Display an arbitrary date in the French Revolutionary Calendar:
```
$ java -jar ./cli/target/french-revolutionary-calendar-cli-1.8.2.jar g2f 1998-06-10
Parsing using format yyyy-MM-dd
Duodi, 22-Prairial-206, 0:00:00, The plant:Camomile
```