Skip to content

arvid-berndtsson/is-today-a-public-holiday-in-sweden

Repository files navigation

Is today a public holiday in Sweden?

This is a simple web app that tells you if today is a public holiday in Sweden. It uses the Nager.Date API to get the data.

Please, if you are an employer, feel free to look at it. I just want to make it clear that is-even and is-is-even is used as a joke. Looking for something more serious? Go back and look at other stuff I have published. 💚

Table of Contents

Background

This project is a part of a course in Flerplattformsapplikationer med webbtekniker at Malmö University. For the full instructions, see GitHub Pages for the course (in Swedish).

I wanted to create a simple web app that tells you if today is a public holiday in Sweden. The project was built with Next.js.

We were required to build a web app that uses an API to get data, and use two packages.

Web API

The API used in this project is the Nager.Date API. It provides data about public holidays in different countries.

Packages

The two packages used in this project are:

  • is-even - A package that tells you if a number is even or not.
  • is-is-even - A package that tells you if a given function is the same as the is_even function from the is-even npm package.

These packages were used to demonstrate how to use npm packages in a project. This choice was clearly made as a joke, as the packages are not very useful. 🤪

Getting Started

Disclaimer

This project has only been tested on macOS. It should work on Windows and Linux as well, but I cannot guarantee that it will work as expected.

Pre requisites

To run this project you need to have Node.js installed. You can download it here. The project was built for version 20.5.1 LTS.

Installation

First, clone the repository:

git clone https://github.com/arvid-berndtsson/is-today-a-public-holiday-in-sweden.git

Then, navigate to the project folder:

cd is-today-a-public-holiday-in-sweden

Install the dependencies:

npm install

Running the project

npm run dev

The project will start on port 3000. Open http://localhost:3000 with your browser to see the result.

If the port is already in use, it will automatically switch to the next available port. Please check the terminal for the correct port.

Contributing

Pull requests are welcome. Please make sure to submit the pull requests to the dev branch. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A web application to check if today is a public holiday in Sweden

Topics

Resources

License

Stars

Watchers

Forks