Class ScheduleDateTimeUtil
- java.lang.Object
-
- com._1c.g5.v8.dt.schedule.model.util.ScheduleDateTimeUtil
-
public class ScheduleDateTimeUtil extends Object
Schedule model date and time utils
-
-
Field Summary
Fields Modifier and Type Field Description static String
DATE_PATTERN
The default date format pattern for schedulestatic String
DEFAULT_DATE
The default date string value for schedulestatic Date
DEFAULT_DATE_TIME
The default date time value for schedulestatic String
DEFAULT_TIME
The default time string value for schedulestatic String
TIME_PATTERN
The default time format pattern for schedule
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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
todayMidnight()
Today midnight day time
-
-
-
Field Detail
-
DEFAULT_DATE_TIME
public static final Date DEFAULT_DATE_TIME
The default date time value for schedule
-
DATE_PATTERN
public static final String DATE_PATTERN
The default date format pattern for schedule- See Also:
- Constant Field Values
-
TIME_PATTERN
public static final String TIME_PATTERN
The default time format pattern for schedule- See Also:
- Constant Field Values
-
DEFAULT_DATE
public static final String DEFAULT_DATE
The default date string value for schedule- See Also:
- Constant Field Values
-
DEFAULT_TIME
public static final String DEFAULT_TIME
The default time string value for schedule- See Also:
- Constant Field Values
-
-
Method Detail
-
dateToString
public static String dateToString(Date date)
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
public static Date dateFromString(String date) throws ParseException
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
public static String timeToString(Date time)
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
public static Date timeFromString(String time) throws ParseException
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
public static Date todayMidnight()
Today midnight day time- Returns:
- the instance of today midnight day time, never
null
-
-