Skip to main content
Version: Java (Groovy)

today

Provides the current date string according to the current clock. If no time zone is provided, the default time zone will be used.

Syntax

today()
today(timeZone)

Parameters

ParameterTypeDescription
timeZoneZoneId

The time zone.

Returns

The current date string.

Examples

println today()
println today(timeZone("UTC"))