Skip to content

Commit

Permalink
All ambiguous date entries assume a future date
Browse files Browse the repository at this point in the history
Since it doesn't make sense to assume a past date/time to send an email message, all ambiguous entries such as "7am" (when it is currently "9am") will assume "7am tomorrow".

Solves #7
  • Loading branch information
thapar committed Jan 28, 2015
1 parent 73d5ce6 commit 0dc93de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Utils.gs
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,16 @@ function getUserChildLabels(label) {
function parseDate(str) {
// return Date.parse(str);
if(dateConversionRequired(str)){
return convertToUserDate(Date.create(str));
return convertToUserDate(Date.future(str));
}

return Date.create(str);
return Date.future(str);
}

function parseDateFormat(str) {

// var date = Date.parse(str);
var date = Date.create(str);
var date = Date.future(str);
if (date.isValid() && date.isFuture()) {
if(dateConversionRequired(str)){
return convertToUserDate(date).full();
Expand Down

0 comments on commit 0dc93de

Please sign in to comment.