Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2 from artifi/master

Small bugfix for dateObject creation.
  • Loading branch information...
commit 521fcd7d165f25ce55ebe02365e005b842db55cd 2 parents f195ece + b414ddc
@squeeks authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/glossy/produce.js
View
4 lib/glossy/produce.js
@@ -314,7 +314,7 @@ function leadZero(n) {
* Features code taken from https://github.com/akaspin/ain
*/
function generateBSDDate(dateObject) {
- if(!dateObject instanceof Date) dateObject = new Date(Date());
+ if(!(dateObject instanceof Date)) dateObject = new Date(Date());
var hours = leadZero(dateObject.getHours());
var minutes = leadZero(dateObject.getMinutes());
var seconds = leadZero(dateObject.getSeconds());
@@ -333,7 +333,7 @@ function generateBSDDate(dateObject) {
* @returns {String} formatted date
*/
function generateDate(dateObject) {
- if(!dateObject instanceof Date) dateObject = new Date(Date());
+ if(!(dateObject instanceof Date)) dateObject = new Date(Date());
// Calcutate the offset
var timeOffset;
Please sign in to comment.
Something went wrong with that request. Please try again.