Gda.HandlerTime

g GObject.GInterface GObject.GInterface Gda.DataHandler Gda.DataHandler GObject.GInterface->Gda.DataHandler GObject.Object GObject.Object Gda.HandlerTime Gda.HandlerTime GObject.Object->Gda.HandlerTime Gda.DataHandler->Gda.HandlerTime

Subclasses:None

Methods

Inherited:GObject.Object (37), Gda.DataHandler (8)
Structs:GObject.ObjectClass (5)
class new ()
class new_no_locale ()
  get_format (type)
  get_no_locale_str_from_value (value)
  set_sql_spec (first, sec, third, separator, twodigits_years)
  set_str_spec (first, sec, third, separator, twodigits_years)

Virtual Methods

Inherited:GObject.Object (7), Gda.DataHandler (7)

Properties

None

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
object GObject.Object r  

Class Details

class Gda.HandlerTime(**kwargs)
Bases:GObject.Object, Gda.DataHandler
Abstract:No
Structure:Gda.HandlerTimeClass
classmethod new()
Returns:the new object
Return type:Gda.DataHandler

Creates a data handler for time values

classmethod new_no_locale()
Returns:the new object
Return type:Gda.DataHandler

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

get_format(type)
Parameters:type (GObject.GType) – the type of data being handled
Returns:a new string
Return type:str

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

get_no_locale_str_from_value(value)
Parameters:value (GObject.Value) – a GObject.Value value
Returns:a new string representing value without taking the current locale into account (i.e. in the “C” locale)
Return type:str
set_sql_spec(first, sec, third, separator, twodigits_years)
Parameters:
  • first (GLib.DateDMY) – what comes first in the date representation
  • sec (GLib.DateDMY) – what comes second in the date representation
  • third (GLib.DateDMY) – what comes third in the date representation
  • separator (int) – separator character used between year, month and day
  • twodigits_years (bool) – True if year part of date must be rendered on 2 digits

Specifies the SQL output style of the self 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=:obj:GLib.DateDMY.MONTH, sec=:obj:GLib.DateDMY.DAY and third=:obj:GLib.DateDMY.YEAR (the year is rendered on 4 digits) and the separator is ‘-‘

set_str_spec(first, sec, third, separator, twodigits_years)
Parameters:
  • first (GLib.DateDMY) – what comes first in the date representation
  • sec (GLib.DateDMY) – what comes second in the date representation
  • third (GLib.DateDMY) – what comes third in the date representation
  • separator (int) – separator character used between year, month and day
  • twodigits_years (bool) – True if year part of date must be rendered on 2 digits

Specifies the human readable output style of the self 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 self was created using Gda.HandlerTime.new_no_locale().

New in version 4.2.1.