Miso.Dataset.types. time

The time type is used for columns of dates & timestamps, this uses moment.js internally and returns moment objects.

Source

Methods

<static> coerce ( v, options )

Coerces the value to a time.

Parameters

  • v mixed required

    Value to be coerced

  • options Object optional
    Properties
    • format String required

      Time format. See Moment.js documentation.

Source

<static> compare ( d1, d2 )

Returns: Number

Compares two time type values

Parameters

  • d1 time required

    First value to be compared

  • d2 time required

    Second value to be compared

Returns

Type: Number
Source

<static> numeric ( value )

Returns: Number

Returns the numeric representation of a time which will be an epoch time.

Parameters

  • value mixed required

    Value to be coerced to numeric

Returns

Type: Number
Source

<static> test ( v )

Returns: Boolean

Tests whether the value is a time.

Parameters

  • v mixed required

    Value to be tested

Returns

Type: Boolean
Source