## Date and Time Formatting Date and Time Formatting |

## Synopsis

    enum                DTFormatKind;
    void                e_datetime_format_add_setup_widget  (GtkWidget *table,
                                                             gint row,
                                                             const gchar *component,
                                                             const gchar *part,
                                                             DTFormatKind kind,
                                                             const gchar *caption);
    gchar *             e_datetime_format_format            (const gchar *component,
                                                             const gchar *part,
                                                             DTFormatKind kind,
                                                             time_t value);
    gchar *             e_datetime_format_format_tm         (const gchar *component,
                                                             const gchar *part,
                                                             DTFormatKind kind,
                                                             struct tm *tm_time);

## Description

## Details

### enum DTFormatKind

    typedef enum {
    	DTFormatKindDate,
    	DTFormatKindTime,
    	DTFormatKindDateTime,
    	DTFormatKindShortDate
    } DTFormatKind;

### e_datetime_format_add_setup_widget ()

    void                e_datetime_format_add_setup_widget  (GtkWidget *table,
                                                             gint row,
                                                             const gchar *component,
                                                             const gchar *part,
                                                             DTFormatKind kind,
                                                             const gchar *caption);

Adds a setup widget for a component and part. The table should have 3 columns. All the work related to loading and saving the value is done automatically, on user's changes.

`table` : | Where to attach widgets. Requires 3 columns.
`row` : | On which row to attach.
`component` : | Component identifier for the format. Cannot be empty nor NULL.
`part` : | Part in the component, can be NULL or empty string.
`kind` : | Kind of the format for the component/part.
`caption` : | Caption for the widget, can be NULL, then the "Format:" is used.

### e_datetime_format_format ()

    gchar *             e_datetime_format_format            (const gchar *component,
                                                             const gchar *part,
                                                             DTFormatKind kind,
                                                             time_t value);

### e_datetime_format_format_tm ()

    gchar *             e_datetime_format_format_tm         (const gchar *component,
                                                             const gchar *part,
                                                             DTFormatKind kind,
                                                             struct tm *tm_time);