This challenge is inspired by this other.
The challenge
Write a program or a function in any programming language that given as input a string representing a time in English (see below, for further details) it outputs or prints the equivalent in the 24 hours "digital" format HH:MM.
Shortest code in bytes wins, standard loopholes are forbidden.
Input format
Your program should be able to handle all this kind of inputs:
one minute past 'HOUR'
'MINUTES' minutes past 'HOUR'
quarter past 'HOUR'
half past 'HOUR'
one minute to 'HOUR'
'MINUTES' minutes to 'HOUR'
quarter to 'HOUR'
'HOUR'
'HOUR12' 'MINUTES' AM
'HOUR12' 'MINUTES' PM
where: MINUTES
is a number from 1 to 59 written in English with hyphen; HOUR
is the name of an hour in one of the formats:
midnight
noon
midday
'HOUR24' o'clock
'HOUR12' o'clock AM
'HOUR12' o'clock PM
HOUR12
is a number from 1 to 12 written in English with hyphen; and HOUR24
is a number from 1 to 23 written in English with hyphen.
Some examples
midnight -> 00:00
midday -> 12:00
twelve o'clock -> 12:00
quarter to midnight -> 23:45
twenty-two minutes past eight o'clock PM -> 20:22
thirty-four minutes to fifteen o'clock -> 14:26
six o'clock AM -> 06:00
one minute to twenty-one o'clock -> 20:59
seven thirteen AM -> 07:13
nine fourteen PM -> 21:14
Good luck!
'MINUTES'
minutes past'HOUR24' o'clock
a valid time? \$\endgroup\$HOUR24
be a number from 0 to 23? \$\endgroup\$