Perl Weekly Challenge 187: Days Together and Magical Triplets
These are some answers to the Week 187 of the Perl Weekly Challenge organized by Mohammad S. Anwar.
Task 1: Days Together
Two friends, Foo and Bar gone on holidays separately to the same city. You are given their schedule i.e. start date and end date.
To keep the task simple, the date is in the form DD-MM and all dates belong to the same calendar year i.e. between 01-01 and 31-12. Also the year is non-leap year and both dates are inclusive.
Write a script to find out for the given schedule, how many days they spent together in the city, if at all.
Example 1
Input: Foo => SD: '12-01' ED: '20-01'
Bar => SD: '15-01' ED: '18-01'
Output: 4 days
Example 2

