Class

WebListBoxDateTimeRenderer


Description

Used to display a DateTime value in WebListBox cell in the browser's time zone and locale.

Methods

Name

Parameters

Returns

Shared

Constructor

DateValue As DateTime

Constructor

DateValue As String, Locale As Locale = Nil, TimeZone As TimeZone = Nil

Enumerations

WebListBoxDateTimeRenderer.RelativeValueStyles

RelativeValueStyles

The options for showing the date or time in relative terms.

Enum

Description

None

Both the date and time will be displayed in absolute terms.

RelativeDate

The DateTime will be displayed in date-relative terms. For example, if the DateTime was yesterday at 5:40PM, the value would be displayed as "Yesterday at 5:40PM"

RelativeTime

The DateTime will be displayed in time-relative terms. For example, if the DateTime was 3 months ago at 5:40PM, the value would be displayed as "3 months ago". RelativeTime has no limit.

Property descriptions


WebListBoxDateTimeRenderer.DateFormat

DateFormat As DateTime.FormatStyles

The format in which the date portion of the Value property will be displayed.


WebListBoxDateTimeRenderer.RelativeValueStyle

RelativeValueStyle As RelativeValueStyles

Determines if the date and/or time will be display in relative terms.

Using this property you can automatically display the DateTime using relative terms when appropriate. For example, if the DateTime value was yesterday, the value will be displayed as "Yesterday" rather than as an actual date and a time that was 5 minutes ago would be displayed as "5 Minutes Ago".


WebListBoxDateTimeRenderer.TimeFormat

TimeFormat As DateTime.FormatStyles

The format in which the time portion of the Value property will be displayed.


WebListBoxDateTimeRenderer.Value

Value As DateTime

The DateTime value.

Method descriptions


WebListBoxDateTimeRenderer.Constructor

Constructor(DateValue As DateTime)

Note

Constructors are special methods called when you create an object with the New keyword and pass in the parameters above.

Creates an object from the value passed.


WebListBoxDateTimeRenderer.Constructor

Constructor(DateValue As String, Locale As Locale = Nil, TimeZone As TimeZone = Nil)

Note

Constructors are special methods called when you create an object with the New keyword and pass in the parameters above.

Creates a WebListBoxDateTimeRenderer from the values passed.

Notes

Assigning a DateTime value using this class will automatically convert the DateTime to the browser's time zone and locale-specific format.

Using the RelativeValueStyle property, you can automatically display the DateTime using relative terms when appropriate. For example, if the DateTime value was yesterday, the value will be displayed as "Yesterday" rather than as an actual date and a time that was 5 minutes ago would be displayed as "5 Minutes Ago".

Compatibility

Web projects on all supported operating systems.