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 String
The default date format pattern for schedulestatic final String
The default date string value for schedulestatic final Date
The default date time value for schedulestatic final String
The default time string value for schedulestatic final String
The default time format pattern for schedule -
Method Summary
Modifier and TypeMethodDescriptionstatic Date
dateFromString
(String date) Convert specifed text toDate
static String
dateToString
(Date date) Convert specifedDate
to textstatic Date
timeFromString
(String time) Convert specifed text to timestatic String
timeToString
(Date time) Convert specifed time to textstatic Date
Today 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 specifedDate
to text- Parameters:
date
- the specifedDate
to convert, can benull
- Returns:
- converted date text, or default date value if given date is
null
-
dateFromString
Convert specifed text toDate
- Parameters:
date
- the specifedString
to 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 specifedString
to 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
-