Top | ![]() |
![]() |
![]() |
![]() |
ETimeParseStatus e_time_parse_date_and_time (const
,gchar *valuestruct tm *result
);
Parses a string value
containing a date and a time and stores the
result in result
. The date in value
is expected to be in a format
like "Wed 3/13/00 14:20:00", though gettext()
ETimeParseStatus e_time_parse_date (const
,gchar *valuestruct tm *result
);
Takes in a date string entered by the user and tries to convert it to a struct tm.
An ETimeParseStatus result code indicating whether
value
was an empty string, a valid date, or an invalid date.
ETimeParseStatus e_time_parse_date_and_time_ex (const
,gchar *valuestruct tm *result
,);
gboolean *two_digit_year
Parses a string value
containing a date and a time and stores the
result in result
. The date in value
is expected to be in a format
like "Wed 3/13/00 14:20:00", though gettext()
value |
The string to parse a date and time from. |
|
result |
A tm to store the result in. |
|
two_digit_year |
set to TRUE, is parsing with two-digit year, else FALSE, but only when not NULL. |
E_TIME_PARSE_OK if the string was successfully parsed, E_TIME_PARSE_NONE if the string was empty, or E_TIME_PARSE_INVALID if the string could not be parsed.
Since: 2.22
ETimeParseStatus e_time_parse_date_ex (const
,gchar *valuestruct tm *result
,);
gboolean *two_digit_year
Takes in a date string entered by the user and tries to convert it to a struct tm.
value |
A date string. |
|
result |
Return value for the parsed date. |
|
two_digit_year |
set to TRUE, is parsing with two-digit year, else FALSE, but only when not NULL. |
An ETimeParseStatus result code indicating whether
value
was an empty string, a valid date, or an invalid date.
Since: 2.22
ETimeParseStatus e_time_parse_time (const
,gchar *valuestruct tm *result
);
Parses value
, a string containing a time. value
is expected to be
in a format like "14:20:00". gettext()
An ETimeParseStatus result code indicating whether
value
was an empty string, a valid date, or an invalid date.
void e_time_format_date_and_time (struct tm *date_tm
,,
gboolean use_24_hour_format,
gboolean show_midnight,
gboolean show_zero_seconds,
gchar *buffer);
gint buffer_size
Creates a string representation of the time value date_tm
and
stores it in buffer
. buffer_size
should be at least 64 to be
safe. If show_midnight
is FALSE
buffer
. If show_zero_seconds
is
FALSE
buffer
.
date_tm |
The tm to convert to a string. |
|
use_24_hour_format |
A |
|
show_midnight |
A |
|
show_zero_seconds |
A |
|
buffer |
A |
|
buffer_size |
The length of |
void e_time_format_time (struct tm *date_tm
,,
gboolean use_24_hour_format,
gboolean show_zero_seconds,
gchar *buffer);
gint buffer_size
Creates a string representation of a time value in date_tm
and
stores it in buffer
. buffer_size
should be at least 64.
date_tm |
The tm to convert to a string. |
|
use_24_hour_format |
A |
|
show_zero_seconds |
A |
|
buffer |
The |
|
buffer_size |
The length of |
time_t e_mktime_utc (struct tm *tm
);
Like mktime(3), but assumes UTC instead of local timezone.
void e_localtime_with_offset (,
time_t ttstruct tm *tm
,);
gint *offset
Converts the calendar time time representation tt
to a broken-down
time representation, store in tm
, and provides the offset in
seconds from UTC time, stored in offset
.
tt |
The |
|
tm |
The tm to store the result in. |
|
offset |
The |
gchar * e_time_get_d_fmt_with_4digit_year (void
);
Retrieves a date format string with a 4-digit year (D_FMT on systems with
nl_langinfo()
g_free()
Since: 2.22