From d8510b1b879a59da681980bff812864ed396b77c Mon Sep 17 00:00:00 2001 From: getsnoopy Date: Sat, 9 Apr 2022 01:52:46 -0500 Subject: [PATCH] Fix some formatting issues This commit fixes some formatting issues with the time so that the output uses universal SI symbols rather than ad hoc abbreviations. --- planeClass.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/planeClass.py b/planeClass.py index 83bb786..6a1c05e 100644 --- a/planeClass.py +++ b/planeClass.py @@ -383,10 +383,10 @@ class Plane: landed_time -= timedelta(seconds=time_since_contact.total_seconds()) hours, remainder = divmod(landed_time.total_seconds(), 3600) minutes, seconds = divmod(remainder, 60) - min_syntax = "Mins" if minutes > 1 else "Min" + min_syntax = "min" if hours > 0: - hour_syntax = "Hours" if hours > 1 else "Hour" - landed_time_msg = (f"Apx. flt. time {int(hours)} {hour_syntax}" + (f" : {int(minutes)} {min_syntax}. " if minutes > 0 else ".")) + hour_syntax = "h" + landed_time_msg = (f"Apx. flt. time {int(hours)} {hour_syntax}" + (f" {int(minutes)} {min_syntax}. " if minutes > 0 else ".")) else: landed_time_msg = (f"Apx. flt. time {int(minutes)} {min_syntax}.") self.takeoff_time = None @@ -637,4 +637,4 @@ class Plane: print(time_since_ra) if time_since_ra.seconds >= 600: print(ra_type) - self.recent_ra_types.pop(ra_type) \ No newline at end of file + self.recent_ra_types.pop(ra_type)