File

src/api/webApi/data/temporalRange.interface.ts

Index

Methods

Methods

getLowerBound
getLowerBound()
Returns : null | Moment
getUpperBound
getUpperBound()
Returns : null | Moment
hasLowerBound
hasLowerBound()
Returns : boolean
hasUpperBound
hasUpperBound()
Returns : boolean
intersects
intersects(temporalRange: TemporalRange, granularity?: unitOfTime.StartOf)

Does this temporal range intersect with the specified one.

Parameters :
Name Type Optional
temporalRange TemporalRange No
granularity unitOfTime.StartOf Yes
Returns : boolean
isUnbounded
isUnbounded()
Returns : boolean
toFormattedString
toFormattedString(format: null | string)
Parameters :
Name Type Optional
format null | string No
Returns : string
toFormattedStringExtra
toFormattedStringExtra(config: literal type)
Parameters :
Name Type Optional
config literal type No
Returns : string
import { Moment, unitOfTime } from 'moment';

export interface TemporalRange {

  isUnbounded(): boolean;
  hasUpperBound(): boolean;
  hasLowerBound(): boolean;

  getLowerBound(): null | Moment;
  getUpperBound(): null | Moment;

  /**
   * Does this temporal range intersect with the specified one.
   * @param temporalRange
   * @param precision the level of granularity  e.g.  year month week isoWeek day hour minute second
   */
  intersects(temporalRange: TemporalRange, granularity?: unitOfTime.StartOf): boolean;

  toFormattedString(format: null | string): string;
  toFormattedStringExtra(config: { format: null | string; separator: null | string; undefinedStr: null | string }): string;
}

results matching ""

    No results matching ""