feat(app/utils, plugins): normalize dates with improved format (#573)
This commit is contained in:
@@ -14,7 +14,7 @@ See [rendering of this file here](https://github.com/lowlighter/lowlighter/blob/
|
||||
* Same formatting helpers available in templates can be used too
|
||||
|
||||
```markdown
|
||||
I joined GitHub on `{{ f.date(REGISTRATION_DATE, {dateStyle:"short"}) }}`.
|
||||
I joined GitHub on `{{ f.date(REGISTRATION_DATE, {date:true}) }}`.
|
||||
I contributed to `{{ REPOSITORIES_CONTRIBUTED_TO }}` repositories and made `{{ COMMITS }}` commits.
|
||||
```
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
* 🚮 Deleted <%= event.ref.type %> `<%= event.ref.name %>` from [<%= repo %>](https://github.com/<%= repo %>)
|
||||
<%_ } _%>
|
||||
<%_ if (plugins.activity.timestamps) { _%>
|
||||
* *On <%= f.date(timestamp, {timeStyle:"short", dateStyle:"short", timeZone:config.timezone?.name}) %>*
|
||||
* *On <%= f.date(timestamp, {time:true, date:true, timeZone:config.timezone?.name}) %>*
|
||||
<%_ } _%>
|
||||
<%_ } _%>
|
||||
<%_ } else { _%>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<td>
|
||||
<%= description %>
|
||||
<br>
|
||||
<i>Published on <%= f.date(new Date(date), {dateStyle:"short", timeZone:config.timezone?.name}) %></i>
|
||||
<i>Published on <%= f.date(new Date(date), {date:true, timeZone:config.timezone?.name}) %></i>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -27,7 +27,7 @@
|
||||
<%_ } else if (plugins.posts.list.length) { _%>
|
||||
<%_ for (const {title, date, link} of plugins.posts.list) { _%>
|
||||
* [<%= title.trim() %>](<%= link %>)
|
||||
* *Published on <%= f.date(new Date(date), {dateStyle:"short", timeZone:config.timezone?.name}) %>*
|
||||
* *Published on <%= f.date(new Date(date), {date:true, timeZone:config.timezone?.name}) %>*
|
||||
<%_ } _%>
|
||||
<%_ } else { _%>
|
||||
No recent posts
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<%_ } else if (plugins.rss.feed.length) { _%>
|
||||
<%_ for (const {title, link, date} of plugins.rss.feed) { _%>
|
||||
* [<%= title %>](<%= link %>)
|
||||
* *Published on <%= f.date(new Date(date), {dateStyle:"short"}) %>*
|
||||
* *Published on <%= f.date(new Date(date), {date:true}) %>*
|
||||
<%_ } _%>
|
||||
<%_ } else { _%>
|
||||
Empty RSS feed
|
||||
|
||||
Reference in New Issue
Block a user