Class: PartPeriod

Defined in: partperiod.coffee

Overview

Period of moments with placeholders. That is useful for compareing repeating period. Currently, PartPeriod objects are not support timezones.

Property Summary

(PartTime) begin
(PartTime) end

Class Method Summary

Instance Method Summary

Class Method Details

. (Hash) parse(periodString)

Note: This is not instance method but static method.

get partperiod data from partperiod string

Parameters:

  • periodString ( String ) String value representing a partperiod. The string should be in a format "begin/end" (begin and end should be in a format recognized by the PartTime.parse() method (yyyy-mm-ddT00:00:00.000)).

Returns:

  • ( Hash ) — Hash data representing partperiod.

Constructor Details

# (void) constructor(periodString)

make a partperiod

Examples:

Construct

new PartPeriod()
new PartPeriod('*-10-12/*-*-*')
new PartPeriod('1970-1-1/1990-1-1')

Parameters:

  • periodString ( String ) String value representing a partperiod. The string should be in a format recognized by the PartPeriod.parse() method ("begin/end").

Instance Method Details

# (Boolean) includes(date)

is date in the period?

Parameters:

  • date ( DateLike ) Date or DateLike (has getFullYear, getMonth, ... getMilliseconds)

Returns:

  • ( Boolean ) — returns true if date is in the period else false

# (String) toString()

Returns:

  • ( String ) — yyyy-mm-ddT00:00:00.000/yyyy-mm-ddT00:00:00.000.

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: