set_parse


Description:

public void set_parse (string str)

Parses a user-inputted string str, and try to figure out what date it represents, taking the current locale 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 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).

Parameters:

this

a Date to fill in

str

string to parse