LiveTimestamp

LiveTimestamp

Class representing an element that has contains an automatically updated timestamp with relative (dependent on the current date and time somehow) date and time.

Constructor

new LiveTimestamp(element, date, addTimezone)

Source:

Create a live timestamp.

Parameters:
Name Type Description
element Element

Element that has the timestamp.

date Date

Timestamp's date.

addTimezone boolean

Whether to add a timezone to the timestamp.

Methods

(static) initImproved()

Source:

For internal use. Initialize improved timestamps (when the timestamp format is set to "improved").

(static) reset()

Source:

Reset the list of live timestamps on the page (this is run at every page load).

(static) updateImproved()

Source:

For internal use. Update the timestamps (when the timestamp format is set to "improved").

init()

Source:

Initialize the timestamp (set the necessary timeouts for the timestamp to be updated when needed).

update()

Source:

For internal use. Update the timestamp.