Simple plugin for rendering time relative to a certain
Ruby
Pull request Compare This branch is 2 commits behind patrickarlt:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
README.markdown
jquery-relative.js
test.html

README.markdown

jQuery Time

Usage

<time datetime="" data-relativize="FORMAT"></time>

or

$('time').relative(options);

Options

{
  format: "String representing the origin "
  tick : how often to update the time 0 for no updates
}

Format Reference

Format is a string consisting of the following components...

%s : Seconds %ss : Seconds Padded %m : Minutes %mm : Minutes Padded %h : Hours %hh : Hours Padded %d : Days %dd : Days Padded

%SECONDS : Second(s) %MINUTES : Minute(s) %HOURS : Hour(s) %DAYS : Day(s)

or the string "human" for a human readable time