npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

jtimer

v1.1.2

Published

jquery plugin that control the time with a structure like strftime and with a high perfomance.

Downloads

8

Readme

FOSSA Status Build Status NPM downloads MIT License

jTimer

It's a jquery plugin for time that control the time with a structure like strftime with a high perfomance.

How it work

When you use jTimer for get time with a structure that contains second you run an interval of 1 second, but when you use it for get time with a structure that contain: (minute you run an interval of 60 second, hours ==> interval of 3600 second, day, month....).

  • So it improve perfomance by reducing the interval.

Installation

npm install jtimer

Test

npm test

Usage on Browser

<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/1.1.1/jquery.min.js'></script> // call jquery
<script src="jTimer.min.js"></script> // call jTimer script
  • jTimer don't work with jQuery 3.0.0 and higher.

Time format

%ss ==> Secondes 
%mm==> Minutes 
%hh ==> Hours 
%d ==> day(0-31) 
%dd ==> number of dayWeek(0-6)
%D==> day of week(sunday,Saturday...) 
%DD ==> short dayWeek(sun,mon...) 
%LL ==> mini dayWeek(su,mo...) 
%M ==> monthes(January,Fev...) 
%MM ==> mini monthes(jan,dec..)
%m ==> monthes(1-12) 
%y ==> year
// the default format output of jTimer() is : %D %d %M %y 
// the default language of jTimer is : Arabic 

jTimer Language

AR ==> Arabic
AR-GR ==> Arabic Gregorian
AR-MG ==> Arabic Maghrebic
EN ==> English
FR ==> Francais
AZ ==> Azérie 
DE ==> Deutch
IT ==> Italien
AF ==> African
ES ==> Espagnol
ID ==> Indonesian
PT ==> Portuguese
// Language propertie is a insensitive-case

jTimer Usage

$(document).ready(function() {
var dom=$(".heure");
dom.jTimer({
format:"%hh:%mm:%ss",
lang:"en"
}); // They will output the time in selected element
});

look here for demo

jTimer Add new language

  • You now that we don't have all language in jTimer so you can add new language to jTimer, first set true to change propertie to allow language changing, then add 12 month as an array to propertie monthArray, and 7 day week also like an array to dayArray, also specify the propertie shift that control long of the short day (sunday ==> Sun ...).
$(document).ready(function() {
var dom=$(".heure");
dom.jTimer({
format:"%hh:%mm:%ss",
change:true,
monthArray=[],// define 12 month like an array by your language
dayArray:[],// define 7 day of week
shift:3// define how long it the short day of week and month (sunday ==> sun, january ==> jan)
}); // They will output the time in selected element
});

Licence

jTimer is freely distributable under the terms of the MIT license