parseWithPicAndLcid

parseWithPicAndLcid(source:    String;
                    pic:       String;
                    lcid:      Integer;
                    errOffset: Integer output): Integer updating;

The parseWithPicAndLcid method of the Time primitive type parses the string specified in the source parameter using the specified time picture and locale, validating that the source matches the time format picture to ensure that it matches the time picture string specified in the pic 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 pic parameter is null, the time format picture of the locale specified in the lcid parameter is used. If the value of the lcid parameter is zero (0), the time format picture of the current locale is used.

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 when separators are specified.

If the marker picture is "t", the source marker text must be a single character matching the first character of one of the AM/PM indicators for the locale. If the marker picture is "tt" (or longer), the source marker text must match exactly one of the AM/PM indicators for the locale. A locale-based case-insensitive comparison is used. If the AM indicator for the locale is "a.m." (for example, New Zealand), the indicator "AM" (for example, United States) is also accepted.

If the hour picture is "h" or "hh", the hour value must be in the range 0 through 12. If the hour picture is "H" or "HH", the hour value must be in the range 0 through 23. The minute and second values must be in the range 0 through 59.

Source text "12:00a.m." and "0:00a.m." with picture "h:mmtt" or "hh:mmtt" converts to time 00:00 (midnight). Source text "12:00p.m." with picture "h:mmtt" or "hh:mmtt" converts to time 12:00 (midday).

The format can include ".fff" after "s", to recognize a millisecond value. The decimal separator for the locale is expected between the second and millisecond values. The text can include zero (0) through three digits in the millisecond value.

The "H:mm:ss.fff" picture allows the following.

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.