Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "formatting"

Index

Functions

Const dateTime

  • dateTime(dateTime: string, format: string, flowKey: string): string
  • Format a datetime and return it as a string

    DateTime to format

    Parameters

    • dateTime: string
    • format: string

      MomentJS format string

    • flowKey: string

    Returns string

Const format

  • format(value: string | number, format: string, contentType: string, flowKey: string): string | number
  • Format a value using the defined format string. Currently supports datetimes and numbers only.

    Format string to apply to the value

    Parameters

    • value: string | number

      The value to format

    • format: string
    • contentType: string

      Type of the value as defined in the metadata e.g. ContentString

    • flowKey: string

    Returns string | number

Const initialize

  • initialize(flowKey: any): void
  • Set the initial culture to be used when formatting from the window.navigator.language or override by the i18n.culture setting

    Parameters

    • flowKey: any

    Returns void

Const number

  • number(value: number | string, format: string, flowKey: string): string
  • Format a number and return it as a string

    Parameters

    • value: number | string

      Number to format

    • format: string

      Format string, supported formats include e, E (scientifix); c, C (currency); and symbols as documented here: http://numbrojs.com/format.html

    • flowKey: string

    Returns string

Const toMomentFormat

  • toMomentFormat(format: string): string
  • Converts a .NET datetime format string into a MomentJS format string

    Parameters

    • format: string

      Format string to convert

    Returns string

Generated using TypeDoc