Skip to main content

date()

Last updated 18/07/2023

The date() is a function on the five object which is used to return the current date in local time as a string.


info

When using the date() 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()