1 /* 2 * 3 * Customizable date/time formatting in Evolution 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU Lesser General Public License as published by 7 * the Free Software Foundation. 8 * 9 * This program is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public License 15 * along with this program; if not, see <http://www.gnu.org/licenses/>. 16 * 17 * 18 * Copyright (C) 1999-2009 Novell, Inc. (www.novell.com) 19 * 20 */ 21 22 #if !defined (__E_UTIL_H_INSIDE__) && !defined (LIBEUTIL_COMPILATION) 23 #error "Only <e-util/e-util.h> should be included directly." 24 #endif 25 26 #ifndef E_DATETIME_FORMAT_H 27 #define E_DATETIME_FORMAT_H 28 29 #include <time.h> 30 #include <gtk/gtk.h> 31 32 G_BEGIN_DECLS 33 34 typedef enum { 35 DTFormatKindDate, 36 DTFormatKindTime, 37 DTFormatKindDateTime, 38 DTFormatKindShortDate 39 } DTFormatKind; 40 41 void e_datetime_format_add_setup_widget 42 (GtkWidget *table, 43 gint row, 44 const gchar *component, 45 const gchar *part, 46 DTFormatKind kind, 47 const gchar *caption); 48 gchar * e_datetime_format_format (const gchar *component, 49 const gchar *part, 50 DTFormatKind kind, 51 time_t value); 52 void e_datetime_format_format_inline (const gchar *component, 53 const gchar *part, 54 DTFormatKind kind, 55 time_t value, 56 gchar *buffer, 57 gint buffer_size); 58 gchar * e_datetime_format_format_tm (const gchar *component, 59 const gchar *part, 60 DTFormatKind kind, 61 struct tm *tm_time); 62 void e_datetime_format_format_tm_inline 63 (const gchar *component, 64 const gchar *part, 65 DTFormatKind kind, 66 struct tm *tm_time, 67 gchar *buffer, 68 gint buffer_size); 69 gboolean e_datetime_format_includes_day_name 70 (const gchar *component, 71 const gchar *part, 72 DTFormatKind kind); 73 74 G_END_DECLS 75 76 #endif /* E_DATETIME_FORMAT_H */ 77