Comparing version 1.15.1 to 1.15.2
@@ -251,7 +251,7 @@ #!/usr/bin/env node | ||
var reportDay = (cmd.reportDay && typeof cmd.reportDay === 'string') ? cmd.reportDay : getDate('today') | ||
var reportDayTomorrow = new Date(reportDay) | ||
reportDayTomorrow.setDate(reportDayTomorrow.getDate() + 1) | ||
var reportDay = (cmd.reportDay && typeof cmd.reportDay === 'string') ? cmd.reportDay : 'today' | ||
reportDay = getDate(reportDay) | ||
var reportDayTomorrow = new Date(reportDay.getTime() + (24 * 60 * 60 * 1000)) | ||
filter.gt = reportDay | ||
filter.lt = reportDayTomorrow | ||
@@ -617,2 +617,7 @@ console.log('Report for %s:', printDate(reportDay)) | ||
function printDate (date) { | ||
if (typeof date === 'string') { | ||
date = getDate(date) | ||
return printDate(date) | ||
} | ||
var monthNames = [ | ||
@@ -619,0 +624,0 @@ 'January', 'February', 'March', |
@@ -8,3 +8,2 @@ var parseTime = require('parse-messy-time') | ||
var d | ||
var timestamp = Date.parse(expr) | ||
@@ -17,6 +16,6 @@ if (expr === null || expr === undefined) { | ||
d = new Date(expr * 1000) | ||
} else if (isNaN(timestamp)) { | ||
} else if (typeof expr === 'string') { | ||
d = parseTime(expr) | ||
} else { | ||
d = new Date(timestamp) | ||
d = new Date(expr) | ||
} | ||
@@ -23,0 +22,0 @@ |
{ | ||
"name": "clocker", | ||
"version": "1.15.1", | ||
"version": "1.15.2", | ||
"description": "track project hours", | ||
@@ -5,0 +5,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
114017
11
1924