commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r905267 - /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/DateUtils.java
Date Mon, 01 Feb 2010 12:00:11 GMT
Author: niallp
Date: Mon Feb  1 12:00:11 2010
New Revision: 905267

URL: http://svn.apache.org/viewvc?rev=905267&view=rev
Log:
Javadoc

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/DateUtils.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/DateUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/DateUtils.java?rev=905267&r1=905266&r2=905267&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/DateUtils.java (original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/DateUtils.java Mon
Feb  1 12:00:11 2010
@@ -306,6 +306,21 @@
         return parseDateWithLeniency(str, parsePatterns, false);
     }
 
+    /**
+     * <p>Parses a string representing a date by trying a variety of different parsers.</p>
+     * 
+     * <p>The parse will try each parse pattern in turn.
+     * A parse is only deemed successful if it parses the whole of the input string.
+     * If no parse patterns match, a ParseException is thrown.</p>
+     * 
+     * @param str  the date to parse, not null
+     * @param parsePatterns  the date format patterns to use, see SimpleDateFormat, not null
+     * @param lenient Specify whether or not date/time parsing is to be lenient.
+     * @return the parsed date
+     * @throws IllegalArgumentException if the date string or pattern array is null
+     * @throws ParseException if none of the date patterns were suitable
+     * @see java.util.Calender#isLenient()
+     */
     private static Date parseDateWithLeniency(String str, String[] parsePatterns,
             boolean lenient) throws ParseException {
         if (str == null || parsePatterns == null) {



Mime
View raw message