Class SfDate

A date object to keep Salesforce date literal

Constructors

Properties

toString: (() => string) = ...

Type declaration

    • (): string
    • Returns literal when converted to string

      Returns string

LAST_90_DAYS: SfDate = ...
LAST_FISCAL_QUARTER: SfDate = ...
LAST_FISCAL_YEAR: SfDate = ...
LAST_MONTH: SfDate = ...
LAST_N_DAYS: ((num) => SfDate) = ...

Type declaration

LAST_N_FISCAL_QUARTERS: ((num) => SfDate) = ...

Type declaration

LAST_N_FISCAL_YEARS: ((num) => SfDate) = ...

Type declaration

LAST_N_MONTHS: ((num) => SfDate) = ...

Type declaration

LAST_N_QUARTERS: ((num) => SfDate) = ...

Type declaration

LAST_N_WEEKS: ((num) => SfDate) = ...

Type declaration

LAST_N_YEARS: ((num) => SfDate) = ...

Type declaration

LAST_QUARTER: SfDate = ...
LAST_WEEK: SfDate = ...
LAST_YEAR: SfDate = ...
NEXT_90_DAYS: SfDate = ...
NEXT_FISCAL_QUARTER: SfDate = ...
NEXT_FISCAL_YEAR: SfDate = ...
NEXT_MONTH: SfDate = ...
NEXT_N_DAYS: ((num) => SfDate) = ...

Type declaration

NEXT_N_FISCAL_QUARTERS: ((num) => SfDate) = ...

Type declaration

NEXT_N_FISCAL_YEARS: ((num) => SfDate) = ...

Type declaration

NEXT_N_MONTHS: ((num) => SfDate) = ...

Type declaration

NEXT_N_QUARTERS: ((num) => SfDate) = ...

Type declaration

NEXT_N_WEEKS: ((num) => SfDate) = ...

Type declaration

NEXT_N_YEARS: ((num) => SfDate) = ...

Type declaration

NEXT_QUARTER: SfDate = ...
NEXT_WEEK: SfDate = ...
NEXT_YEAR: SfDate = ...
THIS_FISCAL_QUARTER: SfDate = ...
THIS_FISCAL_YEAR: SfDate = ...
THIS_MONTH: SfDate = ...
THIS_QUARTER: SfDate = ...
THIS_WEEK: SfDate = ...
THIS_YEAR: SfDate = ...
TODAY: SfDate = ...
TOMORROW: SfDate = ...
YESTERDAY: SfDate = ...

Methods

  • Returns literal when converted to string

    Returns string

  • Parse IS08601 date(time) formatted string and return date instance

    Parameters

    • str: string

    Returns Date

  • Parse IS08601 time formatted string and convert to parse string

    Parameters

    • str: string

    Returns Date

  • Convert JavaScript date object to ISO8601 Date format (e.g. 2012-10-31)

    Parameters

    • date: string | number | Date

      Input date

    Returns SfDate

    • Salesforce date literal with ISO8601 date format
  • Convert JavaScript date object to ISO8601 DateTime format (e.g. 2012-10-31T12:34:56Z)

    Parameters

    • date: string | number | Date

    Returns SfDate

  • Convert JavaScript date object to ISO8601 time format (e.g. 12:34:56.789Z)

    Parameters

    • time: string | number | Date

    Returns SfDate