-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Future date should use days #6
Comments
In that case why not use the hdate.prettyPrint(new Date(1416448704578), { showTime: true })
// November 19th, 2014 at 5:58 pm I could see adding in a |
Cool. As for the reason - because I do want it to say "tomorrow" when it is tomorrow and friday when friday is a couple of days away. Just as humans talk. |
There's times where it's appropriate to say "two months from now" rather than give a specific date so I don't think it should be a hard-coded rule in the library. It should be easy to apply that logic outside of the library by checking how far out the date is and choosing the appropriate method or constructing your own string. |
why close? |
The issue as it is currently is not something that I think makes sense for the library. I've suggested ways of how you could get the intended functionality and why I don't think it would make sense to change how the The only thing that I would add would be a method for getting the date's human name such as "Friday" which isn't available with native date object similar to how human-date can return a month like "February". But that would be a separate issue I believe. |
I think in general both in relative and absolute time, day names are important. Specifically I HAVE to use relativeTime, because I need to say stuff like "tomorrow" "in a couple of hours" "in 10 minutes" etc'. Right? If we're not going to have that my only option is to write logic to see if it's this week, then just write the day name myself? Doesn't it sound cumbersome to you? In what use case would a day-name in relativeTime be weird? Perhaps it should be a flag? |
perhaps other contributors care to comment as well? If I'm the only one thinking this makes sense then of course I must be wrong :) |
I agree with @montanaflynn's comments on your original issue request. That said, this line specifically I can agree with; However, that was not your original request:
|
As I understood the original request it was after a certain period of days to replace it with the date. If it's to change it to "Next Sunday" or "This Friday" then I think that would make sense but where is the cutoff, and does it extend to weeks, months, etc...? ("In six months" vs "In August"). @uriva I'll reopen this issue, could you make a list of dates in the future and what you expect the library to output? That would be very helpful to understand what you're seeking and for implementation as well. |
If the date is something in 5 days, I would expect to get a day of the week result, e.g. "friday, 10am" instead of "in 5 days".
The text was updated successfully, but these errors were encountered: