Hi,
is there a way to show the remaining days until the event beginn?
Have a nice day :)
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | showing-remaining-days-until-event-date-1166036-21.patch | 6.63 KB | andriyun |
Hi,
is there a way to show the remaining days until the event beginn?
Have a nice day :)
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | showing-remaining-days-until-event-date-1166036-21.patch | 6.63 KB | andriyun |
Comments
Comment #1
Palmeus commentedComment #2
karens commentedGo to the Display Fields page. Change the formatter to use the 'Time Ago' option.
Comment #4
stopshinal commentedHow can I format it to show "x days" or display "0 days" if the date has already passed?
Comment #5
davvid commentedHi, I have the same problem. I just want to display 'in ... days' (e.g. 'in 103 days') but it seems like there is no option to do that. Any ideas?
Comment #6
fdefeyter@gmail.com commentedsame problem...
Comment #7
Jere Toivanen commentedComment #8
andriyun commentedComment #10
andriyun commentedComment #11
andypostout of context
return $output . $show_remaining_days;
same
remove $output
extra line
Comment #12
andriyun commentedrerolled patch
Comment #13
podarok+ $summary[] = t('Show remainimg days: @value', array('@value' => ($settings['show_remaining_days'] ? 'yes' : 'no')));should be remaining, not remainimg
Comment #14
andriyun commentedFixed!
@andypost your notes considered and included!
Thank you very much for review!
Comment #15
andriyun commentedComment #17
andypostkhm...
please leave "$output" separated by empty line
use format_plural() here, "day[s]" should be translatable as part of the whole sentence
Comment #18
andriyun commentedreroll and fix after review
Comment #19
andypostnitpick, no idea how to format this code properly
needs dot.
use this one liner:
$show_remaining_text = format_plural($remaining_days, 'To event remaining 1 day', 'To event remaining @count days');
Comment #20
andriyun commentedThanks!
Corrected!
Oooh.... I'm forget about fullstop!
Comment #21
andriyun commentedComment #22
andypostNeeds commiter approval about markup
Comment #23
podarok#21 commited
Thanks!
Comment #26
niallmurphy-ie commentedSorry to reopen but "The upcoming date less then 1 day" and "To event remaining 1 day" aren't grammatically correct. Something like the below would be better.
Comment #27
madjr commented#26 I agree.
Also a Big issue is that the DAYS only format / wording is NOT accurate.
It needs to SHOW Hours and Minutes too or a format like this: "Less than X day(s)".
Why? Because of these examples:
i.e.
Lets say event is in 7 days (1 week).
once we set our date to Start in 7 days, it will Output the following: "To event remaining 6 days" ....
What it needs to output should be something more accurate like:
-"To event remaining 6 days 23 hours and 59 seconds"
- or better yet: "The upcoming date less then 7 days" (for less than 24 hours it already outputs the following: "The upcoming date less then 1 day.")
Comment #28
Collins405 commentedThe actual wording here is incorrect.
No-one would say "To event remaining 6 days".
It should be "6 days remaining" or "6 days until the event".
EDIT: Just read #26, its early! I agree ;-)
Comment #29
Collins405 commentedLine 480 of date.theme
Change...
$show_remaining_text = format_plural($remaining_days, 'To event remaining 1 day', 'To event remaining @count days');to....
$show_remaining_text = format_plural($remaining_days, '1 day remaining', '@count days remaining');Comment #30
nravens commentedIs there a way to change the text as in #26 and #29 without editing any files in the date module? Is string overrides the only option?
This worked in string overrides in case anyone else wants to go that route:
Original: To event remaining @count days
Replacement: what ever text you want @count days
Comment #31
niallmurphy-ie commentedNakes, for trivial fixes like this, some jQuery is an easy option.
Comment #32
markdcI agree with Collins405. These strings were clearly written by a non-native English speaker. Here's one I found that fails the spelling, grammar and brevity tests:
Suggested revision:
I'm not a module developer but I am a native speaker with writing and proofreading experience. If I can be of any help, please don't hesitate to contact me. I'd love to give something back to the community however I can.
EDIT: Also just read #26. *facepalm*
Comment #33
joel_osc commentedAgree the wording is off... for those wanting to change them without code you can use the string overrides module on the following two string:
To event remaining 1 day
To event remaining @count days
Comment #34
colanAs this issue is closed/fixed, please open a new one to deal with the language problem (and relate it to this one). Thanks!