From 0dc93de7f011cd37f071d5aec082c34f0fb8ef21 Mon Sep 17 00:00:00 2001 From: thapar Date: Wed, 28 Jan 2015 09:31:25 -0500 Subject: [PATCH] All ambiguous date entries assume a future date 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 https://github.com/webdigi/GmailScheduler/issues/7 --- src/Utils.gs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Utils.gs b/src/Utils.gs index 7f646ad..c78850a 100644 --- a/src/Utils.gs +++ b/src/Utils.gs @@ -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();