There seems to be some parsing limitation on string dates in apex.
When I am doing the following it throws a system exception saying invalid date:
String s = '12/31/5000';
Date.parse(s);
However the following works:
String s = '12/31/3000';
Date.parse(s);
The break seems to happen at year 4000. Parsing of Dates after 12/31/4000 are not working while ones before 12/31/4000(inclusive) are working.
Is this a check on org level(because I tried on multiple orgs) or is this a generic salesforce issue.
String s = ....
instead ofDate s = ....
, right?