The First Working Day The First Working Day
Elementary
RU English

As the input you’ll get the date of the first vacation day in the format 'YYYY-MM-DD' and the total number of vacation days. Your task is to find out which day will be the first working day after the vacation. If it’ll be Saturday or Sunday then it should be the next Monday.
In this mission you have to ignore national holidays and consider only Saturdays and Sundays.
Also don't forget about February 29th in the leap year and the situation when the vacation starts at the end of December of the one year and ends at the beginning of the next year.

Input: The first day of the vacation and the number of days in it.

Output: The date of the first working day.

Example:

vacation('2018-07-01', 14) == '2018-07-16'
vacation('2018-02-19', 10) == '2018-03-01'
vacation('2000-02-28', 5) == '2000-03-06'
vacation('1999-12-20', 14) == '2000-01-03'

How it is used: To work with dates and for time planning.

Precondition :
1900 <= year <= 2100

Settings
Code:
CheckiO Extensions

CheckiO Extensions allow you to use local files to solve missions. More info in a blog post.

In order to install CheckiO client you'll need installed Python (version at least 3.8)

Install CheckiO Client first:

pip3 install checkio_client

Configure your tool

checkio --domain=py config --key=

Sync solutions into your local folder

checkio sync

(in beta testing) Launch local server so your browser can use it and sync solution between local file end extension on the fly. (doesn't work for safari)

checkio serv -d

Alternatevly, you can install Chrome extension or FF addon

checkio install-plugin
checkio install-plugin --ff
checkio install-plugin --chromium

Read more here about other functionality that the checkio client provides. Feel free to submit an issue in case of any difficulties.

×
 
 
<< <
> >>
exec

Whats Next?

Free accounts will see Best CheckiO solutions with some delay.
Best Solutions will be opened in
Become Awesome and Don't wait
The next stage is ""
Will be activated in
View More Solutions Random Review Solutions Share your own solution
Go to the next mission Back to the list of missions Back to the map