lisongx / wikidata-elements

Custom HTML elements to reuse Wikidata
https://wikidata-elements.js.org
MIT License
14 stars 2 forks source link

Inject datetime values as <time> element #2

Open nichtich opened 5 years ago

nichtich commented 5 years ago
<wd-entity id="Q42" property="P569" />

should result in

<time datetime="1952-03-11">1952-03-11</time>

so it can better be reused for instance with https://timeago.yarp.com/ to customize how date values are rendered. The precision of a datetime value also needs to be taken into account.