Change date format to a unique format as discussed in #1

This commit is contained in:
bacardi55 2021-06-21 00:03:51 +02:00
parent 20195fe24e
commit 564aff963d

View File

@ -1,7 +1,7 @@
# RFC: TinyLogs format
Status: Draft
Last update: 2021-06-10
Last update: 2021-06-20
## Introduction
@ -32,52 +32,23 @@ It starts with a second level header (`##`), followed by a space and then `<date
`<Entry Title>` format: Any text without new line.
`<Date>` format: 3 possible formats for the date:
`<Date>` format: The format extend the date format of the [gemini feed standard](https://gemini.circumlunar.space/docs/companion/subscription.gmi) (YYYY-MM-DD):
```
YYYY-MM-DD h:m[:s] TZ
Weekday DD Month YYYY h:m[:s] TZ # format 1-24 for hours
Weekday DD Month YYYY h:m[:s] AM TZ # format 1-12 am/pm for hours
YYYY-MM-DD hh:mm TZ
```
`TZ` should either be:
* A [timezone abbreviations](https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations) like UTC, CEST, ET, BST, …
* A valid UTC offset (eg: +02:00 for CEST, -06:00 for ET, …).
**Nota**: Timezone abbreviations are not standards (eg BST is an abbreviations of 3 different timezone). For better comprehension for any tools, the UTC offset is usually better.
If the timezone is not precised, UTC should be assumed.
Entries should be in order from newest to oldest.
**YYYY-MM-DD h:m[:s] TZ**
Seconds are optional.
example:
```
2006-01-02 15:04:05 MST
2006-01-02 15:04 MST
```
**Weekday DD Month YYYY h:m[:s] TZ**
* Weekday should be in 3 letters format (eg: Mon for Monday).
* Month should be in 3 letters format (eg: Jan for January).
* Hours should be in 1-24 format.
* Seconds are optional.
example:
```
Mon 02 Jan 2006 15:04:05 MST
Mon 02 Jan 2006 15:04 MST
```
**Weekday DD Month YYYY h:m[:s] am TZ**
* Weekday should be in 3 letters format (eg: Mon for Monday).
* Month should be in 3 letters format (eg: Jan for January).
* Hours should be in 1-12 format.
* Seconds are optional.
example:
```
Mon 02 Jan 2006 03:04:05 PM MST
Mon 02 Jan 2006 03:04 PM MST
```
`<Content>` format: Any text without 2 new lines.
@ -85,10 +56,10 @@ Each entry must be separated with 2 new lines (ie paragraph break).
Example:
```
## Mon 07 Jun 2021 10:44:26 PM CEST
## 2021-06-20 20:40 +0200
A small thought to share.
## Sun 06 Jun 2021 11:44:26 AM CEST
## 2021-06-20 20:30 CEST
A first tinylog entry
```
@ -116,6 +87,7 @@ Example:
author: @bacardi55
author: @bacardi55@gmi.bacardi55.io
```
`<emoji>` format: emoji [emoji description]. The description is optional.
Example: