From 4de86130cd357ca4256e01809c0d0e6a4068c1c9 Mon Sep 17 00:00:00 2001 From: tinny77 Date: Fri, 17 Jan 2014 12:11:29 +0100 Subject: [PATCH] Update num2words.c --- src/num2words.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/num2words.c b/src/num2words.c index d12d3ad..0658ae3 100644 --- a/src/num2words.c +++ b/src/num2words.c @@ -164,7 +164,16 @@ void fuzzy_time_to_words(int hours, int minutes, char* words, char* words2, size //remaining -= append_string(words, remaining, " a"); } + if (fuzzy_hours == 0) { + remaining2 -= append_string(words2, remaining2, "a "); + remaining2 -= append_string(words2, remaining2, STR_MIDNIGHT); //mezzanotte + } else if (fuzzy_hours == 12) { + remaining2 -= append_string(words2, remaining2, "a "); + remaining2 -= append_string(words2, remaining2, STR_NOON); //mezzogiorno + } else { remaining2 -= append_string(words2, remaining2, "alle\n"); - remaining2 -= append_number(words2, fuzzy_hours % 12); + remaining2 -= append_number(words2, fuzzy_hours % 12); + } + } }