Display or set the date and time.
Synopsis
date [OPTION]... [+FORMAT]
Description
Display the current date and time. Runs in the just-bash WASM shell inside SLICC.
Options
-u, --utc Print or set Coordinated Universal Time (UTC).
-d, --date=STRING Display time described by STRING.
+FORMAT Output format string.
Format Specifiers
%Y Year (e.g. 2024).
%m Month (01-12).
%d Day of month (01-31).
%H Hour (00-23).
%M Minute (00-59).
%S Second (00-60).
%s Seconds since epoch.
%A Full weekday name.
%B Full month name.
Examples
$ date
Display current date and time.
$ date +"%Y-%m-%d"
Display date in ISO format.
$ date -u
Display UTC time.
Notes
Uses the browser's Date object. Setting the system date is not supported.
See Also
sleep, uptime