From 43630f44d51d5a435286f76b6fc084a399c428f9 Mon Sep 17 00:00:00 2001 From: Htylol Date: Wed, 5 Mar 2025 01:34:21 +0500 Subject: [PATCH] Fixes for more hours --- data_from_portwine/scripts/functions_helper | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 5c6f6c5..265b461 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -1280,9 +1280,9 @@ seconds_to_time () { hours="" elif [[ $hours =~ ^1$ ]] ; then hours="$hours ${translations[hour]} ${translations[and]} " - elif [[ $hours =~ ^([2-4]|2[2-4])$ ]] && [[ $LANGUAGE == ru ]] ; then + elif [[ $hours =~ [2-4]$ && ! $hours =~ ^1[2-4]$ ]] && [[ $LANGUAGE == ru ]] ; then hours="$hours часа ${translations[and]} " - elif [[ $hours =~ ^21$ ]] && [[ $LANGUAGE == ru ]] ; then + elif [[ $hours =~ 1$ && ! $hours =~ 11$ ]] && [[ $LANGUAGE == ru ]] ; then hours="$hours ${translations[hour]} ${translations[and]} " else hours="$hours ${translations[hours]} ${translations[and]} "