E-PC: PeopleCode IsDate Function Returns True when Input String Is Properly Formatted but Contains Alphabetic Chars
(Doc ID 2626938.1)
Last updated on MAY 02, 2023
Applies to:
PeopleSoft Enterprise PT PeopleTools - Version 8.57 to 8.58 [Release 8.4]Information in this document applies to any platform.
Symptoms
Issue is reproducible on PT 8.57.10.
PeopleCode API IsDate returns true when input string is properly formatted but containing alphabetic chars - e.g.: IsDate("YYYY-MM-DD"), IsDate("NOTR-IG-HT").
The issue can be reproduced at will with the following steps:
1. Write PeopleCode that invokes the PeopleCode API IsDate.
2. Use following input values when testing the API.
IsDate("2019-11-13")
IsDate("2019-11-31")
IsDate("2019-30-10")
IsDate("2020-01-66")
IsDate("YYYY-MM-DD")
IsDate("NOTR-IG-HT")
3. Note that IsDate returns true for "YYYY-MM-DD" and "NOTR-IG-HT", even though, those are invalid dates.
Test results:
IsDate("2019-11-13") – Returns True – '2019-11-13' is a valid date - as expected.
IsDate("2019-11-31") – Returns False – '2019-11-31' is an invalid date - as expected.
IsDate("2019-30-10") – Returns False – '2019-30-10' is an invalid date - as expected.
IsDate("2020-01-66") – Returns False – '2020-01-66' is an invalid date - as expected.
IsDate("YYYY-MM-DD") – Returns True, even though 'YYYY-MM-DD' is an invalid date.
IsDate("NOTR-IG-HT") – Returns True, even though 'NOTR-IG-HT' is an invalid date.
Changes
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Changes |
Cause |
Solution |
References |