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 theIPeriodstops.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 theIPeriodstarts.voidsetDateFormat(DateFormat dateFormat)Deprecated.since 1.1\nIn the future versions, the date format will be red from user preferencesvoidsetEndDate(Date endDate)voidsetStartDate(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:
getIntervalStringin interfaceIPeriod- Returns:
- the
IPeriodString representation - See Also:
getDateFormat(),IPeriod.getIntervalString()
-
getStartDate
Description copied from interface:IPeriodThe date when theIPeriodstarts.- Specified by:
getStartDatein interfaceIPeriod- Returns:
- the startDate
-
setStartDate
- Specified by:
setStartDatein interfaceIPeriod- Parameters:
startDate- the startDate to set- See Also:
IPeriod.getStartDate()
-
getEndDate
Description copied from interface:IPeriodThe date when theIPeriodstops.- Specified by:
getEndDatein interfaceIPeriod- Returns:
- the endDate
-
setEndDate
- Specified by:
setEndDatein 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()
-