Giter VIP home page Giter VIP logo

Comments (19)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Tried to debug datejs a bit to find out how to fix this, but didn't have much 
luck. I put together this "development environment" in the attached zip file.

Unzip the folder, open test1.html, open the javascript console and try 
something like:
  Date.parse("Monday") // when it's tuesday

All the current overrides to datejs are in CustomDate.js

With enough time, should be able to debug enough to fix problem  :-)

Original comment by [email protected] on 20 May 2012 at 12:43

Attachments:

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Issue 58 has been merged into this issue.

Original comment by [email protected] on 5 May 2013 at 1:50

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
If I remember correctly this is by design and clearly documented on the datejs 
site. Use something like "Monday next week".

Original comment by [email protected] on 6 Sep 2013 at 5:55

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
I tried to use this today (Friday 1/3/14) by writing @Mon 9am, and it sent the 
email immediately. When I use your "parse date" function, I see that the system 
is interpreting "@Mon 9am" as Monday 12/30/13. 

But if I put @Sat 9am, it works!

Confusing.

Original comment by [email protected] on 3 Jan 2014 at 3:41

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Hello Rardell,

Yeah, I agree this is confusing. More information is posted on the wiki about 
other datejs gotchas: 
https://code.google.com/p/gmail-delay-send/wiki/GmailDelaySendOptions_8#Test_a_d
ate_or_time

Personally I would avoid using this syntax and maybe use the calendar date (eg. 
1/5) instead.

Original comment by [email protected] on 3 Jan 2014 at 4:39

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Thanks.

Original comment by [email protected] on 3 Jan 2014 at 4:43

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Rardell,

As I understand it datejs sees any days to parse as in the current week. So if 
its Friday (as in your example) and you ask it to parse monday it gives a date 
that has passed  - the Monday of *this* week. If you ask for Saturday it parses 
the following days date as that is in *this* week. 

If you were trying this out on Monday you might not of noted the error because 
(presumably) it would parse all the days as in *this* week and therefore yet to 
occur dates. 

Hope that clears up some of the confusion. 

I think that writing the date and time rather than trying to use short hand is 
the best way to go with that. 

To add extra complication, I need to write in the format of 23rd April 2014 
rather than 23.04.14 - as datejs parses to the USA date format and I'm in the 
UK. So my emails end up being sent on the wrong month or falling down because 
there is no month 23 (or whatever) because I've forgotten to transpose the day 
and month. 

In all these things I just imagine I am talking to a slightly autistic toddler 
(a situation I have first hand experience of) and try to be as unambiguous as 
you possibly can and usually you can't go that wrong :)

Original comment by [email protected] on 9 Feb 2014 at 4:47

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Good points!

Original comment by [email protected] on 9 Feb 2014 at 4:59

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
It would be awesome if you could update the gotcha's with:

- Links to further details about each gotcha -- you explanation made it
much more clear and thus easier to remember.:

- Whether days of the week start on Sunday or Monday(?)

- More explination as to why 'tommrow, 5pm' doesnt work

- whether the default time of "12:00" is AM or PM

- How we might be able to contribute to / fix DateJS our selves.

Original comment by [email protected] on 9 Feb 2014 at 11:04

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Yes, I was wondering about the Sunday/Monday thing, too. Then I realized that I 
would never remember even if I did know, so will stick with the other date 
convention (e.g., 2/9).

Original comment by [email protected] on 9 Feb 2014 at 11:15

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
 Jason,  that would be very useful but  I think you might need to go over to the datejs people for that. 

I was just trying to articulate my understanding of what I'd read in the gotcha 
 page of this  project.  I'm by know way an expert 

in anything

 Diccon

Original comment by [email protected] on 11 Feb 2014 at 12:14

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
I created a copy that uses the d/m/y format by default.

It is here 
https://script.google.com/macros/s/AKfycbw6UoiXxOjGVWuETYBo03RDOf6Wq3QvfBYZjW8QB
401o1ATxaM/exec for anyone who is interested.


Original comment by [email protected] on 12 Mar 2014 at 12:19

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Issue 139 has been merged into this issue.

Original comment by [email protected] on 21 Mar 2014 at 9:48

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Can we set up trigger times in another timezones?

Original comment by [email protected] on 6 Nov 2014 at 12:23

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Is this really still an issue? Is this project no longer active or something?

Original comment by [email protected] on 26 Feb 2015 at 8:30

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Hello Raj,

This specific issue is with date.js library. If you have the time or interest 
to resolve the issue for them it would be most appreciated by a lot of people.

Thanks,
-Blair

Original comment by [email protected] on 26 Feb 2015 at 2:32

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Hi Blair,

Is sugar.js (http://sugarjs.com/dates) not an option? It is a more mature 
library with a function `Date.future()` which will assume any ambiguous date is 
a future date: http://sugarjs.com/dates#creating_dates -- which would make 
sense, considering it's not possible to send an email in the past.

Alternatively, Tim has made this suggestion: 
https://code.google.com/p/gmail-delay-send/issues/detail?id=191

Original comment by [email protected] on 15 Mar 2015 at 7:06

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
Hello Raj,

Thanks for the note!

Sugar def. looks like a better option. I also commented on issue 191.

I think if I were to take time to really get into the guts again I would try to 
avoid parsing the dates.

I've been tinkering around a bit w/ using a calendar pop up. But finding the 
time is trouble.

-Blari

Original comment by [email protected] on 15 Mar 2015 at 10:28

from gmail-delay-send.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 19, 2024
I definitely think parsing dates is the right way to go. You probably have a 
sour taste in your mouth only because of your troubles with date.js. I think 
you'll see sugar.js is far better at parsing dates. And the ambiguous dates 
mistakenly parsing as past dates/times is no longer an issue with 
`Date.future()`. Other than that, most functions should be quite similar so I 
think moving to sugar.js should not be too much trouble.

Original comment by [email protected] on 16 Mar 2015 at 7:44

from gmail-delay-send.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.