From ffb36c62428da6bbb063414d4f58fa8ad2ab3be8 Mon Sep 17 00:00:00 2001 From: Jonas Zitzmann Date: Thu, 8 Feb 2024 18:50:00 +0100 Subject: [PATCH] add new converter: days to years --- src/convert_time.c | 5 +++++ src/convert_time.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/convert_time.c b/src/convert_time.c index 42266b6..d465b90 100644 --- a/src/convert_time.c +++ b/src/convert_time.c @@ -28,4 +28,9 @@ double converter_hour_in_sec(double hour){ double converter_sec_in_hour(double sec){ double time = sec / 60 / 60; return time; +} + +double converter_days_to_years(double days){ + double time = days / 365; + return time; } \ No newline at end of file diff --git a/src/convert_time.h b/src/convert_time.h index fcd1b4c..380316a 100644 --- a/src/convert_time.h +++ b/src/convert_time.h @@ -7,6 +7,6 @@ double converter_hour_to_min(double hour); double converter_min_to_hour(double min); double converter_hour_in_sec(double hour); double converter_sec_in_hour(double sec); - +double converter_days_to_years(double days); #endif //THEADMIRALS_CONVERT_TIME_H