com.stratelia.webactiv.almanach.control
Class DateDTO

java.lang.Object
  extended by com.stratelia.webactiv.almanach.control.DateDTO

public class DateDTO
extends Object

A DTO on a date in the alamanch. The date is made up of the day in year and optionally of the time in the day. It is a way to carry the information pertinence about the date to render in an almanach.


Constructor Summary
DateDTO(String dayInYear, String timeInDay)
          Constructs a new DateDTO from the specified day in year and time in day.
 
Method Summary
 Date getDate()
          Gets the date as a Date instance.
 String getDayInYear()
          Gets the day in year of this date.
 String getISO8601Date()
          Gets the date in one of the ISO 8601 pattern: yyyy-MM-ddTHH:mm or yyyy-MM-dd if the time in day isn't set.
 String getTimeInDay()
          Gets the time in day of this date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateDTO

public DateDTO(String dayInYear,
               String timeInDay)
Constructs a new DateDTO from the specified day in year and time in day.

Parameters:
dayInYear - the day in year in the ISO 8601 pattern: yyyy-MM-dd.
timeInDay - the time in day in the following ISO 8601 pattern HH:mm.
Method Detail

getDayInYear

public String getDayInYear()
Gets the day in year of this date.

Returns:
the day in year.

getTimeInDay

public String getTimeInDay()
Gets the time in day of this date.

Returns:
the time in day.

getISO8601Date

public String getISO8601Date()
Gets the date in one of the ISO 8601 pattern: yyyy-MM-ddTHH:mm or yyyy-MM-dd if the time in day isn't set.

Returns:
the date in one of the ISO 8601 pattern.

getDate

public Date getDate()
Gets the date as a Date instance.

Returns:
the date carrying by this DTO.


Copyright © 2016 Silverpeas. All Rights Reserved.