Are these the same time? code-golf time decision-problem
Context
When asked about the time (i.e. hours and minutes), people naturally reply with any one of a given set of fairly common sentences:
- (A) it is
MpastH - (B) it is
MtoH - (C) it is
HminusM
Where M above refers to some amount of minutes and H to some amount of hours. Concrete corresponding examples, all referring to the time 3:40 pm:
- (A) it is forty40 past three3
- (B) it is twenty20 to four4
- (C) it is four4 minus twenty20
Task
Given two of these sentences, output a Truthy value if they represent the same time and a Falsy value if they do not.
Input
Your input will be two sentences of the above, where references to minutes will always be rounded to the nearest multiple of 5 (i.e. the minutes will always be one of five5, ten10, fifteen15, twenty20, ..., fifty50, fifty-five55.
Because all sentences start with "it is " you may ommit that from your input sentences.
Output
A Truthy value if the two times are the same, a Falsy value otherwise.
Test cases
TBASHere is a sample program for checking the test cases.
Sandbox
Should the minutes and hours in the input com as integers instead of English words?