Permalink
Browse files

updated version number to reflect pull from comboy

  • Loading branch information...
1 parent 599df3b commit 76bb97f0977ee316e8c37b31e4af24ca74742101 @dsparling committed Mar 17, 2011
Showing with 18 additions and 11 deletions.
  1. +1 −1 README
  2. +15 −8 examples/jquery.jclock.js
  3. +2 −2 jquery.jclock.js
View
2 README
@@ -1,4 +1,4 @@
-jQuery jClock Plugin 2.3.1
+jQuery jClock Plugin 2.3.2
==========================
Homepage
View
@@ -1,5 +1,5 @@
/*
-* jQuery jclock - Clock plugin - v 2.3.1
+* jQuery jclock - Clock plugin - v 2.3.2
* http://plugins.jquery.com/project/jclock
*
* Copyright (c) 2007-2011 Doug Sparling <http://www.dougsparling.com>
@@ -9,7 +9,7 @@
(function($) {
$.fn.jclock = function(options) {
- var version = '2.3.1';
+ var version = '2.3.2';
// options
var opts = $.extend({}, $.fn.jclock.defaults, options);
@@ -107,12 +107,14 @@
}
$.fn.jclock.displayTime = function(el) {
- var time = $.fn.jclock.getTime(el);
- el.html(time);
+ var time = $.fn.jclock.currentTime(el);
+ var formatted_time = $.fn.jclock.formatTime(time, el);
+ el.attr('currentTime', time.getTime())
+ el.html(formatted_time);
el.timerID = setTimeout(function(){$.fn.jclock.displayTime(el)},el.timeout);
}
-
- $.fn.jclock.getTime = function(el) {
+
+ $.fn.jclock.currentTime = function(el) {
if(typeof(el.seedTime) == 'undefined') {
// Seed time not being used, use current time
var now = new Date();
@@ -128,8 +130,13 @@
var localOffset = now.getTimezoneOffset() * 60000;
var utc = localTime + localOffset;
var utcTime = utc + (3600000 * el.utcOffset);
- now = new Date(utcTime);
+ var now = new Date(utcTime);
}
+
+ return now
+ }
+
+ $.fn.jclock.formatTime = function(time, el) {
var timeNow = "";
var i = 0;
@@ -142,7 +149,7 @@
//switch (el.format.charAt(index++)) {
//}
- var property = $.fn.jclock.getProperty(now, el, el.format.charAt(index));
+ var property = $.fn.jclock.getProperty(time, el, el.format.charAt(index));
index++;
//switch (switchCase) {
View
@@ -1,5 +1,5 @@
/*
-* jQuery jclock - Clock plugin - v 2.3.1
+* jQuery jclock - Clock plugin - v 2.3.2
* http://plugins.jquery.com/project/jclock
*
* Copyright (c) 2007-2011 Doug Sparling <http://www.dougsparling.com>
@@ -9,7 +9,7 @@
(function($) {
$.fn.jclock = function(options) {
- var version = '2.3.1';
+ var version = '2.3.2';
// options
var opts = $.extend({}, $.fn.jclock.defaults, options);

0 comments on commit 76bb97f

Please sign in to comment.