Class UIDateRendererProvider
java.lang.Object
com.hybris.backoffice.renderer.utils.UIDateRendererProvider
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFormattedDateLabel(Date now, Date referenceDate) protected StringgetI18NLabelKey(Date now, Date referenceDate) protected Stringprotected StringgetLabel(String labelKey, DateFormat timeFormat, DateFormat dateFormat, Date referenceDate)
-
Field Details
-
LABEL_LATERDATE
- See Also:
-
LABEL_TODAY
- See Also:
-
LABEL_UNKNOWN
- See Also:
-
LABEL_YESTERDAY
- See Also:
-
-
Constructor Details
-
UIDateRendererProvider
public UIDateRendererProvider()
-
-
Method Details
-
getFormattedDateLabel
- Parameters:
now-referenceDate-- Returns:
- formatted value for Label. If
referenceDateis today in reference tonow, then the returned value is "Today - {time}", when is yesterday then returned value is "Yesterday - {time}", otherwise is {date} - {time}. "Today" and "Yesterday" labels can be localized. If one of the inputs is null then "Unknown" is returned.
-
getI18NLabelKey
-
getLabel
protected String getLabel(String labelKey, DateFormat timeFormat, DateFormat dateFormat, Date referenceDate) -
getLabel
-
getFormatTimeZone
- Returns:
- get preferred timezone of current session. If current session is null, then null is returned.
-