GLib Reference Manual | ||||
---|---|---|---|---|
Top | Description |
#include <glib.h> typedef GTimeSpan; #define G_TIME_SPAN_DAY #define G_TIME_SPAN_HOUR #define G_TIME_SPAN_MINUTE #define G_TIME_SPAN_SECOND #define G_TIME_SPAN_MILLISECOND GDateTime; void g_date_time_unref (GDateTime *datetime
); GDateTime * g_date_time_ref (GDateTime *datetime
); GDateTime * g_date_time_new_now (GTimeZone *tz
); GDateTime * g_date_time_new_now_local (void
); GDateTime * g_date_time_new_now_utc (void
); GDateTime * g_date_time_new_from_unix_local (gint64 t
); GDateTime * g_date_time_new_from_unix_utc (gint64 t
); GDateTime * g_date_time_new_from_timeval_local (const GTimeVal *tv
); GDateTime * g_date_time_new_from_timeval_utc (const GTimeVal *tv
); GDateTime * g_date_time_new (GTimeZone *tz
,gint year
,gint month
,gint day
,gint hour
,gint minute
,gdouble seconds
); GDateTime * g_date_time_new_local (gint year
,gint month
,gint day
,gint hour
,gint minute
,gdouble seconds
); GDateTime * g_date_time_new_utc (gint year
,gint month
,gint day
,gint hour
,gint minute
,gdouble seconds
); GDateTime * g_date_time_add (GDateTime *datetime
,GTimeSpan timespan
); GDateTime * g_date_time_add_years (GDateTime *datetime
,gint years
); GDateTime * g_date_time_add_months (GDateTime *datetime
,gint months
); GDateTime * g_date_time_add_weeks (GDateTime *datetime
,gint weeks
); GDateTime * g_date_time_add_days (GDateTime *datetime
,gint days
); GDateTime * g_date_time_add_hours (GDateTime *datetime
,gint hours
); GDateTime * g_date_time_add_minutes (GDateTime *datetime
,gint minutes
); GDateTime * g_date_time_add_seconds (GDateTime *datetime
,gdouble seconds
); GDateTime * g_date_time_add_full (GDateTime *datetime
,gint years
,gint months
,gint days
,gint hours
,gint minutes
,gdouble seconds
); gint g_date_time_compare (gconstpointer dt1
,gconstpointer dt2
); GTimeSpan g_date_time_difference (GDateTime *end
,GDateTime *begin
); guint g_date_time_hash (gconstpointer datetime
); gboolean g_date_time_equal (gconstpointer dt1
,gconstpointer dt2
); void g_date_time_get_ymd (GDateTime *datetime
,gint *year
,gint *month
,gint *day
); gint g_date_time_get_year (GDateTime *datetime
); gint g_date_time_get_month (GDateTime *datetime
); gint g_date_time_get_day_of_month (GDateTime *datetime
); gint g_date_time_get_week_numbering_year (GDateTime *datetime
); gint g_date_time_get_week_of_year (GDateTime *datetime
); gint g_date_time_get_day_of_week (GDateTime *datetime
); gint g_date_time_get_day_of_year (GDateTime *datetime
); gint g_date_time_get_hour (GDateTime *datetime
); gint g_date_time_get_minute (GDateTime *datetime
); gint g_date_time_get_second (GDateTime *datetime
); gint g_date_time_get_microsecond (GDateTime *datetime
); gdouble g_date_time_get_seconds (GDateTime *datetime
); gint64 g_date_time_to_unix (GDateTime *datetime
); gboolean g_date_time_to_timeval (GDateTime *datetime
,GTimeVal *tv
); GTimeSpan g_date_time_get_utc_offset (GDateTime *datetime
); const gchar * g_date_time_get_timezone_abbreviation (GDateTime *datetime
); gboolean g_date_time_is_daylight_savings (GDateTime *datetime
); GDateTime * g_date_time_to_timezone (GDateTime *datetime
,GTimeZone *tz
); GDateTime * g_date_time_to_local (GDateTime *datetime
); GDateTime * g_date_time_to_utc (GDateTime *datetime
); gchar * g_date_time_format (GDateTime *datetime
,const gchar *format
);
GDateTime is a structure that combines a Gregorian date and time into a single structure. It provides many conversion and methods to manipulate dates and times. Time precision is provided down to microseconds and the time can range (proleptically) from 0001-01-01 00:00:00 to 9999-12-31 23:59:59.999999. GDateTime follows POSIX time in the sense that it is oblivious to leap seconds.
GDateTime is an immutable object; once it has been created it cannot
be modified further. All modifiers will create a new GDateTime.
Nearly all such functions can fail due to the date or time going out
of range, in which case NULL
will be returned.
GDateTime is reference counted: the reference count is increased by calling
g_date_time_ref()
and decreased by calling g_date_time_unref()
. When the
reference count drops to 0, the resources allocated by the GDateTime
structure are released.
Many parts of the API may produce non-obvious results. As an example, adding two months to January 31st will yield March 31st whereas adding one month and then one month again will yield either March 28th or March 29th. Also note that adding 24 hours is not always the same as adding one day (since days containing daylight savings time transitions are either 23 or 25 hours in length).
GDateTime is available since GLib 2.26.
typedef gint64 GTimeSpan;
A value representing an interval of time, in microseconds.
Since 2.26
#define G_TIME_SPAN_DAY (G_GINT64_CONSTANT (86400000000))
Evaluates to a time span of one day.
Since 2.26
#define G_TIME_SPAN_HOUR (G_GINT64_CONSTANT (3600000000))
Evaluates to a time span of one hour.
Since 2.26
#define G_TIME_SPAN_MINUTE (G_GINT64_CONSTANT (60000000))
Evaluates to a time span of one minute.
Since 2.26
#define G_TIME_SPAN_SECOND (G_GINT64_CONSTANT (1000000))
Evaluates to a time span of one second.
Since 2.26
#define G_TIME_SPAN_MILLISECOND (G_GINT64_CONSTANT (1000))
Evaluates to a time span of one millisecond.
Since 2.26
typedef struct _GDateTime GDateTime;
GDateTime is an opaque structure whose members cannot be accessed directly.
Since 2.26
void g_date_time_unref (GDateTime *datetime
);
Atomically decrements the reference count of datetime
by one.
When the reference count reaches zero, the resources allocated by
datetime
are freed
|
a GDateTime |
Since 2.26
GDateTime * g_date_time_ref (GDateTime *datetime
);
Atomically increments the reference count of datetime
by one.
Since 2.26
GDateTime * g_date_time_new_now (GTimeZone *tz
);
Creates a GDateTime corresponding to this exact instant in the given
time zone tz
. The time is as accurate as the system allows, to a
maximum accuracy of 1 microsecond.
This function will always succeed unless the system clock is set to truly insane values (or unless GLib is still being used after the year 9999).
You should release the return value by calling g_date_time_unref()
when you are done with it.
Since 2.26
GDateTime * g_date_time_new_now_local (void
);
Creates a GDateTime corresponding to this exact instant in the local time zone.
This is equivalent to calling g_date_time_new_now()
with the time
zone returned by g_time_zone_new_local()
.
Since 2.26
GDateTime * g_date_time_new_now_utc (void
);
Creates a GDateTime corresponding to this exact instant in UTC.
This is equivalent to calling g_date_time_new_now()
with the time
zone returned by g_time_zone_new_utc()
.
Since 2.26
GDateTime * g_date_time_new_from_unix_local
(gint64 t
);
Creates a GDateTime corresponding to the given Unix time t
in the
local time zone.
Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC, regardless of the local time offset.
This call can fail (returning NULL
) if t
represents a time outside
of the supported range of GDateTime.
You should release the return value by calling g_date_time_unref()
when you are done with it.
Since 2.26
GDateTime * g_date_time_new_from_unix_utc (gint64 t
);
Creates a GDateTime corresponding to the given Unix time t
in UTC.
Unix time is the number of seconds that have elapsed since 1970-01-01 00:00:00 UTC.
This call can fail (returning NULL
) if t
represents a time outside
of the supported range of GDateTime.
You should release the return value by calling g_date_time_unref()
when you are done with it.
Since 2.26
GDateTime * g_date_time_new_from_timeval_local
(const GTimeVal *tv
);
Creates a GDateTime corresponding to the given GTimeVal tv
in the
local time zone.
The time contained in a GTimeVal is always stored in the form of seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the local time offset.
This call can fail (returning NULL
) if tv
represents a time outside
of the supported range of GDateTime.
You should release the return value by calling g_date_time_unref()
when you are done with it.
Since 2.26
GDateTime * g_date_time_new_from_timeval_utc
(const GTimeVal *tv
);
Creates a GDateTime corresponding to the given GTimeVal tv
in UTC.
The time contained in a GTimeVal is always stored in the form of seconds elapsed since 1970-01-01 00:00:00 UTC.
This call can fail (returning NULL
) if tv
represents a time outside
of the supported range of GDateTime.
You should release the return value by calling g_date_time_unref()
when you are done with it.
Since 2.26
GDateTime * g_date_time_new (GTimeZone *tz
,gint year
,gint month
,gint day
,gint hour
,gint minute
,gdouble seconds
);
Creates a new GDateTime corresponding to the given date and time in
the time zone tz
.
The year
must be between 1 and 9999, month
between 1 and 12 and day
between 1 and 28, 29, 30 or 31 depending on the month and the year.
hour
must be between 0 and 23 and minute
must be between 0 and 59.
seconds
must be at least 0.0 and must be strictly less than 60.0.
It will be rounded down to the nearest microsecond.
If the given time is not representable in the given time zone (for example, 02:30 on March 14th 2010 in Toronto, due to daylight savings time) then the time will be rounded up to the nearest existing time (in this case, 03:00). If this matters to you then you should verify the return value for containing the same as the numbers you gave.
In the case that the given time is ambiguous in the given time zone (for example, 01:30 on November 7th 2010 in Toronto, due to daylight savings time) then the time falling within standard (ie: non-daylight) time is taken.
It not considered a programmer error for the values to this function
to be out of range, but in the case that they are, the function will
return NULL
.
You should release the return value by calling g_date_time_unref()
when you are done with it.
|
a GTimeZone |
|
the year component of the date |
|
the month component of the date |
|
the day component of the date |
|
the hour component of the date |
|
the minute component of the date |
|
the number of seconds past the minute |
Returns : |
a new GDateTime, or NULL
|
Since 2.26
GDateTime * g_date_time_new_local (gint year
,gint month
,gint day
,gint hour
,gint minute
,gdouble seconds
);
Creates a new GDateTime corresponding to the given date and time in the local time zone.
This call is equivalent to calling g_date_time_new()
with the time
zone returned by g_time_zone_new_local()
.
|
the year component of the date |
|
the month component of the date |
|
the day component of the date |
|
the hour component of the date |
|
the minute component of the date |
|
the number of seconds past the minute |
Returns : |
a GDateTime, or NULL
|
Since 2.26.
GDateTime * g_date_time_new_utc (gint year
,gint month
,gint day
,gint hour
,gint minute
,gdouble seconds
);
Creates a new GDateTime corresponding to the given date and time in UTC.
This call is equivalent to calling g_date_time_new()
with the time
zone returned by g_time_zone_new_utc()
.
|
the year component of the date |
|
the month component of the date |
|
the day component of the date |
|
the hour component of the date |
|
the minute component of the date |
|
the number of seconds past the minute |
Returns : |
a GDateTime, or NULL
|
Since 2.26.
GDateTime * g_date_time_add (GDateTime *datetime
,GTimeSpan timespan
);
Creates a copy of datetime
and adds the specified timespan to the copy.
|
a GDateTime |
|
a GTimeSpan |
Returns : |
the newly created GDateTime which should be freed with
g_date_time_unref() . |
Since 2.26
GDateTime * g_date_time_add_years (GDateTime *datetime
,gint years
);
Creates a copy of datetime
and adds the specified number of years to the
copy.
|
a GDateTime |
|
the number of years |
Returns : |
the newly created GDateTime which should be freed with
g_date_time_unref() . |
Since 2.26
GDateTime * g_date_time_add_months (GDateTime *datetime
,gint months
);
Creates a copy of datetime
and adds the specified number of months to the
copy.
|
a GDateTime |
|
the number of months |
Returns : |
the newly created GDateTime which should be freed with
g_date_time_unref() . |
Since 2.26
GDateTime * g_date_time_add_weeks (GDateTime *datetime
,gint weeks
);
Creates a copy of datetime
and adds the specified number of weeks to the
copy.
|
a GDateTime |
|
the number of weeks |
Returns : |
the newly created GDateTime which should be freed with
g_date_time_unref() . |
Since 2.26
GDateTime * g_date_time_add_days (GDateTime *datetime
,gint days
);
Creates a copy of datetime
and adds the specified number of days to the
copy.
|
a GDateTime |
|
the number of days |
Returns : |
the newly created GDateTime which should be freed with
g_date_time_unref() . |
Since 2.26
GDateTime * g_date_time_add_hours (GDateTime *datetime
,gint hours
);
Creates a copy of datetime
and adds the specified number of hours
|
a GDateTime |
|
the number of hours to add |
Returns : |
the newly created GDateTime which should be freed with
g_date_time_unref() . |
Since 2.26
GDateTime * g_date_time_add_minutes (GDateTime *datetime
,gint minutes
);
Creates a copy of datetime
adding the specified number of minutes.
|
a GDateTime |
|
the number of minutes to add |
Returns : |
the newly created GDateTime which should be freed with
g_date_time_unref() . |
Since 2.26
GDateTime * g_date_time_add_seconds (GDateTime *datetime
,gdouble seconds
);
Creates a copy of datetime
and adds the specified number of seconds.
|
a GDateTime |
|
the number of seconds to add |
Returns : |
the newly created GDateTime which should be freed with
g_date_time_unref() . |
Since 2.26
GDateTime * g_date_time_add_full (GDateTime *datetime
,gint years
,gint months
,gint days
,gint hours
,gint minutes
,gdouble seconds
);
Creates a new GDateTime adding the specified values to the current date and
time in datetime
.
|
a GDateTime |
|
the number of years to add |
|
the number of months to add |
|
the number of days to add |
|
the number of hours to add |
|
the number of minutes to add |
|
the number of seconds to add |
Returns : |
the newly created GDateTime that should be freed with
g_date_time_unref() . |
Since 2.26
gint g_date_time_compare (gconstpointer dt1
,gconstpointer dt2
);
GCompareFunc-compatible comparison for GDateTime's. Both
GDateTime<-- -->'s must be non-NULL
.
|
first GDateTime to compare |
|
second GDateTime to compare |
Returns : |
-1, 0 or 1 if dt1 is less than, equal to or greater
than dt2 . |
Since 2.26
GTimeSpan g_date_time_difference (GDateTime *end
,GDateTime *begin
);
Calculates the difference in time between end
and begin
. The
GTimeSpan that is returned is effectively end
- begin
(ie:
positive if the first simparameter is larger).
|
a GDateTime |
|
a GDateTime |
Returns : |
the difference between the two GDateTime, as a time span expressed in microseconds. |
Since 2.26
guint g_date_time_hash (gconstpointer datetime
);
Hashes datetime
into a guint, suitable for use within GHashTable.
Since 2.26
gboolean g_date_time_equal (gconstpointer dt1
,gconstpointer dt2
);
Checks to see if dt1
and dt2
are equal.
Equal here means that they represent the same moment after converting them to the same time zone.
Since 2.26
void g_date_time_get_ymd (GDateTime *datetime
,gint *year
,gint *month
,gint *day
);
Retrieves the Gregorian day, month, and year of a given GDateTime.
|
a GDateTime. |
|
the return location for the gregorian year, or NULL . [out]
|
|
the return location for the month of the year, or NULL . [out]
|
|
the return location for the day of the month, or NULL . [out]
|
Since 2.26
gint g_date_time_get_year (GDateTime *datetime
);
Retrieves the year represented by datetime
in the Gregorian calendar.
|
A GDateTime |
Returns : |
the year represented by datetime
|
Since 2.26
gint g_date_time_get_month (GDateTime *datetime
);
Retrieves the month of the year represented by datetime
in the Gregorian
calendar.
|
a GDateTime |
Returns : |
the month represented by datetime
|
Since 2.26
gint g_date_time_get_day_of_month (GDateTime *datetime
);
Retrieves the day of the month represented by datetime
in the gregorian
calendar.
|
a GDateTime |
Returns : |
the day of the month |
Since 2.26
gint g_date_time_get_week_numbering_year (GDateTime *datetime
);
Returns the ISO 8601 week-numbering year in which the week containing
datetime
falls.
This function, taken together with g_date_time_get_week_of_year()
and
g_date_time_get_day_of_week()
can be used to determine the full ISO
week date on which datetime
falls.
This is usually equal to the normal Gregorian year (as returned by
g_date_time_get_year()
), except as detailed below:
For Thursday, the week-numbering year is always equal to the usual calendar year. For other days, the number is such that every day within a complete week (Monday to Sunday) is contained within the same week-numbering year.
For Monday, Tuesday and Wednesday occuring near the end of the year, this may mean that the week-numbering year is one greater than the calendar year (so that these days have the same week-numbering year as the Thursday occuring early in the next year).
For Friday, Saturaday and Sunday occuring near the start of the year, this may mean that the week-numbering year is one less than the calendar year (so that these days have the same week-numbering year as the Thursday occuring late in the previous year).
An equivalent description is that the week-numbering year is equal to the calendar year containing the majority of the days in the current week (Monday to Sunday).
Note that January 1 0001 in the proleptic Gregorian calendar is a Monday, so this function never returns 0.
|
a GDateTime |
Returns : |
the ISO 8601 week-numbering year for datetime
|
Since 2.26
gint g_date_time_get_week_of_year (GDateTime *datetime
);
Returns the ISO 8601 week number for the week containing datetime
.
The ISO 8601 week number is the same for every day of the week (from
Moday through Sunday). That can produce some unusual results
(described below).
The first week of the year is week 1. This is the week that contains the first Thursday of the year. Equivalently, this is the first week that has more than 4 of its days falling within the calendar year.
The value 0 is never returned by this function. Days contained within a year but occuring before the first ISO 8601 week of that year are considered as being contained in the last week of the previous year. Similarly, the final days of a calendar year may be considered as being part of the first ISO 8601 week of the next year if 4 or more days of that week are contained within the new year.
|
a GDateTime |
Returns : |
the ISO 8601 week number for datetime . |
Since 2.26
gint g_date_time_get_day_of_week (GDateTime *datetime
);
Retrieves the ISO 8601 day of the week on which datetime
falls (1 is
Monday, 2 is Tuesday... 7 is Sunday).
|
a GDateTime |
Returns : |
the day of the week |
Since 2.26
gint g_date_time_get_day_of_year (GDateTime *datetime
);
Retrieves the day of the year represented by datetime
in the Gregorian
calendar.
|
a GDateTime |
Returns : |
the day of the year |
Since 2.26
gint g_date_time_get_hour (GDateTime *datetime
);
Retrieves the hour of the day represented by datetime
|
a GDateTime |
Returns : |
the hour of the day |
Since 2.26
gint g_date_time_get_minute (GDateTime *datetime
);
Retrieves the minute of the hour represented by datetime
|
a GDateTime |
Returns : |
the minute of the hour |
Since 2.26
gint g_date_time_get_second (GDateTime *datetime
);
Retrieves the second of the minute represented by datetime
|
a GDateTime |
Returns : |
the second represented by datetime
|
Since 2.26
gint g_date_time_get_microsecond (GDateTime *datetime
);
Retrieves the microsecond of the date represented by datetime
|
a GDateTime |
Returns : |
the microsecond of the second |
Since 2.26
gdouble g_date_time_get_seconds (GDateTime *datetime
);
Retrieves the number of seconds since the start of the last minute, including the fractional part.
|
a GDateTime |
Returns : |
the number of seconds |
Since 2.26
gint64 g_date_time_to_unix (GDateTime *datetime
);
Gives the Unix time corresponding to datetime
, rounding down to the
nearest second.
Unix time is the number of seconds that have elapsed since 1970-01-01
00:00:00 UTC, regardless of the time zone associated with datetime
.
|
a GDateTime |
Returns : |
the Unix time corresponding to datetime
|
Since 2.26
gboolean g_date_time_to_timeval (GDateTime *datetime
,GTimeVal *tv
);
Stores the instant in time that datetime
represents into tv
.
The time contained in a GTimeVal is always stored in the form of
seconds elapsed since 1970-01-01 00:00:00 UTC, regardless of the time
zone associated with datetime
.
On systems where 'long' is 32bit (ie: all 32bit systems and all
Windows systems), a GTimeVal is incapable of storing the entire
range of values that GDateTime is capable of expressing. On those
systems, this function returns FALSE
to indicate that the time is
out of range.
On systems where 'long' is 64bit, this function never fails.
Since 2.26
GTimeSpan g_date_time_get_utc_offset (GDateTime *datetime
);
Determines the offset to UTC in effect at the time and in the time
zone of datetime
.
The offset is the number of microseconds that you add to UTC time to arrive at local time for the time zone (ie: negative numbers for time zones west of GMT, positive numbers for east).
If datetime
represents UTC time, then the offset is always zero.
|
a GDateTime |
Returns : |
the number of microseconds that should be added to UTC to get the local time |
Since 2.26
const gchar * g_date_time_get_timezone_abbreviation
(GDateTime *datetime
);
Determines the time zone abbreviation to be used at the time and in
the time zone of datetime
.
For example, in Toronto this is currently "EST" during the winter months and "EDT" during the summer months when daylight savings time is in effect.
|
a GDateTime |
Returns : |
the time zone abbreviation. The returned string is owned by the GDateTime and it should not be modified or freed. [transfer none] |
Since 2.26
gboolean g_date_time_is_daylight_savings (GDateTime *datetime
);
Determines if daylight savings time is in effect at the time and in
the time zone of datetime
.
Since 2.26
GDateTime * g_date_time_to_timezone (GDateTime *datetime
,GTimeZone *tz
);
Create a new GDateTime corresponding to the same instant in time as
datetime
, but in the time zone tz
.
This call can fail in the case that the time goes out of bounds. For example, converting 0001-01-01 00:00:00 UTC to a time zone west of Greenwich will fail (due to the year 0 being out of range).
You should release the return value by calling g_date_time_unref()
when you are done with it.
Since 2.26
GDateTime * g_date_time_to_local (GDateTime *datetime
);
Creates a new GDateTime corresponding to the same instant in time as
datetime
, but in the local time zone.
This call is equivalent to calling g_date_time_to_timezone()
with the
time zone returned by g_time_zone_new_local()
.
Since 2.26
GDateTime * g_date_time_to_utc (GDateTime *datetime
);
Creates a new GDateTime corresponding to the same instant in time as
datetime
, but in UTC.
This call is equivalent to calling g_date_time_to_timezone()
with the
time zone returned by g_time_zone_new_utc()
.
Since 2.26
gchar * g_date_time_format (GDateTime *datetime
,const gchar *format
);
Creates a newly allocated string representing the requested format
.
The following format specifiers are supported:
|
the abbreviated weekday name according to the current locale |
|
the full weekday name according to the current locale |
|
the abbreviated month name according to the current locale |
|
the full month name according to the current locale |
|
the day of the month as a decimal number (range 01 to 31) |
|
the day of the month as a decimal number (range 1 to 31) |
|
equivalent to % (the ISO 8601 date
format)
|
|
equivalent to %
|
|
the hour as a decimal number using a 24-hour clock (range 00 to 23) |
|
the hour as a decimal number using a 12-hour clock (range 01 to 12) |
|
the day of the year as a decimal number (range 001 to 366) |
|
the hour (24-hour clock) as a decimal number (range 0 to 23); single digits are preceded by a blank |
|
the hour (12-hour clock) as a decimal number (range 1 to 12); single digits are preceded by a blank |
|
the month as a decimal number (range 01 to 12) |
|
the minute as a decimal number (range 00 to 59) |
|
the micro-seconds as a decimal number |
|
either "AM" or "PM" according to the given time value, or the corresponding strings for the current locale. Noon is treated as "PM" and midnight as "AM". |
|
like %p but lowercase: "am" or "pm" or a corresponding string for
the current locale
|
|
the time in a.m. or p.m. notation |
|
the time in 24-hour notation (% )
|
|
the number of seconds since the Epoch, that is, since 1970-01-01 00:00:00 UTC |
|
the second as a decimal number (range 00 to 60) |
|
a tab character |
|
the day of the week as a decimal, range 1 to 7, Monday being 1 |
|
the week number of the current year as a decimal number |
|
the preferred date representation for the current locale without the time |
|
the preferred time representation for the current locale without the date |
|
the year as a decimal number without the century |
|
the year as a decimal number including the century |
|
the time-zone as hour offset from UTC |
|
the time zone or name or abbreviation |
|
a literal %% character
|
|
A GDateTime |
|
a valid UTF-8 string, containing the format for the GDateTime |
Returns : |
a newly allocated string formatted to the requested format
or NULL in the case that there was an error. The string
should be freed with g_free() . |
Since 2.26