2025-01-06 00:26 : id 89
This commit is contained in:
parent
096b74a11f
commit
a429f3721f
@ -166,15 +166,24 @@ in
|
||||
minute=$(echo "($minute + 2.5) / 5 * 5" | bc)
|
||||
if [ $minute == 0 ]; then
|
||||
echo "$(date +'%I')"
|
||||
elif [ $minute > 30 ]; then
|
||||
elif (( $minute > 30 )); then
|
||||
minute=$(((60-minute)))
|
||||
if [ $minute == 45 ]; then
|
||||
echo "Quarter to $((($(date +"%I") + 1)))"
|
||||
else
|
||||
echo "$minute to $((($(date +"%I") + 1)))"
|
||||
hour=$((($(date +"%I") + 1)))
|
||||
if [ $hour == 13 ]; then
|
||||
hour=1
|
||||
fi
|
||||
elif [ $minute <= 30]; then
|
||||
|
||||
if [ $minute == 45 ]; then
|
||||
echo "Quarter to $hour"
|
||||
else
|
||||
echo "$minute to $hour"
|
||||
fi
|
||||
elif (( $minute <= 30 )); then
|
||||
if [ $minute == 15 ]; then
|
||||
echo "Quarter to $(date +"%I")"
|
||||
else
|
||||
echo "$minute past $(date +"%I")"
|
||||
fi
|
||||
else
|
||||
echo "Error, invalid time."
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user