Skip to content

Commit

Permalink
Merge pull request #30 from JohnRDOrazio/generate-litejs-and-minify
Browse files Browse the repository at this point in the history
Changes by create-pull-request action
  • Loading branch information
JohnRDOrazio authored Mar 11, 2024
2 parents 6f5c8ac + 082985a commit 8633cc3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions jqClock-lite.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ if (!Date.prototype.hasOwnProperty("getWOY")) {
Date.prototype.getWOY = function (getY = false) {
const d = new Date(Date.UTC(this.getFullYear(), this.getMonth(), this.getDate()));
d.setUTCHours(0, 0, 0, 0);
let dayNum = d.getUTCDay() || 7;
const dayNum = d.getUTCDay() || 7;
d.setUTCDate(d.getUTCDate() + 4 - dayNum);
if (getY) {
return d.getUTCFullYear();
Expand Down Expand Up @@ -459,9 +459,10 @@ if (!Number.prototype.map) {

$(el).html(clk.calendElem + clk.clockElem);
let el_id = $(el).attr("id");
_jqClock[el_id] = setTimeout(() => {
_updateClock( $(el) );
}, clk.myoptions.rate);
_jqClock[el_id] = setTimeout(
() => { _updateClock( $(el) ); },
clk.myoptions.rate
);
},
formatDateString = ( clk ) => {
/* Format Date String according to PHP style Format Characters http://php.net/manual/en/function.date.php */
Expand Down Expand Up @@ -638,9 +639,9 @@ if (!Number.prototype.map) {
const highPrecisionTimestamp = performance.timeOrigin + performance.now();
const sysDateObj = new Date(highPrecisionTimestamp);

// If a server timestamp is passed in and options.isDST is not, then options.isDST isn't any good...
// If a server timestamp is passed in and options.isDST is not, then the default options.isDST isn't any good...
// It's no use using a client timestamp's check for DST when a server timestamp is passed!
// To fix this, we will give a console warning when a server timestamp is passed but isDST is not...
// To fix this, we will give a console warning when a server timestamp is passed but the isDST option is not...
// In order to do that, we need to save a reference to the original isDST option before ensuring default options
const origDST = options.isDST || null;
options = ensureDefaultOptions( options, sysDateObj );
Expand Down
2 changes: 1 addition & 1 deletion jqClock-lite.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion jqClock.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8633cc3

Please sign in to comment.