Enum Class DateTimeMode
- All Implemented Interfaces:
Serializable
,Comparable<DateTimeMode>
,Constable
Switch for setting the date mode of a form.
- Since:
- 4.2.200
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionadjustDate
(Date date) Adjust the date according to the date time mode.abstract long
adjustTime
(long milliseconds) Adjust a time to its mode-dependent time representation.abstract DateFormat
getDefaultFormat
(Locale locale) Get the default, mode-dependent format for the given locale.boolean
Indicates that only numerical persistency works for this mode.abstract long
toApplicationTime
(long milliseconds) Convert the given time to mode-dependent application time.abstract long
toPersistencyTime
(long milliseconds) Convert the given time to mode-dependent persistency time.static DateTimeMode
Returns the enum constant of this class with the specified name.static DateTimeMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DATETIME
Use both date and time- Since:
- 4.2.200
-
DATE
Use date only- Since:
- 4.2.200
-
TIME
Use time only- Since:
- 4.2.200
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
toApplicationTime
public abstract long toApplicationTime(long milliseconds) Convert the given time to mode-dependent application time.- Parameters:
milliseconds
- The time to be converted.- Returns:
- The mode-dependent time.
- Since:
- 4.2.203
-
toPersistencyTime
public abstract long toPersistencyTime(long milliseconds) Convert the given time to mode-dependent persistency time.- Parameters:
milliseconds
- The time to be converted.- Returns:
- The mode-dependent time.
- Since:
- 4.2.203
-
adjustTime
public abstract long adjustTime(long milliseconds) Adjust a time to its mode-dependent time representation.- Parameters:
milliseconds
- The time to be converted.- Returns:
- The mode-dependent time.
- Since:
- 4.2.203
-
getDefaultFormat
Get the default, mode-dependent format for the given locale.- Parameters:
locale
- The locale to get the format for.- Returns:
- The default format.
- Since:
- 4.2.200
-
adjustDate
Adjust the date according to the date time mode.- Parameters:
date
- The date to be adjusted.- Returns:
- A new date instance from the adjusted time.
- Since:
- 4.2.205
-
isTimezoneIndependent
public boolean isTimezoneIndependent()Indicates that only numerical persistency works for this mode.- Returns:
true
, iff only numercial persistency is allowed.- Since:
- 4.2.205
-