[Dive4elements-commits] [PATCH 10 of 13] DateGuesser: doc
Wald Commits
scm-commit at wald.intevation.org
Fri Jan 4 11:12:49 CET 2013
# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1357294393 -3600
# Node ID 1cfda99c024cbcb581d3c78591789550e0f4de07
# Parent 8195396b23ce63c52ca613639f6e6ed584e5bb18
DateGuesser: doc.
diff -r 8195396b23ce -r 1cfda99c024c flys-backend/src/main/java/de/intevation/flys/utils/DateGuesser.java
--- a/flys-backend/src/main/java/de/intevation/flys/utils/DateGuesser.java Fri Jan 04 11:13:02 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/utils/DateGuesser.java Fri Jan 04 11:13:13 2013 +0100
@@ -68,6 +68,12 @@
return Math.max(Math.min(month-1, 11), 0);
}
+ /**
+ * Guess date by trying all different patterns.
+ * Throws IllegalArgumentException if not able to guess.
+ * @param s The date to be guessed (e.g. 11.02.2001).
+ * @return the parsed Date.
+ */
public static Date guessDate(String s) {
if (s == null || (s = s.trim()).length() == 0) {
throw new IllegalArgumentException();
More information about the Dive4elements-commits
mailing list