Cleaning. Fix error between RAW and ISO date.
This commit is contained in:
parent
ffa7638460
commit
cf74345424
1 changed files with 7 additions and 6 deletions
13
src/fr/devinsy/util/DateHelper.java
Executable file → Normal file
13
src/fr/devinsy/util/DateHelper.java
Executable file → Normal file
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue