time_parse_date_and_time_ex


Description:


[ Version ( since = "2.22" ) ]
public TimeParseStatus time_parse_date_and_time_ex (string value, tm result, bool 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 is used to support the appropriate local formats. There is also some leniency on the format of the string, e.g. the weekday can be skipped or 12-hour formats with am/pm can be used.

Parameters:

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.

Returns:

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.


Namespace: E



2022 vala-language.org