Class pvr.controller.value.utils.DateTimeUtil

Provides conversion and comparison methods for values of type "date", "time" and "datetime".
Defined in: <pvr\controller\value\utils\DateTimeUtil.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Method Summary

Method Attributes Method Name and Description
 
compareDate(value1, value2)
 
compareDateTime(value1, value2)
Compares two JavaScript Date values.
 
compareTime(value1, value2)
 
datetimeToDate(value, settings)
Converts a JavaScript Date value to a pvr.controller.value.types.DateOnly value as specified by the settings.
 
datetimeToDatetime(value, settings)
Converts a JavaScript Date value to a JavaScript Date value as specified by the settings.
 
datetimeToString(value, settings)
Converts a JavaScript Date value to a string value as specified by the settings.
 
datetimeToTime(value, settings)
Converts a JavaScript Date value to a pvr.controller.value.types.TimeOnly value as specified by the settings.
 
dateToDate(value, settings)
Converts a pvr.controller.value.types.DateOnly value to a pvr.controller.value.types.DateOnly value as specified by the settings.
 
dateToDatetime(value, settings)
Converts a pvr.controller.value.types.DateOnly value to a JavaScript Date value as specified by the settings.
 
dateToString(value, settings)
Converts a pvr.controller.value.types.DateOnly value to a string value as specified by the settings.
 
stringToDate(value, settings)
Converts a string value to a pvr.controller.value.types.DateOnly value as specified by the settings.
 
stringToDatetime(value, settings)
Converts a string value to a JavaScript Date value as specified by the settings.
 
stringToTime(value, settings)
Converts a string value to a pvr.controller.value.types.TimeOnly value as specified by the settings.
 
timeToDatetime(value, settings)
Converts a pvr.controller.value.types.TimeOnly value to a JavaScript Date value as specified by the settings.
 
timeToString(value, settings)
Converts a pvr.controller.value.types.TimeOnly value to a string value as specified by the settings.
 
timeToTime(value, settings)
Converts a pvr.controller.value.types.TimeOnly value to a pvr.controller.value.types.TimeOnly value as specified by the settings.

Constructor Detail

pvr.controller.value.utils.DateTimeUtil()

Method Detail

compareDate(value1, value2)

Compares two pvr.controller.value.types.DateOnly values.
Parameters:
value1
The first value.
value2
The second value.
Returns:
0 if value1 and value2 are equal, -1 if value1 is less than value2, or 1 if value1 is greater than value2.

compareDateTime(value1, value2)

Compares two JavaScript Date values.
Parameters:
value1
The first value.
value2
The second value.
Returns:
0 if value1 and value2 are equal, -1 if value1 is less than value2, or 1 if value1 is greater than value2.

compareTime(value1, value2)

Compares two pvr.controller.value.types.TimeOnly values.
Parameters:
value1
The first value.
value2
The second value.
Returns:
0 if value1 and value2 are equal, -1 if value1 is less than value2, or 1 if value1 is greater than value2.

datetimeToDate(value, settings)

Converts a JavaScript Date value to a pvr.controller.value.types.DateOnly value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

datetimeToDatetime(value, settings)

Converts a JavaScript Date value to a JavaScript Date value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

datetimeToString(value, settings)

Converts a JavaScript Date value to a string value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

datetimeToTime(value, settings)

Converts a JavaScript Date value to a pvr.controller.value.types.TimeOnly value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

dateToDate(value, settings)

Converts a pvr.controller.value.types.DateOnly value to a pvr.controller.value.types.DateOnly value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

dateToDatetime(value, settings)

Converts a pvr.controller.value.types.DateOnly value to a JavaScript Date value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

dateToString(value, settings)

Converts a pvr.controller.value.types.DateOnly value to a string value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

stringToDate(value, settings)

Converts a string value to a pvr.controller.value.types.DateOnly value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value or undefined if the conversion fails.

stringToDatetime(value, settings)

Converts a string value to a JavaScript Date value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value or undefined if the conversion fails.

stringToTime(value, settings)

Converts a string value to a pvr.controller.value.types.TimeOnly value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value or undefined if the conversion fails.

timeToDatetime(value, settings)

Converts a pvr.controller.value.types.TimeOnly value to a JavaScript Date value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

timeToString(value, settings)

Converts a pvr.controller.value.types.TimeOnly value to a string value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

timeToTime(value, settings)

Converts a pvr.controller.value.types.TimeOnly value to a pvr.controller.value.types.TimeOnly value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.