|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.paris.lutece.plugins.stock.utils.DateUtils
public final class DateUtils
Classe utilitaire pour la manipulation des dates
| Field Summary | |
|---|---|
static int |
DATE_CRITERE_ENTRE_LE
|
static int |
DATE_CRITERE_ET_LE
|
static int |
DATE_CRITERE_OU_LE
|
static String |
DATE_FR
|
static String |
HOUR_FR
|
static String |
XML_DATE_FORMAT
|
| Method Summary | |
|---|---|
static String |
converteDateAnglais(String dateAnglaise)
Convertis une date depuis le format dd/MM/yyyy vers le format dd-MM-yyyy. |
static String |
getAnnee(Date date)
Retourne l'année d'une date |
static int |
getAnneeEnCours()
Retourne l'année en cours |
static Timestamp |
getCurrentDate()
Retourne la date du jour |
static String |
getCurrentDateString()
renvoie la date courante. |
static String |
getCurrentDateString(String strPattern)
renvoie la date courante |
static String |
getDate(Date date,
String strPattern)
Renvoie la date sous le format défini par strPattern |
static Timestamp |
getDate(String strDate,
boolean isStartOfDayHour)
Transfome une date en format string de type dd/MM/yyyy en objet Timestamp |
static Timestamp |
getDate(Timestamp date,
boolean isStartOfDayHour)
Renvoie un timestamp dont l'heure doit etre 00h01 FALSE si l'heure doit etre 23H59 |
static String |
getDate(Timestamp date,
String strPattern)
Renvoie la date sous le format défini par strPattern |
static Timestamp |
getDateFirstMinute(Date date)
return a timestamp Object which correspond with the string specified in parameter. |
static String |
getDateFr(Date date)
Return string for date dd/MM/yyyy |
static Timestamp |
getDateLastMinute(Date date)
return a timestamp Object which correspond with the string specified in parameter. |
static Timestamp |
getHour(String strHour)
Transfome une date en format string de type HH:mm en objet Timestamp |
static String |
getHourFr(Date date)
Return string for date HH:mm |
static Date |
getHourWithoutDate(Date hour)
Get a timestamp with hour setted and date 01/01/1970. |
static Date |
mergeDateHour(Date date,
Date hour)
Set the given date hour with the given hour. |
static boolean |
validateDate(String date)
Validate a date |
static boolean |
valideDateEntreLeEtLeOuLe(List<String> dateEffetRecherche,
boolean obligatoire)
vérifie un trigramme de dates entre le ... et le ... ou le. |
static boolean |
verifierHeure(String sHeure)
Vérifie que l'heure est bien au format HH:mm. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DATE_CRITERE_ENTRE_LE
public static final int DATE_CRITERE_ET_LE
public static final int DATE_CRITERE_OU_LE
public static final String XML_DATE_FORMAT
public static final String DATE_FR
public static final String HOUR_FR
| Method Detail |
|---|
public static Timestamp getDate(String strDate,
boolean isStartOfDayHour)
strDate - Date à transformerisStartOfDayHour - TRUE si l'heure doit etre 00h01 FALSE si l'heure
doit etre 23H59
public static String getDate(Timestamp date,
String strPattern)
date - la datestrPattern - le format souhaite de la date
public static String getDate(Date date,
String strPattern)
date - la datestrPattern - le format souhaite de la date
public static String getDateFr(Date date)
date - the date
public static String getHourFr(Date date)
date - the date
public static Timestamp getCurrentDate()
public static String getCurrentDateString(String strPattern)
strPattern - Le format de la date courante
public static String getCurrentDateString()
public static Timestamp getDate(Timestamp date,
boolean isStartOfDayHour)
date - Date à transformerisStartOfDayHour - true si l'heure doit etre 00h01 FALSE si l'heure
doit etre 23H59
public static int getAnneeEnCours()
public static String converteDateAnglais(String dateAnglaise)
throws ParseException
dateAnglaise - date au format dd/MM/yyyy
ParseException - lancé si la date en entrée n'est pas valide.public static boolean verifierHeure(String sHeure)
sHeure - string heure
public static String getAnnee(Date date)
date - date
public static boolean validateDate(String date)
date - la date
public static boolean valideDateEntreLeEtLeOuLe(List<String> dateEffetRecherche,
boolean obligatoire)
dateEffetRecherche - the date effet rechercheobligatoire - si obligatoire est à true la méthode vérifiera
aussi
si au moins une valeur est saisie.
public static Timestamp getHour(String strHour)
strHour - Date à transformer
public static Date mergeDateHour(Date date,
Date hour)
date - datehour - hour to set to the date
public static Date getHourWithoutDate(Date hour)
hour - hour to set to the date
public static Timestamp getDateLastMinute(Date date)
date - the date who must convert
public static Timestamp getDateFirstMinute(Date date)
date - the date who must convert
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||