A simple library that finds the norwegian holidays for a given year
- Kotlin
- Gradle
- JDK 21
To build locally and run the unit tests you can simply run ./gradlew clean build
or on windows
gradlew.bat clean build
Note Find the newest version of the libary here: https://central.sonatype.com/artifact/io.github.mikaojk/norwegian-holidays and swap it out with the version(1.0.5) in the examples below
implementation("io.github.mikaojk:norwegian-holidays:1.0.5")
<dependency>
<groupId>io.github.mikaojk</groupId>
<artifactId>norwegian-holidays</artifactId>
<version>1.0.5</version>
</dependency>
import io.github.mikaojk.holiday.getNorwegianHolidays
val year = 2025
val easterDay2025 = getNorwegianHolidays(year).find { norwegianHoliday -> norwegianHoliday.name == "1. påskedag" }?.date
println("Easter day for 2022 is: easterDay2025")
Find the newest version of gradle here: https://gradle.org/releases/ Then run this command:
./gradlew wrapper --gradle-version $gradleVersjon
Questions and/or feature requests? Please create an issue.