Browse files

Updated Readme with <time> element support details

  • Loading branch information...
1 parent 5934739 commit be4552b9ea2532c0cd10f4f22d06c4a390981978 @rmm5t committed May 8, 2012
Showing with 11 additions and 4 deletions.
  1. +11 −4 README.markdown
View
15 README.markdown
@@ -23,23 +23,30 @@ Now, let's attach it to your timestamps on DOM ready - put this in the head sect
</script>
```
-This will turn all abbr elements with a class of timeago and an ISO 8601 timestamp in the title:
+This will turn all abbr elements with a class of timeago and an ISO 8601
+timestamp in the title (conforming to the
+[datetime design pattern microformat](http://microformats.org/wiki/datetime-design-pattern)):
```html
-<abbr class="timeago" title="2008-07-17T09:24:17Z">July 17, 2008</abbr>
+<abbr class="timeago" title="2011-12-17T09:24:17Z">December 17, 2011</abbr>
```
into something like this:
```html
-<abbr class="timeago" title="July 17, 2008">about 1 day ago</abbr>
+<abbr class="timeago" title="Decebmer 17, 2011">about 1 day ago</abbr>
+```
+
+HTML5 `<time>` elements are also supported:
+
+```html
+<time class="timeago" datetime="2011-12-17T09:24:17Z">December 17, 2011</time>
```
As time passes, the timestamps will automatically update.
**For more usage and examples**: [http://timeago.yarp.com/](http://timeago.yarp.com/)
-
**For different language configurations**: visit the [`locales`](https://github.com/rmm5t/jquery-timeago/tree/master/locales) directory.
## Author

0 comments on commit be4552b

Please sign in to comment.