README.md in local_time-0.1.0 vs README.md in local_time-0.2.0

- old
+ new

@@ -2,25 +2,23 @@ --- ####Example -Assuming the time zone is EST and `Time.now` is `2013-11-27 18:43:22 -0500`: - ```erb -<%= local_time(Time.now) # index.html.erb %> +<%= local_time(comment.created_at) # comment.created_at => Wed, 27 Nov 2013 18:43:22 EST -0500 %> ``` -Renders in UTC time: +Renders: ```html <time data-format="%B %e, %Y %l:%M%P" data-local="time" datetime="2013-11-27T23:43:22Z">November 27, 2013 11:43pm</time> ``` -Then immediately converts to local time and strftime formats with JavaScript: +When the DOM loads, the content is immediately replaced with a local, formatted time: ```html <time data-format="%B %e, %Y %l:%M%P" data-local="time" datetime="2013-11-27T23:43:22Z" @@ -64,9 +62,14 @@ #### JavaScript events and library compatibility The included JavaScript does not depend on any frameworks or libraries, and listens for a `DOMContentLoaded` event to run initially. It also listens on `document` for `page:update` if you're using Turbolinks and `ajaxSuccess` if you're using jQuery. This should catch most cases where new `<time>` elements have been added to the DOM and process them automatically. If you're adding new elements in another context, trigger `time:elapse` to process them. #### Version History + +**0.2.0** (December 10, 2013) + +* Prefer `textContent` over `innerText` for Firefox compatibility +* Added `options` argument to `local_time_ago` helper **0.1.0** (November 29, 2013) * Initial release.