Expand description
The current time.
§Configuration
| Key | Values | Default |
|---|---|---|
format | Format string. See chrono docs for all options. | " $icon $timestamp.datetime() " |
interval | Update interval in seconds | 10 |
timezone | A timezone specifier (e.g. “Europe/Lisbon”) | Local timezone |
| Placeholder | Value | Type | Unit |
|---|---|---|---|
icon | A static icon | Icon | - |
timestamp | The current time | Datetime | - |
| Action | Default button |
|---|---|
next_timezone | Left |
prev_timezone | Right |
§Example
[[block]]
block = "time"
interval = 60
[block.format]
full = " $icon $timestamp.datetime(f:'%a %Y-%m-%d %R %Z', l:fr_BE) "
short = " $icon $timestamp.datetime(f:%R) "§Non Gregorian calendars
You can use calendars other than the Gregorian calendar by adding the calendar specifier in the locale string. When using
this feature you can’t use chrono style format string, and you should use one of the options provided by
the icu4x crate: short, medium, long, full.
If you set precision to hours/hour/h, minutes/minute/m, or seconds/second/s then then the datetime will be formatted accordingly, otherwise only the date will be displayed.
** Only available using feature icu_calendar. **
§Example
[[block]]
block = "time"
interval = 60
format = "$timestamp.datetime(locale:'fa_IR-u-ca-persian', f:'full', precision: minutes)"§Icons Used
time