| Summary | Displays the current date/time in a customizable format |
|---|---|
| Tag names | date |
| Configuration prefix | tag.date |
| Used options |
tag.date.format tag.date.mi |
| Provided by bundle | built-in |
| API doc | Webgen::Tag::Date |
Description
The date tag is used to display the current time in a specific format (the format of Ruby’s inbuilt method Time#strftime). Have a look a the examples below to see some possible outputs.
Examples
{date:}- 2021-03-07 23:05:47
{date: {format: '%A, %Y-%m-%d'}}- Sunday, 2021-03-07
{date: {format: '%x - %X'}}- 03/07/21 - 23:05:47
{date: {format: '%x - %X', mi: modified_at}}- 03/25/14 - 19:03:43