Skip to content

[Swift Scheduling]: Synced Exercise to Problem Specifications. #3936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 18 additions & 11 deletions exercises/practice/swift-scheduling/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ The following table shows how to translate them:
| Description | Meeting start | Delivery date |
| ----------- | ----------------------------- | ----------------------------------- |
| `"NOW"` | - | Two hours after the meeting started |
| `"ASAP"` | Before 12:00 | Today at 17:00 |
| `"ASAP"` | After 12:00 | Tomorrow at 12:00 |
| `"ASAP"` | Before 13:00 | Today at 17:00 |
| `"ASAP"` | After or at 13:00 | Tomorrow at 13:00 |
| `"EOW"` | Monday, Tuesday, or Wednesday | Friday at 17:00 |
| `"EOW"` | Thursday or Friday | Sunday at 20:00 |

Expand All @@ -32,12 +32,19 @@ There are two variable delivery date description patterns:
- `"<N>M"` (N-th month)
- `"Q<N>"` (N-th quarter)

| Description | Meeting start | Delivery date |
| ----------- | -------------------------- | ----------------------------------------------------------- |
| `"<N>M"` | Before N-th month | At 8:00 on the _first_ workday¹ of this year's N-th month |
| `"<N>M"` | After or in N-th month | At 8:00 on the _first_ workday¹ of next year's N-th month |
| `"Q<N>"` | Before or in N-th quarter² | At 8:00 on the _last_ workday¹ of this year's N-th quarter² |
| `"Q<N>"` | After N-th quarter² | At 8:00 on the _last_ workday¹ of next year's N-th quarter² |

¹ A workday is a Monday, Tuesday, Wednesday, Thursday, or Friday.
² A year has four quarters, each with three months: January/February/March, April/May/June, July/August/September, and October/November/December.
| Description | Meeting start | Delivery date |
| ----------- | ------------------------- | --------------------------------------------------------- |
| `"<N>M"` | Before N-th month | At 8:00 on the _first_ workday of this year's N-th month |
| `"<N>M"` | After or in N-th month | At 8:00 on the _first_ workday of next year's N-th month |
| `"Q<N>"` | Before or in N-th quarter | At 8:00 on the _last_ workday of this year's N-th quarter |
| `"Q<N>"` | After N-th quarter | At 8:00 on the _last_ workday of next year's N-th quarter |

~~~~exercism/note
A workday is a Monday, Tuesday, Wednesday, Thursday, or Friday.

A year has four quarters, each with three months:
1. January/February/March
2. April/May/June
3. July/August/September
4. October/November/December.
~~~~
3 changes: 2 additions & 1 deletion exercises/practice/swift-scheduling/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
]
},
"blurb": "Convert delivery date descriptions to actual delivery dates.",
"source": "Original exercise idea from Eric Schierboom."
"source": "Erik Schierboom",
"source_url": "https://github.com/exercism/problem-specifications/pull/2536"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/swift-scheduling/canonical-data.json
# File last updated on 2025-03-03
# File last updated on 2025-06-25

import unittest

Expand Down
Loading