* If it passes for a given format, break the loop and exit.
In this regex tutorial, we will learn to validate simple date formats e.g. Here, we want to use a regex that simply checks whether the input looks like a date, without trying to eliminate things such as February 31st.
However, for translations of this document, see Technology? As a consequence, many possible documents which were not well-formed according to previous editions of this specification are now well-formed, and previously invalid documents using the newly-allowed name characters in, for example, ID attributes, are now valid.
* If the validation fails, test for other formats till array iteration is completed.The previous errata for this document, are also available. This document is also available in these non-normative formats: XML and XHTML with color-coded revision indicators.Copyright © 2008 The Extensible Markup Language (XML) is a subset of SGML that is completely described in this document.As Simple Date Format class itself is not thread safe it can cause issues in production. /** * */ package home.always.learning.java; import Simple Date Format; /** * @author Tarun Trehan * @category Utility * * Code to validate if input "String" is a valid date or not.