diff --git a/src/fr/devinsy/util/DateHelper.java b/src/fr/devinsy/util/DateHelper.java old mode 100755 new mode 100644 index 5004c4b..107a03b --- a/src/fr/devinsy/util/DateHelper.java +++ b/src/fr/devinsy/util/DateHelper.java @@ -5,10 +5,10 @@ */ package fr.devinsy.util; - import java.util.Calendar; import java.util.GregorianCalendar; -import java.util.regex.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** @@ -18,13 +18,14 @@ public class DateHelper { public String LINE_SEPARATOR = "\n"; - static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (DateHelper.class); + //static private org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger (DateHelper.class); static final String EUROPEAN_DATE_PATTERN = "^([0123]{0,1}\\d)/([01]{0,1}\\d)/(\\d\\d\\d\\d)$"; static final String RAW_DATE_PATTERN = "^(\\d\\d\\d\\d)([01]\\d)([0123]\\d)$"; - static final String ISO_DATE_PATTERN = "^(\\d\\d\\d\\d)([01]\\d)([0123]\\d)$"; + static final String ISO_DATE_PATTERN = "^(\\d\\d\\d\\d)-([01]\\d)-([0123]\\d)$"; static final String AMERICAN_DATE_PATTERN = "^([01]{0,1}\\d)/([0123]{0,1}\\d)/(\\d\\d\\d\\d)$"; + /** * */ @@ -70,7 +71,7 @@ public class DateHelper /** * */ - public String rawFormat (Calendar time) + public String americanFormat (Calendar time) { String result; @@ -91,7 +92,7 @@ public class DateHelper /** * */ - public String americanFormat (Calendar time) + public String rawFormat (Calendar time) { String result;