GdaHanderTime: GNOME Data Access 5 manual

## GdaHanderTime GdaHanderTime — Default handler for time values |

## Stability Level

Stable, unless otherwise indicated

## Functions

GdaDataHandler * | gda_handler_time_new ()
GdaDataHandler * | gda_handler_time_new_no_locale ()
void | gda_handler_time_set_sql_spec ()
void | gda_handler_time_set_str_spec ()
gchar * | gda_handler_time_get_format ()

## Types and Values

struct | GdaHandlerTime
struct | GdaHandlerTimeClass
| GdaHandlerTimePriv

## Object Hierarchy

        GObject
        ╰── GdaHandlerTime

## Implemented Interfaces

GdaHandlerTime implements GdaDataHandler.

## Includes

    #include <libgda/gda-blob-op.h>

## Description

You should normally not need to use this API, refer to the GdaDataHandler interface documentation for more information.

## Functions

### gda_handler_time_new ()

    GdaDataHandler *
    gda_handler_time_new (void);

Creates a data handler for time values

#### Returns

the new object.

[transfer full]

### gda_handler_time_new_no_locale ()

    GdaDataHandler *
    gda_handler_time_new_no_locale (void);

Creates a data handler for time values, but using the default C locale instead of the current user locale.

#### Returns

the new object.

[transfer full]

### gda_handler_time_set_sql_spec ()

    void
    gda_handler_time_set_sql_spec (GdaHandlerTime *dh,
                                   GDateDMY first,
                                   GDateDMY sec,
                                   GDateDMY third,
                                   gchar separator,
                                   gboolean twodigits_years);

Specifies the SQL output style of the `dh` data handler. The general format is "FIRSTsSECsTHIRD" where FIRST, SEC and THIRD are specified by `first` , `sec` and `trird` and 's' is the separator, specified by `separator` .

The default implementation is `first` =G_DATE_MONTH, `sec` =G_DATE_DAY and `third` =G_DATE_YEAR (the year is rendered on 4 digits) and the separator is '-'

#### Parameters

dh | a GdaHandlerTime object |
first | what comes first in the date representation |
sec | what comes second in the date representation |
third | what comes third in the date representation |
separator | separator character used between year, month and day |
twodigits_years | TRUE if year part of date must be rendered on 2 digits |

### gda_handler_time_set_str_spec ()

    void
    gda_handler_time_set_str_spec (GdaHandlerTime *dh,
                                   GDateDMY first,
                                   GDateDMY sec,
                                   GDateDMY third,
                                   gchar separator,
                                   gboolean twodigits_years);

Specifies the human readable output style of the `dh` data handler. The general format is "FIRSTsSECsTHIRD" where FIRST, SEC and THIRD are specified by `first` , `sec` and `trird` and 's' is the separator, specified by `separator` .

The default implementation depends on the current locale, except if `dh` was created using `gda_handler_time_new_no_locale()`.

#### Parameters

dh | a GdaHandlerTime object |
first | what comes first in the date representation |
sec | what comes second in the date representation |
third | what comes third in the date representation |
separator | separator character used between year, month and day |
twodigits_years | TRUE if year part of date must be rendered on 2 digits |

Since: 4.2.1

### gda_handler_time_get_format ()

    gchar *
    gda_handler_time_get_format (GdaHandlerTime *dh,
                                 GType type);

Get a string representing the locale-dependent way to enter a date/time/datetime, using a syntax suitable for the GdauiFormatEntry widget

#### Parameters

dh | a GdaHandlerTime object |
type | the type of data being handled |

#### Returns

a new string

## Types and Values

### struct GdaHandlerTime

    struct GdaHandlerTime;

### struct GdaHandlerTimeClass

    struct GdaHandlerTimeClass {
    	GObjectClass         parent_class;
    };

### GdaHandlerTimePriv

    typedef struct _GdaHandlerTimePriv GdaHandlerTimePriv;

## See Also

GdaDataHandler interface