Validating date format in java www matchmakingdating org

23 Apr

*/ public class Multi Format Date Validation I expect the code is sufficient to implement those requirements. This is a utility for a tool that needs to validate dates from an external data source.

My concern would be with the requirements themselves. These are some initial requirements and later i will give an option to validate against a given format/formats.

validating date format in java-72

“32/1/2010” , “32/01/2020” – day is out of range [1-31] 2.

But you know your environment, requirements, constraints, and use cases better than anyone here, so it of course has to be your call. I think, i will write my program in such a way that it returns a Custom Object.

It will contain a list of formats for which validation was successful.

A flag in case validation was successful for more than 1 formats.

Will leave it on the program caller's decision to handle specifically. Your loop can be a bit more efficient: 1) you can reuse and modify one single Simple Date Format object.