fr.paris.lutece.plugins.ods.utils.commons
Class DateUtils

java.lang.Object
  extended by fr.paris.lutece.plugins.ods.utils.commons.DateUtils

public final class DateUtils
extends java.lang.Object

Classe utilitaire


Method Summary
static java.sql.Timestamp getCurrentDate()
          Retourne la date du jour
static java.lang.String getCurrentDateString(java.lang.String strPattern)
          renvoie la date courante
static java.sql.Timestamp getDate(java.lang.String strDate, boolean isStartOfDayHour)
          Transfome une date en format string de type dd/MM/yyyy en objet Timestamp
static java.sql.Timestamp getDate(java.sql.Timestamp date, boolean isStartOfDayHour)
          Renvoie un timestamp dont l'heure doit etre 00h01 FALSE si l'heure doit etre 23H59
static java.lang.String getDate(java.sql.Timestamp date, java.lang.String strPattern)
          Renvoie la date sous le format défini par strPattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDate

public static java.sql.Timestamp getDate(java.lang.String strDate,
                                         boolean isStartOfDayHour)
Transfome une date en format string de type dd/MM/yyyy en objet Timestamp

Parameters:
strDate - Date à transformer
isStartOfDayHour - TRUE si l'heure doit etre 00h01 FALSE si l'heure doit etre 23H59
Returns:
objet Timestamp correspondant à la date donné en paramètre

getDate

public static java.lang.String getDate(java.sql.Timestamp date,
                                       java.lang.String strPattern)
Renvoie la date sous le format défini par strPattern

Parameters:
date - la date
strPattern - le format souhaite de la date
Returns:
la date sous forme EEEE dd MMMM yyyy

getCurrentDate

public static java.sql.Timestamp getCurrentDate()
Retourne la date du jour

Returns:
la date du jour

getCurrentDateString

public static java.lang.String getCurrentDateString(java.lang.String strPattern)
renvoie la date courante

Returns:
la date courante

getDate

public static java.sql.Timestamp getDate(java.sql.Timestamp date,
                                         boolean isStartOfDayHour)
Renvoie un timestamp dont l'heure doit etre 00h01 FALSE si l'heure doit etre 23H59

Parameters:
DATE - Date à transformer
isStartOfDayHour - TRUE si l'heure doit etre 00h01 FALSE si l'heure doit etre 23H59
Returns:
objet Timestamp correspondant à la date donné en paramètre


Copyright © 2010 Mairie de Paris. All Rights Reserved.