parseWithFmtAndLcid

parseWithFmtAndLcid(source:    String;
                    fmt:       TimeFormat;
                    lcid:      Integer;
                    errOffset: Integer output): Integer updating;

The parseWithFmtAndLcid method of the Time primitive type parses the string specified in the source parameter to ensure that it matches the time format specified in the fmt parameter.

The time must match the appropriate values for the locale specified in the lcid parameter. If the source string contains a valid time, it is assigned to the receiver; otherwise the invalid time value is assigned to the receiver (the isValid method of the Time primitive type will return false).

If the value of the fmt parameter is null, the time format of the locale specified in the lcid parameter is used. If the value of the lcid parameter is zero (0), the time format of the current locale is used. If the value of the fmt parameter is not null, the AM/PM indicators, if specified, are used rather than the locale indicators.

If the value of the source parameter matches the format rules, the method returns zero (0) and sets the receiver to the parsed value. If it does not match the format rules, it returns a JADE error code (parse errors are in the range 1800 through 1869), indicates the first offending character returning its zero-based offset using the output errOffset parameter, and sets the receiver to the invalid time value.

Leading zeros in the hour, minute, and second elements are optional.

This method is the same as the parseWithPicAndLcid method except that the picture string is taken from the TimeFormat class format property. For more details and examples of valid date matches, see the parseWithPicAndLcid method.

If you do not define the EnhancedLocaleSupport parameter in the [JadeEnvironment] section of the JADE initialization file on the database node or you set it to false, inconsistent results could be returned to the application server when running in JADE thin client mode and there are locale overrides, as all overrides on the application server are suppressed if enhanced locale support is not enabled. Formatting of locale data is done on the application server, based on the locale of the corresponding presentation client.