Skip to main content

date()

Last updated 10/09/2024

The
date()
is a function on the
Five
object that returns the current date in local time as a string.


info
When using the
date()
function on a table event the data type for the field must be Date.

Available

Client and Server

Function Signature
date(): string;

Return Value

A string representing the local current date, formatted as yyyy-mm-dd

Example Output

Output
console.log(five.date()); // output '2022-08-30'

Examples

date()