Skip to main content

SkytimesUtils

Utilities for skytimes

Index

Constructors

constructor

Methods

publicstaticallEventDetails

publicstaticgetAllTimes

  • getAllTimes(eventTime: DateTime<boolean>, interval?: number): string
  • Get all occurrences of an event for the given date


    Parameters

    NameTypeDefaultDescription
    eventTimeDateTime<boolean>

    The DateTime for which to get all occurrences

    optionalintervalnumber

    The interval between the event occurrences

    Returns string

publicstaticgetEventDetails

  • Get the details about an event, their status, next occurrence, all occurrences for the day


    Parameters

    NameTypeDefaultDescription
    keyEventKey

    The event key

    Returns EventDetails

publicstaticgetEventStatus

  • getEventStatus(event: EventData, nextOccurrence: DateTime<boolean>): Times
  • Returns the event status of a given event


    Parameters

    NameTypeDefaultDescription
    eventEventData

    The event to get the status for

    nextOccurrenceDateTime<boolean>

    The next occurrence of the event relative to "now"

    Returns Times

    The event status (or null if there is no active duration)

publicstaticgetNextEventOccurrence

  • getNextEventOccurrence(eventName: EventKey): DateTime<boolean>
  • Get the next occurrence of the event relative to now


    Parameters

    NameTypeDefaultDescription
    eventNameEventKey

    The key of the event

    Returns DateTime<boolean>