Class ScheduleDateTimeUtil
java.lang.Object
com._1c.g5.v8.dt.schedule.model.util.ScheduleDateTimeUtil
Schedule model date and time utils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default date format pattern for schedulestatic final StringThe default date string value for schedulestatic final DateThe default date time value for schedulestatic final StringThe default time string value for schedulestatic final StringThe default time format pattern for schedule -
Method Summary
Modifier and TypeMethodDescriptionstatic DatedateFromString(String date) Convert specifed text toDatestatic StringdateToString(Date date) Convert specifedDateto textstatic DatetimeFromString(String time) Convert specifed text to timestatic StringtimeToString(Date time) Convert specifed time to textstatic DateToday midnight day time
-
Field Details
-
DEFAULT_DATE_TIME
The default date time value for schedule -
DATE_PATTERN
The default date format pattern for schedule- See Also:
-
TIME_PATTERN
The default time format pattern for schedule- See Also:
-
DEFAULT_DATE
The default date string value for schedule- See Also:
-
DEFAULT_TIME
The default time string value for schedule- See Also:
-
-
Method Details
-
dateToString
Convert specifedDateto text- Parameters:
date- the specifedDateto convert, can benull- Returns:
- converted date text, or default date value if given date is
null
-
dateFromString
Convert specifed text toDate- Parameters:
date- the specifedStringto convert, can benull- Returns:
- converted date, or default date value if given text is
null - Throws:
ParseException- if the beginning of the specified string cannot be parsed.
-
timeToString
Convert specifed time to text- Parameters:
time- the specifed time to convert, can benull- Returns:
- converted time text, or default time value if given time is
null
-
timeFromString
Convert specifed text to time- Parameters:
time- the specifedStringto convert, can benull- Returns:
- converted time, or default time value if given text is
null - Throws:
ParseException- if the beginning of the specified string cannot be parsed.
-
todayMidnight
Today midnight day time- Returns:
- the instance of today midnight day time, never
null
-