Thanks for the suggestion, but if my inputs are 22 and 02 (so 10PM and 2AM) the one-liner returns 1 and I would expect 4.
perl -e 'print( ($ARGV[1] - $ARGV[0] + 4) % 24 <= 8, "\n")' 22,02
am i using the one-liner incorrectly?
In reply to Re^2: one liner diff between HH military times
by dirtdog
in thread one liner diff between HH military times
by dirtdog
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |