Package be.gaudry.model.date
Class DefaultPeriod
java.lang.Object
be.gaudry.model.date.DefaultPeriod
- All Implemented Interfaces:
IPeriod
Basic implementation of a
period
.
Provided by the broldev.core.model project.- Since:
- 1.1 Mar 02, 2009, broldev.core.model 0.0.1-SNAPSHOT dependency
- Version:
- 1.0 Jan 30, 2009
- Author:
- Steph GAUDRY
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBuilds a default period with a start date and an end date set to now.DefaultPeriod(Date startDate, Date endDate)
Builds a period with a start date and an end date -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.since 1.1\nIn the future versions, the date format will be red from user preferencesThe date when theIPeriod
stops.Localized String representation of the DefaultPeriod like this:
from ? to MM/dd/YY from MM/dd/YY to MM/dd/YY du dd/MM/YY au dd/MM/YY du dd/MM/YY au ? \nTODO internationalize thisThe date when theIPeriod
starts.void
setDateFormat(DateFormat dateFormat)
Deprecated.since 1.1\nIn the future versions, the date format will be red from user preferencesvoid
setEndDate(Date endDate)
void
setStartDate(Date startDate)
-
Field Details
-
startDate
-
endDate
-
dateFormat
-
-
Constructor Details
-
DefaultPeriod
public DefaultPeriod()Builds a default period with a start date and an end date set to now. -
DefaultPeriod
Builds a period with a start date and an end date- Parameters:
startDate
-endDate
-
-
-
Method Details
-
getIntervalString
Localized String representation of the DefaultPeriod like this:- from ? to MM/dd/YY
- from MM/dd/YY to MM/dd/YY
- du dd/MM/YY au dd/MM/YY
- du dd/MM/YY au ?
- Specified by:
getIntervalString
in interfaceIPeriod
- Returns:
- the
IPeriod
String representation - See Also:
getDateFormat()
,IPeriod.getIntervalString()
-
getStartDate
Description copied from interface:IPeriod
The date when theIPeriod
starts.- Specified by:
getStartDate
in interfaceIPeriod
- Returns:
- the startDate
-
setStartDate
- Specified by:
setStartDate
in interfaceIPeriod
- Parameters:
startDate
- the startDate to set- See Also:
IPeriod.getStartDate()
-
getEndDate
Description copied from interface:IPeriod
The date when theIPeriod
stops.- Specified by:
getEndDate
in interfaceIPeriod
- Returns:
- the endDate
-
setEndDate
- Specified by:
setEndDate
in interfaceIPeriod
- Parameters:
endDate
- the endDate to set- See Also:
IPeriod.getEndDate()
-
getDateFormat
Deprecated.since 1.1\nIn the future versions, the date format will be red from user preferencesGets the date format to use to display the start date and the end date.- Returns:
- the dateFormat
-
setDateFormat
Deprecated.since 1.1\nIn the future versions, the date format will be red from user preferences- Parameters:
dateFormat
- the dateFormat to set- See Also:
getDateFormat()
-