From b6fa252fc9527aefe9d01abfaf2aa47087d8df50 Mon Sep 17 00:00:00 2001 From: Mihael Dimoski Date: Fri, 25 Oct 2019 21:04:25 +0200 Subject: [PATCH] time: make Time struct public --- vlib/time/time.v | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vlib/time/time.v b/vlib/time/time.v index 5944239fa1..513be783f4 100644 --- a/vlib/time/time.v +++ b/vlib/time/time.v @@ -44,7 +44,7 @@ const ( #include -struct Time { +pub struct Time { pub: year int month int @@ -61,7 +61,7 @@ fn C.localtime(int) &C.tm fn remove_me_when_c_bug_is_fixed() { // TODO } -struct C.time_t {} +pub struct C.time_t {} struct C.tm { tm_year int @@ -132,7 +132,7 @@ pub fn unix(abs int) Time { hour := int(abs%seconds_per_day) / seconds_per_hour minute := int(abs % seconds_per_hour) / seconds_per_minute second := int(abs % seconds_per_minute) - + if is_leap_year(year) { // Leap year if day > 31+29-1 {