Coder Social home page Coder Social logo

Comments (7)

pcgreat avatar pcgreat commented on April 16, 2024 2

@patapizza Thanks for your prompt reply and detailed explanations. Yeah, I agree that there is some confusion and ambiguity inside this question.

I did find some discussions https://english.stackexchange.com/questions/36419/next-friday-vs-this-friday and https://www.quora.com/When-is-it-correct-to-use-the-term-next-Saturday-or-any-other-day and https://forum.wordreference.com/threads/when-is-next-saturday-last-monday.37415/ . Most people tend to use "this Thursday" to refer to the upcoming Thursday, and "next Thursday" for the Thursday in the following week.

And just like you said, this is still ambiguous for the Sunday case, so I created a little poll in my company (US based): Say today is Sunday (06/18), when I say “next Thursday”, if you think it’s referring to Thursday (06/22), please vote 1️⃣ if you think it’s referring to Thursday (06/29), please vote 2️⃣ And finally I got 1 vote for 1️⃣ and 6 votes for 2️⃣ So these people do think Sunday is the first day of the week and "next " always refers to the following week.

So based on your questions, here is my answers (with a small scale vote):

If the refTime is Wednesday, "next Wednesday" refers to the one of the following week (upcoming Wednesday).

Yes.

If the refTime is Wednesday, does "next Thursday" refers to the one of the current week or of the following week (new behavior)?

We would think it's the following week in this case.

If the refTime is Saturday, "next Thursday" refers to the one of the following week (upcoming Thursday).

Yes.

If the refTime is Sunday, "next Thursday" refers to the one of right after that.

We think it's the Thursday after the immediate one.

However, the size of my poll is so small. So just like you said, other folks are more than welcome to provide their opinions.

from duckling.

individual11 avatar individual11 commented on April 16, 2024 1

My 2 cents:

Currently, when I pass in "next monday", the response will be the datetime for the next Monday that occurs, with no options. If I pass in "monday", it returns the next Monday with the previous and the following, so three options.

Over 50% of my customers when using "next monday" actually mean "monday after next". I think it's just a colloquialism, but it would be great for the datetime to return 2 options; 1 for the next monday, and one for the monday after next, allowing me to confirm with my customer.

Let me know if this doesn't make sense, would be happy to discuss further.

from duckling.

patapizza avatar patapizza commented on April 16, 2024

Thanks for being proactive and submitting a PR! :)

Personally I've always been confused with this in English. For what I've seen, it seems like "next " is effectively the upcoming day of week, otherwise it requires disambiguation ("you mean this week or next week?"). I might be wrong though.

In my mind, "next Thursday" should always refer to the Thursday of next week.

I would generally agree, though it's still ambiguous, since in the US Sunday is the first day of the week (vs Monday). Let's see:
If the refTime is Wednesday, "next Wednesday" refers to the one of the following week (upcoming Wednesday).
If the refTime is Wednesday, does "next Thursday" refers to the one of the current week or of the following week (new behavior)?
If the refTime is Saturday, "next Thursday" refers to the one of the following week (upcoming Thursday).
If the refTime is Sunday, "next Thursday" refers to the one of right after that. Depending on when the weeks start, it can be the one of the current week or the one of the week after that. In both cases, it's the upcoming Thursday in the current behavior. Which one would it be in the new behavior?
If the refTime is Monday, does "next Thursday" refers to the one of the current week or of the following week (new behavior)?

I would love if other folks can chime in too.

from duckling.

individual11 avatar individual11 commented on April 16, 2024

Checking back on the above.

from duckling.

patapizza avatar patapizza commented on April 16, 2024

This fell off the cracks, thanks for following up.

It seems like returning both options under values could make sense, as it is ambiguous.
Have you tried looking at the code?

from duckling.

individual11 avatar individual11 commented on April 16, 2024

I took a passing glance through. Haskell isn't really my jam, but if you could point me to the right file(s) I can always take a stab at it.

from duckling.

patapizza avatar patapizza commented on April 16, 2024

@individual11 As a starter, here is the English rule, and here is the helper function.

from duckling.

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.