Employers love to see their employees working hard, while the employees would love to work less, especially those with a monthly rather than hourly payment.
The laziest of employees are thinking about the world where every month starts with the same weekday and it makes them wonder if they would work more or less.
The greediest of employers are thinking about the world where every month starts with the same weekday and it makes them wonder if their employees would work more or less.
Your task (as a lazy employee or greedy employer, you choose) is to write the shortest program or function that given weekday every month must start outputs the number of working and weekend days.
- Weekday identificator. This can be a 0- or 1-based index, case-insensitive shortname (
Tu/Tueetc) or case-insensitive full name (
tuesdayetc) as long as you specify the format.
- One of the following output formats allowed:
- A string of single space/comma/semicolon separated values.
- A list of values.
- A multi-line string of values with a trailing line break allowed.
- The output format must be consistent.
- 2 values must present in the output: number of working days in base 10 and number of weekends in base 10.
- Assume the year is 365 days.
- Workdays are Monday, Tuesday, Wednesday, Thursday and Friday.
- Week starts with Monday.
- No national weekends are accounted.
- This is code-golf so all usual golfing rules apply, and the shortest code (in bytes) wins.
Input | Output --------+-------- Monday | 269 96 Tue | 269,96 3 | 269 96 // 1-based index 3 | 262, 103 // 0-based index fr | 251;114 5 | 247 118 // 0-based index sunday | 258;107 // 0-based index