Create a web application to determine the time interval between given dates and to determine public holidays for a country in a selected year. The API will obtain data about countries and holidays from the website. To do this, you will need to create an account on this site to use the API key in the work of the open API of this site.
The web page should contain 2 tabs:
- On the first tab, the user can select a date in the first input, then a date in the second input, and set additional parameters - then get the time interval between these dates.
- On the second tab, the user can select the country in the first input, then the year in the second input - and get a list of holidays with dates.
- Only after the user has selected one date in the first input, he can change the date in the second input, which is earlier than the date from the first input and vice versa
- The user can choose time interval presets:
- 'week' (7 days)
- 'month' (30 days)
- The user can choose options:
- 'All days'
- 'Working days'
- 'Weekend'
- The user can choose options:
- 'Count the number of days'
- 'Calculate the number of hours'
- 'Count the number of minutes'
- 'Count number of seconds'
- The user can enter the application and see, if there are any, the last 10 results that he calculated in the form of a table (start date, end date, and what the measurement result is). To do this, use localStorage.
- When the user enters this tab, a request must be made to the endpoint to receive a list of all countries. This list will be used for the options in the first 'Select Country' input.
- The second input 'Select a year' should contain a list of years from 2001 to 2049. This input should be blocked until the user selects a country.
- The default value in the 'Select year' input should be the current year.
- When both options are selected, you need to make a request to the endpoint
- The obtained result should be presented in the form of a table with columns 'Date' and 'Name of the holiday'
- For the 'Date' column, there should be a clickable button on which the user can sort the holidays in chronological or reverse chronological order
- If either of these two requests to endpoints fails, an error block should be displayed on the screen.
- The user should be able to comfortably work with this application from a mobile phone.
- The user must be able to go to the real page of the application on the Internet (Github pages).
- The interface should be in English or Ukrainian.
- #1 Create Readme.md and make a list of tasks.
- #2 Create a page: HTML layout and attach CSS styles. Use Bootstrap.
- The issues/tickets of work tab #1:
- #3.1 Get the values of the start date and end date. Make sure that the end date is not earlier than the start date
- #3.2 The user can choose time interval presets: 'week' (7 days) / 'month' (30 days)
- #3.3 The user can choose options
- #3.4 Calculate the time interval between given dates
- #3.5 The user can enter the application and see, if there are any, the last 10 results that he calculated in the form of a table (start date, end date, and what the measurement result is). To do this, use localStorage.
- The issues/tickets of work tab #2:
- #4.1 Make request to the endpoint to receive a list of all countries. This list will be used for the options in the first 'Select Country' input.
- #4.2 The second input 'Select a year' should contain a list of years from 2001 to 2049. This input should be blocked until the user selects a country. The default value in the 'Select year' input should be the current year.
- #4.3 When both options are selected, you need to make a request to the endpoint. The obtained result should be presented in the form of a table with columns 'Date' and 'Name of the holiday'
- #4.4 For the 'Date' column, there should be a clickable button on which the user can sort the holidays in chronological or reverse chronological order
- #5 If either of these two requests to endpoints fails, an error block should be displayed on the screen.