Class: Date

Date


new Date( [json])

A date.
Parameters:
Name Type Argument Description
json Object <optional>
See:

Extends

Methods


addField(field)

Add a field
Parameters:
Name Type Description
field Field
Inherited From:
Returns:
this
Type
ExtensibleData

Add a link
Parameters:
Name Type Description
link Link
Inherited From:
Returns:
this
Type
ExtensibleData

addNormalized(normalized)

Add a normalized value
Parameters:
Name Type Description
normalized TextValue
Returns:
this
Type
Date

getFields()

Get the fields
Inherited From:
Returns:
Type
Array.<Field>

getFormal()

Get the formal date value
Returns:
Type
String

getId()

Get the object's id.
Inherited From:
Returns:
Id
Type
String

Get a link
Parameters:
Name Type Description
rel String
Inherited From:
Returns:
Type
Link

Get the links
Inherited From:
Returns:
Type
Array.<Link>

getNormalized()

Get the normalized values
Returns:
Type
Array.<TextValue>

getOriginal()

Get the original date value
Returns:
original
Type
String

init(json)

Initialize from JSON
Parameters:
Name Type Description
json Object
Overrides:
Returns:
this
Type
Date

<static> isInstance(obj)

Check whether the given object is an instance of this class.
Parameters:
Name Type Description
obj Object
Returns:
Type
Boolean

setFields(fields)

Set the fields
Parameters:
Name Type Description
fields Array.<Field>
Inherited From:
Returns:
this
Type
ExtensibleData

setFormal(formal)

Set the formal date value
Parameters:
Name Type Description
formal String
Returns:
This instance.
Type
Date

setId(id)

Set the object's id.
Parameters:
Name Type Description
id String
Inherited From:
Returns:
This object, for chaining.
Type
ExtensibleData

Set the links
Parameters:
Name Type Description
links Links
Inherited From:
Returns:
this
Type
ExtensibleData

setNormalized(normalized)

Set the normalized values
Parameters:
Name Type Description
normalized Array.<TextValue>
Returns:
this
Type
Date

setOriginal(original)

Set the original date value
Parameters:
Name Type Description
original String
Returns:
This instance.
Type
Date

toJSON()

Export the object as JSON
Overrides:
Returns:
JSON object
Type
Object