Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
src
 
 
 
 
 
 

README.md

Time

Plugin to allow you to display the time since an event. PHP formats the dates on the backend, then jQuery updates the times within the browser.

PHP Usage

<?php
    include('src/jquery.time.php');
    
    //create a time variable, then send it to the function
    $time=strtotime("-3 weeks");
    echo "<p>".jquery_time($time)."</p>";

?>

jQuery Usage

$.time();

More settings include:

$.time({
    langFile:'../src/langs/en.json', //the location of the relevant language JSON file (in the src/langs directory)
    refreshRate:60000 //how often (in ms) to refresh the times, 0 is no refresh
});

Examples

You can find all the examples live here

About

Plugin to allow you to display the time since an event. PHP formats the dates on the backend, then jQuery updates the times within the browser.

Resources

License

Packages

No packages published
You can’t perform that action at this time.