From: Andrea Zagli Date: Sat, 9 Jul 2011 10:52:43 +0000 (+0200) Subject: Aggiunta la funzione Solipa::gdatetime_format. X-Git-Tag: 0.5.0~51 X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=0e0da0aa04e8a16598ce0ebb449c61322aff5af2;p=solipa%2Flibsolipa Aggiunta la funzione Solipa::gdatetime_format. --- diff --git a/src/utils.c b/src/utils.c index df5ce0e..78ee544 100644 --- a/src/utils.c +++ b/src/utils.c @@ -851,6 +851,20 @@ GDateTime return ret; } +gchar +*solipa_gdatetime_format (GDateTime *gdatetime, const gchar *format) +{ + gchar *ret; + + if (gdatetime == NULL) return ""; + + ret = g_date_time_format (gdatetime, format); + + if (ret == NULL) return ""; + + return ret; +} + gdouble solipa_round (gdouble value, guint n_decimals) { diff --git a/src/utils.h b/src/utils.h index 4de2b13..d5baeb4 100644 --- a/src/utils.h +++ b/src/utils.h @@ -65,6 +65,7 @@ const gchar *solipa_tm_to_sql (struct tm *tm_data, const gchar *format); const gchar *solipa_gdatetime_to_sql (GDateTime *gdatetime, const gchar *format); GDateTime *solipa_get_gdatetime_from_string (const gchar *string, const gchar *format); +gchar *solipa_gdatetime_format (GDateTime *gdatetime, const gchar *format); gdouble solipa_round (gdouble value, guint n_decimals);