Context
When I was a little kid, I watched a Disney movie where Goofy told his son "Boy, even a broken clock is right two or three times a day." (see this youtube clip, courtesy of @Arnauld).
Rationale
Given the previous statement, we wish to look at a clock that is stopped and answer the following question: is this clock telling the correct time?, decision-problem-style. But we will also do it Goofy style, assuming a stopped clock gets the correct time 3 times a day.
Task
Pick some time of the morning with at least minute precision. Call it \$t\$.
The function/full program/etc you submit must satisfy the following requirements:
- if executed at \$t\text{ am}\$ and at \$t\text{ pm}\$, your code produces an observable output
a
(think Truthy in decision-problem challenges). - for every calendar day, there is a third time \$t_1\$ distinct from \$t\text{ am}\$ and \$t\text{ pm}\$ such that, if your code is ran at that time, your code also deterministically produces the observable output
a
. This means \$t_1\$ may be constant or it may be a function of the day the code is ran at. - if ran at any other time of the day, your code produces an observable output
b
that must be distinct froma
(think Falsy in decision-problem challenges).
Recall that your code should be precise at least to the minute. This means that you may decide that seconds don't matter for your answer, but you might also want to decide that your answer checks up to nanoseconds in order to decide if it is that time of the day.
Input
Either your code takes no input or it takes the "current" time. For the time, acceptable formats include, but are not limited to:
- Any ISO format for date/time strings where time is given at least to the minute;
- An integer list with
[hours, minutes]
or[hours, minutes, seconds]
or any similar list with further subdivisions of the second; (this order may be reversed but may not be shuffled) - Different arguments, each representing one element from the lists above.
Output
A single, well-defined, observable output a
if your code is run at \$t\text{ am}\$, at \$t\text{ pm}\$, or at \$t_1\$, as specified in your answer. If ran at any other time, your code produces the observable output b
, distinct from a
.
Bonus imaginary internet points
Bonus imaginary internet points will be awarded to the shortest answer for which \$t_1\$ isn't constant. If this question turns out to receive enough attention, this will turn into an actual rep bounty.
This is code-golf so shortest submission in bytes, wins! If you liked this challenge, consider upvoting it! If you dislike this challenge, please give me your feedback. Happy golfing!