You normally will change the date with the metadata manager, this article is informational.
About
This page describes the date string formats supported by ComboStrap.
Syntax
Reading
Combostrap understands all the following string format as date:
YYYY-MM-DDTHH:MM:SS+hh:mm // iso 8601 format
YYYY-MM-DD HH:MM:SS+hh:mm // timestamp format
YYYY-MM-DD HH:MM:SS
YYYY-MM-DD HH:MM
YYYY-MM-DD HH
YYYY-MM-DD
where:
- YYY-MM-DD is the day part and is the only one mandatory. For instance for the first January of 2021: 2021-01-01
- T is a separator used in ISO8601 format between the day and time part (optional, handy when copying)
- HH:MM:SS is the time part. For instance, for 2 hour pm, 15 minutes and 20 seconds: 14:15:20
- +hh:mm is a positive or negative time offsets from the UTC timezone (ie London). For instance, Europe/Paris (one hour timezone from London) +01:00
You can use any of this format in a pipeline to format a literal date
Example:
${"2022-05-23" | format()}
Monday, May 23, 2022
Writing
When combostrap stores a date, it writes it in the below iso 8601 format.
YYYY-MM-DDTHH:MM:SS+hh:mm
All date (created, modified, published, start/end date) are written/stored in this format as string.
You will find them back in this format:
- in the frontmatter
- and in the database
Time
- at the day level, the default time is midnight, ie 2021-03-15 00:00:00+00:00
{
"date_published":"2021-03-15"
}
- at the hour level (10 hour), the default minute and second are null. ie 2021-03-15 10:00:00
{
"date_published":"2021-03-15 10"
}
Timezone
The dates are all located in the timezone of your server
For instance, a date with the Europe/Paris timezone.
{
"date_published":"2021-03-15 10:00:00+01:00"
}