Jollyday - A holiday API

Overview

Jollyday

Sonarcloud Bugs Build Status Coverage Status Maven Central

File encoding: Please use UTF-8 as your default file encoding. Code formatting: Please use the provided code-formatter.xml as your project code formatter.

0.4 Branch

To use latest release based on Joda-Time add this to your pom.xml:

<dependency>
    <groupId>de.jollyday</groupId>
    <artifactId>jollyday</artifactId>
    <version>0.4.9</version>
</dependency>

0.5 Branch

To use latest release based on Java Time API and Threeten-Extra library add this to your pom.xml:

<dependency>
    <groupId>de.jollyday</groupId>
    <artifactId>jollyday</artifactId>
    <version>0.5.8</version>
</dependency>

0.6 Branch planned

Planning to replace usage of JAXB with JiBX/XStream

License

Apache License, Version 2.0

Comments
  • Add OSGi support

    Add OSGi support

    I added the necessary plugins and config to create an OSGi bundle during the build. This should not influence usage outside of OSGi.

    You can install in OSGi by downloading and installing apache karaf 4.1.1 and issue these commands: install -s mvn:org.threeten/threeten-extra/1.2 install -s mvn:de.jollyday/jollyday/0.5.3-SNAPSHOT

    The bundles should start without issues.

    opened by cschneider 15
  • Holiday translation ignored from holiday_descriptions_de.properties

    Holiday translation ignored from holiday_descriptions_de.properties

    Hi all, I've added Christmas_eve as personal holiday to my holiday-de.xml and this is working perfectly and even more it's translated properly from holiday_descriptions_de.properties

    But I've added few more personal holidays and like to continue with English in XML to have it common. Therefore I've added proper translation to holiday_descriptions_de.properties which is ignored. Is this already known issue and are you working on Solution?

    opened by int5749 9
  • Allow build on and usage with OpenJDK 11

    Allow build on and usage with OpenJDK 11

    Building jollyday with OpenJDK 11 fails due to

    [INFO] --- jaxb2-maven-plugin:2.4:xjc (generate) @ jollyday ---
    [INFO] Created EpisodePath [/mnt/data/home/software/jollyday/target/generated-sources/jaxb/META-INF/JAXB]: true
    [INFO] Ignored given or default xjbSources [/mnt/data/home/software/jollyday/src/main/xjb], since it is not an existent file or directory.
    [INFO] Created EpisodePath [/mnt/data/home/software/jollyday/target/generated-sources/jaxb/META-INF/JAXB]: true
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.058 s
    [INFO] Finished at: 2019-01-09T21:29:49+01:00
    [INFO] ------------------------------------------------------------------------
    ---------------------------------------------------
    constituent[0]: file:/usr/share/maven/conf/logging/
    constituent[1]: file:/usr/share/maven/lib/aopalliance.jar
    constituent[2]: file:/usr/share/maven/lib/cdi-api.jar
    constituent[3]: file:/usr/share/maven/lib/commons-cli.jar
    constituent[4]: file:/usr/share/maven/lib/commons-io.jar
    constituent[5]: file:/usr/share/maven/lib/commons-lang3.jar
    constituent[6]: file:/usr/share/maven/lib/guava.jar
    constituent[7]: file:/usr/share/maven/lib/guice.jar
    constituent[8]: file:/usr/share/maven/lib/jansi.jar
    constituent[9]: file:/usr/share/maven/lib/javax.inject.jar
    constituent[10]: file:/usr/share/maven/lib/jcl-over-slf4j.jar
    constituent[11]: file:/usr/share/maven/lib/jsr250-api.jar
    constituent[12]: file:/usr/share/maven/lib/maven-artifact-3.x.jar
    constituent[13]: file:/usr/share/maven/lib/maven-builder-support-3.x.jar
    constituent[14]: file:/usr/share/maven/lib/maven-compat-3.x.jar
    constituent[15]: file:/usr/share/maven/lib/maven-core-3.x.jar
    constituent[16]: file:/usr/share/maven/lib/maven-embedder-3.x.jar
    constituent[17]: file:/usr/share/maven/lib/maven-model-3.x.jar
    constituent[18]: file:/usr/share/maven/lib/maven-model-builder-3.x.jar
    constituent[19]: file:/usr/share/maven/lib/maven-plugin-api-3.x.jar
    constituent[20]: file:/usr/share/maven/lib/maven-repository-metadata-3.x.jar
    constituent[21]: file:/usr/share/maven/lib/maven-resolver-api.jar
    constituent[22]: file:/usr/share/maven/lib/maven-resolver-connector-basic.jar
    constituent[23]: file:/usr/share/maven/lib/maven-resolver-impl.jar
    constituent[24]: file:/usr/share/maven/lib/maven-resolver-provider-3.x.jar
    constituent[25]: file:/usr/share/maven/lib/maven-resolver-spi.jar
    constituent[26]: file:/usr/share/maven/lib/maven-resolver-transport-wagon.jar
    constituent[27]: file:/usr/share/maven/lib/maven-resolver-util.jar
    constituent[28]: file:/usr/share/maven/lib/maven-settings-3.x.jar
    constituent[29]: file:/usr/share/maven/lib/maven-settings-builder-3.x.jar
    constituent[30]: file:/usr/share/maven/lib/maven-shared-utils.jar
    constituent[31]: file:/usr/share/maven/lib/maven-slf4j-provider-3.x.jar
    constituent[32]: file:/usr/share/maven/lib/plexus-cipher.jar
    constituent[33]: file:/usr/share/maven/lib/plexus-component-annotations.jar
    constituent[34]: file:/usr/share/maven/lib/plexus-interpolation.jar
    constituent[35]: file:/usr/share/maven/lib/plexus-sec-dispatcher.jar
    constituent[36]: file:/usr/share/maven/lib/plexus-utils.jar
    constituent[37]: file:/usr/share/maven/lib/sisu-inject.jar
    constituent[38]: file:/usr/share/maven/lib/sisu-plexus.jar
    constituent[39]: file:/usr/share/maven/lib/slf4j-api.jar
    constituent[40]: file:/usr/share/maven/lib/wagon-file.jar
    constituent[41]: file:/usr/share/maven/lib/wagon-http-shaded.jar
    constituent[42]: file:/usr/share/maven/lib/wagon-provider-api.jar
    ---------------------------------------------------
    Exception in thread "main" java.lang.Error: java.lang.reflect.InvocationTargetException
    	at com.sun.tools.xjc.reader.Ring.get(Ring.java:113)
    	at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.<init>(BGMBuilder.java:147)
    	at com.sun.tools.xjc.reader.xmlschema.BGMBuilder.build(BGMBuilder.java:117)
    	at com.sun.tools.xjc.ModelLoader.annotateXMLSchema(ModelLoader.java:407)
    	at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:162)
    	at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:117)
    	at com.sun.tools.xjc.Driver.run(Driver.java:354)
    	at org.codehaus.mojo.jaxb2.javageneration.AbstractJavaGeneratorMojo.performExecution(AbstractJavaGeneratorMojo.java:468)
    	at org.codehaus.mojo.jaxb2.AbstractJaxbMojo.execute(AbstractJaxbMojo.java:315)
    	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
    	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
    	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
    	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
    	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
    	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:954)
    	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    	at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: java.lang.reflect.InvocationTargetException
    	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    	at com.sun.tools.xjc.reader.Ring.get(Ring.java:102)
    	... 30 more
    Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException
    	at com.sun.tools.xjc.reader.Ring.get(Ring.java:113)
    	at com.sun.tools.xjc.reader.xmlschema.BindingComponent.getClassSelector(BindingComponent.java:65)
    	at com.sun.tools.xjc.reader.xmlschema.ColorBinder.<init>(ColorBinder.java:62)
    	at com.sun.tools.xjc.reader.xmlschema.BindGreen.<init>(BindGreen.java:63)
    	... 35 more
    Caused by: java.lang.reflect.InvocationTargetException
    	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    	at com.sun.tools.xjc.reader.Ring.get(Ring.java:102)
    	... 38 more
    Caused by: java.lang.NoClassDefFoundError: javax/activation/MimeTypeParseException
    	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
    	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3138)
    	at java.base/java.lang.Class.getConstructor0(Class.java:3343)
    	at java.base/java.lang.Class.getDeclaredConstructor(Class.java:2554)
    	at com.sun.tools.xjc.reader.Ring.get(Ring.java:100)
    	at com.sun.tools.xjc.reader.xmlschema.DefaultClassBinder.<init>(DefaultClassBinder.java:98)
    	at com.sun.tools.xjc.reader.xmlschema.ClassSelector.<init>(ClassSelector.java:214)
    	... 43 more
    Caused by: java.lang.ClassNotFoundException: javax.activation.MimeTypeParseException
    	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
    	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
    	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
    	... 50 more
    

    experienced with v_0_5_7-12-ge359ee2

    opened by krichter722 8
  • Try to get the value first to avoid creating a lambda

    Try to get the value first to avoid creating a lambda

    Try to get the value first which is most likely to be cached to avoid creating a lambda.

    Similar to: https://github.com/quickfix-j/quickfixj/blob/master/quickfixj-core/src/main/java/org/quickfixj/SimpleCache.java

    I was going to submit this PR yesterday but I was so busy that got distracted and forgot.

    opened by guidomedina 7
  • Add holidays for New Zealand

    Add holidays for New Zealand

    Hey,

    I saw New Zealand was missing, so I added the statutory holidays as described in the law. Wikipedia summarizes them also pretty nice.

    While writing this, I just saw that DAY_AFTER_NEW_YEAR and WAITANGI are unique, so I will add some translations for them.

    And I copied from gb as you can see.. Will fix it too

    Please tell me if I missend anything!

    References: http://www.legislation.govt.nz/act/public/2003/0129/latest/DLM237120.html#DLM237120 https://en.wikipedia.org/wiki/Public_holidays_in_New_Zealand

    opened by tenjaa 7
  • Where is the package

    Where is the package "de.jollyday.config" on GitHub?

    Some classes like EthiopianOrthodoxHolidayParser refer to the package (for example to the class de.jollyday.config.Holidays) but I cannot find the package - neither on GitHub nor on downloaded zip-files from GitHub. I think, an open-source-project is supposed to contain all source code, or have I overlooked something?

    Background is, I would like to contribute for example Hebrew holidays in the future but then I need to see and understand the whole source code...

    opened by MenoData 7
  • Use System.getProperty instead of System.getProperties

    Use System.getProperty instead of System.getProperties

    Use System.getProperty to get a specific property instead of first retrieving all properties with System.getProperties() only to read one property out of it.

    This is more friendly to security managers: instead of requiring the permission to read and even write all properties ("java.util.PropertyPermission" "*" "read,write"), the policy only needs to allow reading a specific property, which is much more secure.

    Depending on the JVM implementation, System.getProperty can also be more efficient.

    opened by kkofler 6
  • Added REFORMATION_DAY for Schleswig-Holstein.

    Added REFORMATION_DAY for Schleswig-Holstein.

    On 22nd of Feb 2018 the Landtag in Schleswig-Hostein has decided to add the reformation day as an offical holiday in Schleswig-Holstein: http://www.landtag.ltsh.de/plenumonline/archiv/wp19/09/debatten/07_12.html

    opened by dusiema 5
  • Germany: Reformationstag as one-time public holiday

    Germany: Reformationstag as one-time public holiday

    2017 we will have Reformationstag (2017-10-31) as public holiday in all of Germany, but only that year. I suppose one has to add a Fixed entry with validFrom and validTo at the top of Holidays_de.xml. Is this already in the works or do you want a pull request?

    Cheers, Joachim

    opened by jschrod 5
  • Provide a description for MARTINS_TAG. Its the same as MARTINS_DAY, but

    Provide a description for MARTINS_TAG. Its the same as MARTINS_DAY, but

    in Austria and Bavaria its translated to "Martini". MARTINS_TAG is used in Austria/Burgenland for the 11.11.

    BTW: Are you planning a release of 0.5.2 anytime soon?

    opened by rototor 5
  • RelativeToEasterSunday	every not working

    RelativeToEasterSunday every not working

    I'm trying to define the thursday before easter sunday to be a holiday like this:

    <tns:RelativeToEasterSunday every="EVERY_YEAR" localizedType="UNOFFICIAL_HOLIDAY" >
        <tns:chronology>JULIAN</tns:chronology>
        <tns:days>3</tns:days>
    </tns:RelativeToEasterSunday>
    

    With no luck. I have played with the values of the attributes without success. What am I missing?

    opened by pakmans 5
  • upgrade to jakarta.xml.bind 4.0.0

    upgrade to jakarta.xml.bind 4.0.0

    Hi @svendiedrichsen ,

    I upgrade the jollyday api to uses jakarta.xml insteadof javax.xml

    I (my company) need this to work with spring boot 3

    Please have a look at this PR, when everything is as you expected, then merge it and create a new release please.

    Best Regards Alex

    opened by arolfes 3
  • Inclusive RelativeToFixed holiday

    Inclusive RelativeToFixed holiday

    I have the following configuration,

    <tns:RelativeToFixed validFrom="1776" descriptionPropertiesKey="INDEPENDENCE">
      <tns:Date month="JULY" day="4"/>
      <tns:When>CLOSEST</tns:When>
      <tns:Weekday>MONDAY</tns:Weekday>
    </tns:RelativeToFixed>
    

    In 2021 the 4th was a Sunday so I expected the 5th to be a holiday. This worked as expected. In 2022 the 4th was a Monday so I expected the 4th to be a holiday. Instead, it said the 11th is.

    The RelativeToFixedParser has the comment don't test start day. Can this be an option or how should I have configured this?

    opened by ben-manes 1
  • Can't compile with Java17

    Can't compile with Java17

    XMLUtil is using JAXContext, which is not part of Java17 anymore. it seems like the only place actually needing this is XMLUtil, but which can be plugged-in, but it also contains some non-XML related methods (getMonth, getWeekday). It seems like master is broken - I couldn't create a PR to fix it myself.

    opened by liran-lili 1
Owner
Sven Diedrichsen
Sven Diedrichsen
Deploy this 🔥🔥🔥 BLAZING FAST 🔥🔥🔥 API to get instant access to ✨✨✨ INNOVATIVE ✨✨✨ API to quickly define whether the numbers are odd or even.

Is Odd API This ?? is ?? ?? a ?? simple API that ?? returns ?? whether ?? ?? a ?? number ?? ?? is ?? ?? odd ?? or ?? not. ♂ With ?? ?? this ?? ?? API

rferee 5 Sep 23, 2022
一个能够获取随机图片的 Api,使用 SpringBoot 构建

Random-Image-Api Random-Image-Api 一个能够获取随机图片的 Api,基于 Spring Boot 构建 可读取本地图片列表的地址,并提供随机访问服务,可配置域名白名单访问 项目说明 程序启动的时候会自动加载 项目路径/list 文件夹下的所有列表文件; 图片列表文件:

陈亚伟 1.3k Dec 21, 2022
能将对API的调用转化为对手机的操作,软件自身提供 restful API,运行于安卓,一切操作与获取信息均由软件完成。

文档地址:https://www.lookcos.cn/docs/hermit Hermit简介 Hermit,是一款用于Android自动化测试的软件,运行于安卓,通过接收restful API请求,进而转化为对设备的操作。 支持快速的点击、滑动、读取与设置剪切板(支持中文)、模拟输入、寻找控件并

Lookcos 278 Dec 13, 2022
Esse repositório disponibiliza uma versão zero de uma API de cadastro de usuários (Users) a ser melhorada com desafios ☕️ 🇧🇷

java-training-api Esse repositório disponibiliza uma versão zero de uma API de cadastro de usuários (Users) na pasta SRC a ser melhorada. DESAFIOS Os

Guillaume Falourd 91 Dec 22, 2022
Projeto para consulta de filmes na API data IMDB e construção de playlists.

Projeto IDP: Filmes API ✍️ API Requirements Must to have Comunicar com uma API externa (desenvolvida pelo colaborador ou por terceiros). Persistir dad

Sarah Andrade Toscano de Carvalho 2 Oct 9, 2022
Spring boot microservice example with Eureka Server + Eureka Client + Spring Cloud API Gateway + OAuth2.0 + Circuit Breaker + Resilience4J + FeignClient + RestTemplate

Spring boot microservice example Spring boot microservice example with Eureka Server + Eureka Client + Spring Cloud API Gateway + OAuth2.0 + Circuit B

Subhash Lamba 47 Dec 29, 2022
The Quotation Management application is a API REST created using Spring Boot framework.

✅ Quotation Management API - Done ✅ About • Features • Setup • Technologies • Author • License ?? About The Quotation Management application is a API

Vanessa Swerts 6 Apr 29, 2022
Back-End/API de uma aplicação web de agendamento desenvolvida durante o Hackaton do Programa de Formação do Grupo Fcamara

??️ Sobre o projeto ?? Agenda Laranja - é um meio prático e eficiente para programar o dia do trabalho presencial, respeitando as normas de segurança.

Lucas Gonçalves 3 Sep 17, 2021
POC showing how to divide endpoint(s) among different Open-API screens

Multiple Open-API groups: Spring boot POC showing how to divide endpoint(s) among different Open-API screens Demo Link (Select definition from top rig

null 6 Dec 15, 2022
source code of the live coding demo for "Building resilient and scalable API backends with Apache Pulsar and Spring Reactive" talk held at ApacheCon@Home 2021

reactive-iot-backend The is the source code of the live coding demo for "Building resilient and scalable API backends with Apache Pulsar and Spring Re

Lari Hotari 4 Jan 13, 2022
Spring Boot JdbcTemplate example with SQL Server: CRUD Rest API using Spring Data JDBC, Spring Web MVC

Spring Boot JdbcTemplate example with SQL Server: Build CRUD Rest API Build a Spring Boot CRUD Rest API example that uses Spring Data Jdbc to make CRU

null 7 Dec 20, 2022
Springboot CRUD api using containerized mongoDB. ☕🍃📦

Javongo ☕ ?? Springboot CRUD api using containerized mongoDB. Feel free to use it as an example for your projects. Running Make sure ports 27017 & 808

Antonio Cituk 8 Mar 19, 2022
This is a plugin for Minecraft Server (Spigot API) introduces a sector system which connects a single world across multiple servers.

OpenSourceSectors ?? ??️ This is a plugin for Minecraft Server (Spigot API) introduces a sector system which connects a single world across multiple s

null 20 Dec 28, 2022
Uma API REST com funcionalidades de CRUD que simula um sistema de leilão 💰.

Leilão API REST Essa aplicação foi feita para ajudar aqueles que ainda estão com alguma dúvida, sobre o funcionamento de um API REST em Spring. Já que

Fábio Henrique 4 Feb 23, 2022
Clivia is a scalable, high-performance, elastic and responsive API gateway based on spring weblux

clivia是一款基于spring webflux的可扩展、高性能、高弹性、响应式的 API 网关 clivia_V0.0.1 架构概览 模块介绍 clivia-admin-core : 网关配置管理后台核心模块 clivia-client-core : 网关核心模块 clivia-example

palading 14 Jan 9, 2023
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)

OpenAPI Generator Master (5.4.x): 6.0.x (6.0.x): ⭐ ⭐ ⭐ If you would like to contribute, please refer to guidelines and a list of open tasks. ⭐ ⭐ ⭐ ‼️

OpenAPI Tools 14.8k Dec 30, 2022
Text to Speech Project for Spring Boot and Kotlin, Auth Server, Python with Fast API (gTTS)

TTS-App Text to Speech Project for Spring Boot Module (etc Resource, Auth Server, Python with Fast API (gTTS)) Python의 gTTS lib를 활용하여 텍스트를 음성으로 변환하는 서

Seokhyun 7 Dec 21, 2021
Policeman's Forbidden API Checker

Policeman's Forbidden API Checker Allows to parse Java byte code to find invocations of method/class/field signatures and fail build (Apache Ant, Apac

Policeman Tools 280 Dec 20, 2022
Share food-Android- - Food donation coded in native android with firebase, google maps api and php server xampp

share_food-Android- Instructions: 1. Create a firebase account and link it with the project via google-services.json. 2. This project also uses a XAMP

Abubakar 3 Dec 28, 2021