function set_parse(str: String): void {
    // Gjs wrapper for g_date_set_parse()

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 GLib.Date.prototype.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).


string to parse