Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

io.github.goodudetheboy:WorldHolidayDates

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

io.github.goodudetheboy:WorldHolidayDates

Holiday data of 168 countries in the world!

  • 0.0.3
  • Source
  • Maven
  • Socket score

Version published
Maintainers
1
Source

WorldHolidayDates

build status Quality Gate Status sonarcloud bugs sonarcould maintainability sonarcloud security sonarcloud reliability

This project provides the dates and times of holidays around the world, specifically 168 countries. The data is taken from the processed holidays.json from date-holidays. Any interests in contributing to the holiday database should be made there, since this project is just a Java implementation to get data from it.

This project is still under construction.

Usage

Initialize the holiday data as soon as possible in your project:

HolidayData holidayData = HolidayData.initializeData();

Get a Country which contains its national holidays along with the holidays of its regions and states using its 2-character country code (you can look up the code for specific countries here):

Country vietnam = holidayData.getCountry("VN");

To get holiday data from a Country object, use:

List<Holiday> holidays = vietnam.getDays();

To calculate the date and name (in English) of a Holiday in a certain year, use:

Holiday h = holidays.get(0);
LocalDate date = h.calculateDate(2021); // or whatever Gregorian year you want
LocalDateTime dateTime = h.calculate(2021); // or whatever Gregorian year you want
String hNameInEnglish = h.getName().get("en");

To get a list of LocalDate or LocalDateTime of holiday in a certain year, use:

List<LocalDateTime> holidaysList = vietnam.getHolidaysList(2021);
List<LocalDate> holidays = vietnam.getHolidaysDatesList(2021);

Building

The project uses gradle for building. Standard gradle tasks for the java plugin can be found here. They can be invoked on the command line by running gradlew or gradlew.bat with the name of the task, for example gradlew jar to create the jar archive.

Testing

TBU

FAQs

Package last updated on 07 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc