Mirrored Digital Clock
Python 2, 187 180 178 177 bytes
R=range(11)
for t in['0000111122201250125012'[j::11]+':'+'0001112255501501501015'[i::11]for i in R for j in R]:print t+' - '+''.join(map(dict(zip('0125:','0152:')).get,t))[::-1]
Try it online!
Thanks for +1 Kevin Cruijssen.
APL (Dyalog Unicode), 84 bytesSBCS
Complete program outputting to STDOUT. Requires ⎕IO
(Index Origin) to be 0
which is default on many systems.
{0::⋄∧/23 59≥⍎¨(':'≠t)⊆t←⌽'015xx2xx8x:'[⎕D⍳i←∊⍺':'⍵]:⎕←1↓⍕i'-'t}⌿1↓¨⍕¨100+0 60⊤⍳1440
Try it online!
⍳1440
that many ɩntegers
0 60⊤
convert to mixed-base ∞,60
100+
add 100 (this pads the needed 0s)
⍕¨
format (stringify) each
1↓¨
drop the first character from each (this removes the leading 1s)
{
…}⌿
apply the following anonymous function column-wise (⍺
is top hour, ⍵
is minute)
0::
if any error happens, return nothing
⋄
try:
'015xx2xx8x:'[
…]
index this string with:
∊⍺':'⍵
the ϵnlisted (flattened) list of hour, colon, minute
i←
stored in i
(for input)
⎕D⍳
ɩndices of each character in the list of Digits
⌽
reverse that
t←
store as t
(for time)
(
…)⊆
group runs where:
':'≠t
colon differs from t
⍎¨
execute (evaluate) each
23 59≥
Boolean for each whether they are less than or equal to 23 and 59 respectively
∧/
are both true?
:
if so, then:
⍕i'-'t
the formatted (space-separated) list of input, dash, time
1↓
drop the first (space)
⎕←
output to STDOUT
Python 2, 279 277 255 bytes
for h in range(1440):
q=[[[0,(a+"52")[(a=="2")+(a=="5")*2]][a in"01825"]for a in c]for c in[("%02d"%e)[::-1]for e in[h%60,h/60]]]
if all(q[0]+q[1]):
z=[int(''.join(j))for j in q]
if(z[1]<60)*(z[0]<24):print"%02d:%02d - %02d:%02d"%(h/60,h%60,z[0],z[1])
Try it online!
Credits
279 bytes reduced to 256 by dylnan.
256 bytes reduced to 255 by FlipTrack.