A2uiFormatDateFunction


class A2uiFormatDateFunction : A2uiFunction


Formats a timestamp into a date string.

Use this A2uiFunction to format date values with a pattern.

Summary

Public companion properties

A2uiFormatDateFunction

Public constructors

Public functions

open Any?
execute(args: Map<StringAny>, executionContext: A2uiExecutionContext)

Formats the given timestamp or ISO date string using the pattern in args.

Public properties

open A2uiFunctionDefinition

The definition of the function.

Public companion properties

Public constructors

A2uiFormatDateFunction

Added in 1.0.0-alpha01
A2uiFormatDateFunction(
    localeProvider: A2uiLocaleProvider = A2uiLocaleProvider.Default
)

Public functions

execute

open fun execute(args: Map<StringAny>, executionContext: A2uiExecutionContext): Any?

Formats the given timestamp or ISO date string using the pattern in args.

Parameters
args: Map<StringAny>

arguments containing "value" (date string or numeric timestamp) and "format" (pattern string)

executionContext: A2uiExecutionContext

context allowing to execute other functions, evaluate dynamic payloads and resolving data bindings

Returns
Any?

the formatted date string, or null if required values are missing

Public properties

definition

open val definitionA2uiFunctionDefinition

The definition of the function.