Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Util

A utility class for random stuff.

Hierarchy

  • Util

Index

Methods

Static isDateObject

  • isDateObject(date: any): any
  • Whether or not the passed object is already a date. (Either a [[Moment]] object, or a JavaScript [[Date]] object.)

    Parameters

    • date: any

    Returns any

Static toDateString

  • toDateString(date: Date | Moment | number): string
  • Create a date string from any form of date (JavaScript [[Date]], [[Moment]], or epoch). Dates in OpenNMS.js will always be converted internally to UTC before stringifying to avoid time zone issues.

    Parameters

    • date: Date | Moment | number

    Returns string

Static toIPAddress

  • toIPAddress(addr?: string): any
  • Convert an IP address string to an [[Address4]] or [[Address6]] object.

    Parameters

    • Optional addr: string

    Returns any

Static toMoment

  • toMoment(date: Date | Moment | string | number): Moment
  • Create a [[Moment]] from any form of date (JavaScript [[Date]], [[Moment]], or epoch). [[Moment]] dates in OpenNMS.js will always be converted internally to UTC to avoid time zone issues.

    Parameters

    • date: Date | Moment | string | number

    Returns Moment

Generated using TypeDoc