g_date_set_parse (
  GDate* date,
  const gchar* str


Parses a user-inputted string str, and try to figure out what date it represents, taking the [current locale][setlocale] into account. If the string is successfully parsed, the date will be valid after the call. Otherwise, it will be invalid. You should check using g_date_valid() to see whether the parsing succeeded.

This function is not appropriate for file formats and the like; it isn’t very precise, and its exact behavior varies with the locale. It’s intended to be a heuristic routine that guesses what the user means by a given string (and it does work pretty well in that capacity).


str const gchar*

String to parse.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.