# DateTimePlugin

The plugin shows the current time and/or date.

If date and time are configured, first the time will be shown for half of the slot duration and after it the date.

It can be configured to show only the date or only the time as well.

Below the day of the week is shown, starting from the left with Monday.

## Date/Time Format

Configure the date and time format in the plugin configuration JSON file. The format itself is according to strftime(). For colorization text properties can be added.

- %b - Abbreviated month name (3 characters)
- %d - Day of the month, zero-padded (01-31)
- %m - Month as a decimal number (01-12)
- %H - Hour in 24h format (00-23)
- %I - Hour in 12h format (01-12)
- %M - Minute (00-59)
- %p - AM or PM designation
- %Y - Year

By default the local time (see timezone in the settings) is used. It can be overwritten by the plugin configuration.

## REST API

### Get configuration about what the plugin shows.

    GET {{ORIGIN}}/rest/api/v1/display/uid/<PLUGIN-UID>/dateTime

    GET {{ORIGIN}}/rest/api/v1/display/alias/<PLUGIN-ALIAS>/dateTime

### Set configuration about what the plugin shall show.

    POST {{ORIGIN}}/rest/api/v1/display/uid/<PLUGIN-UID>/dateTime?mode=<MODE>

    POST {{ORIGIN}}/rest/api/v1/display/alias/<PLUGIN-ALIAS>/dateTime?mode=<MODE>

- PLUGIN-UID: The plugin unique id.
- PLUGIN-ALIAS: The plugin alias name.
- MODE: Display mode
  - 0: Show date and time.
  - 1: Show only the date.
  - 2: Show only the time.

## Configuration

### Display

Plugin UID:
Display mode:
Time format:
Date format:
Time zone:
Color of actual day:
Color of other days: