Skip to content

Use datetime for time element#134

Merged
Phlow merged 2 commits into
gh-pagesfrom
unknown repository
Mar 8, 2017
Merged

Use datetime for time element#134
Phlow merged 2 commits into
gh-pagesfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Feb 28, 2017

Copy link
Copy Markdown

Currently metadata items are outputting a time element with a datetime attribute which is ISO 8601 compliant, but does not include information about time of day and timezone offset. This updates the output so it outputs all available information.

Before:

<time  class="icon-calendar pr20" datetime="2016-12-03" itemprop="datePublished">2016-12-03</time>

After

<time class="icon-calendar pr20" datetime="2016-12-03T08:00:00+08:00" itemprop="datePublished"> 2016-12-03</time>

References:
http://devdocs.io/html/element/time for general info
https://www.w3.org/TR/html51/infrastructure.html#dates-and-times for spec
http://jekyll.tips/jekyll-cheat-sheet/ for liquid filter info

Currently metadata items are outputting a `time` element with a `datetime` attribute which is ISO 8601 compliant, but does not include information about time of day and timezone offset. This updates the output so it outputs all available information.

Before:

```html
<time  class="icon-calendar pr20" datetime="2016-12-03" itemprop="datePublished">2016-12-03</time>
```

After

```html
<time class="icon-calendar pr20" datetime="2016-12-03T08:00:00+08:00" itemprop="datePublished"> 2016-12-03</time>
```

References:
http://devdocs.io/html/element/time for general info
https://www.w3.org/TR/html51/infrastructure.html#dates-and-times for information about 
http://jekyll.tips/jekyll-cheat-sheet/ for liquid filter info

@TWiStErRob TWiStErRob left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are all your PRs conflicting?

@ghost

ghost commented Mar 1, 2017

Copy link
Copy Markdown
Author

Why are all your PRs conflicting?

They were created using the in-browser editor and it decided to pull commits from my fork.

@Phlow Phlow merged commit 3780da9 into Phlow:gh-pages Mar 8, 2017
@ghost ghost deleted the patch-1 branch March 9, 2017 11:37
rollingrock pushed a commit to rollingrock/joelucky that referenced this pull request Aug 31, 2025
Use datetime for time element
benchoi93 pushed a commit to choi-seongjin/choi-seongjin.github.io that referenced this pull request Jun 7, 2026
Use datetime for time element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants