Skip to content

Commit

Permalink
updated version number to reflect pull from comboy
Browse files Browse the repository at this point in the history
  • Loading branch information
dsparling committed Mar 17, 2011
1 parent 599df3b commit 76bb97f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
jQuery jClock Plugin 2.3.1
jQuery jClock Plugin 2.3.2
==========================

Homepage
Expand Down
23 changes: 15 additions & 8 deletions examples/jquery.jclock.js
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -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);
Expand Down Expand Up @@ -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();
Expand All @@ -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;
Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions jquery.jclock.js
Original file line number Diff line number Diff line change
@@ -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>
Expand All @@ -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);
Expand Down

0 comments on commit 76bb97f

Please sign in to comment.