Browse files

Merge pull request #2 from artifi/master

Small bugfix for dateObject creation.
  • Loading branch information...
2 parents f195ece + b414ddc commit 521fcd7d165f25ce55ebe02365e005b842db55cd @squeeks committed Dec 9, 2011
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;

0 comments on commit 521fcd7

Please sign in to comment.