Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Comment | File | Size | Author |
---|---|---|---|
#35 | date-1715542-35.patch | 5.75 KB | sean_e_dietrich |
#33 | date-n1715542-33.patch | 4.71 KB | DamienMcKenna |
| |||
#27 | support_relative_date-1715542-27.patch | 4.76 KB | Anonymous (not verified) |
| |||
#26 | date.module.diff | 1.15 KB | el35 |
#25 | views-datepatch-2016-05-31-14-27-41.png | 75.61 KB | MatthijsG |
Comments
Comment #1
white_pawn CreditAttribution: white_pawn commentedA big +1 from me.
Comment #2
SchwebDesign CreditAttribution: SchwebDesign commentedThis worked for us! THANK YOU! What a life saver this was in certain contexts.
This also solves this issue in the queue: http://drupal.org/node/1401688
Comment #3
Christopher Riley CreditAttribution: Christopher Riley commentedThank you ever so much as this works beautifully. Can we please get this officially committed soon please?
Comment #4
Christopher Riley CreditAttribution: Christopher Riley commentedPossibly I spoke too soon and or I am forgetting something. When I go into a repeating event it shows only the one date as intended however the date that it shows is for the next event not for that specific events date.
For example I have a repeating event the third Friday of each month. So my dates should be:
Friday, February 15, 2013
Friday, March 16, 2012
Friday, April 20, 2012
And so on. What I want to do is to show a event list with a view but instead of showing the next coming up event show the rrule date that is associated with that entry if that makes sense.
Is there any way to do that?
Thanks in advance
Comment #5
podarokall feature requests should be covered by tests
Comment #6
podarokdate-allow-relative-dates-for-output-filter.patch queued for re-testing.
Comment #7
toelli CreditAttribution: toelli commentedIv been using this patch and we're having some wierd problems with timezone.
(line 502 date.module)
When you create the relative notation dates they get created in local time... and this is kinda bad if your local timezone is not UTC because below in the loop where we remove the multiple values it gets compared to the default UTC database timestamps...
I tried to change to "new DateObject($from, 'UTC');" but DateObject does not even seem to work with adding a timezone?
My solution:
Comment #8
vijaycs85Comment #9
bkosborneAnd what about caching? Once you use relative dates, like dates that include the current date, it will only work if caching is disabled for that node view or if the page cache entry is cleared very often.
Comment #10
jwilson3cache-busting is always hard to get right, but #9 sounds like a configuration issue. You must set your cache lifetime to something at or lower than your desired relative date granularity accuracy.
Comment #11
hwasem CreditAttribution: hwasem commentedThanks, SchwebDesign, for the reference over here. This is EXACTLY what I was looking for. I applied the patch in OP and selected the relative date format. Now "today" and "now-12 hours" are working. Exactly what I needed to fix an issue I erroneously posted in Display Suite #2257435: Use a relative "Starting from" value in repeating date fields.
I sure hope this gets approved for Date as the partial implementation is confusing.
Comment #12
misthero CreditAttribution: misthero commentedgood one, hope it gets in the module works here
Comment #13
joshuautley CreditAttribution: joshuautley commentedPatched worked for us - RBTC
Comment #14
joshuautley CreditAttribution: joshuautley commentedComment #15
devad CreditAttribution: devad commented#0 patch re-roll against 7.x-2.9
Update: Something went wrong with this re-rolling, so I'm hiding this patch from files list.
Comment #16
joshuautley CreditAttribution: joshuautley commentedHas anyone tested #15?
We noticed that the recent update of the Date module to version 7.x-2.9 did in fact bring this issue back up for us.
I've applied the patch #15 but I do not see any difference in functionality.
Our goal is to simply display the most relative date. So, in the content type display settings we have it limited to display only 1 date, which we were thinking would not be a past date but instead the the first date in the future or the current date but no more than one date. In other words we don't want to see all future dates.
I ticked the box for "Show repeat rule" which gives us a sentence like, "Repeats every week every Wednesday until Wed Jan 27 2016".
Where is the radio button in UI as described below...?
"User interface changes
The current patch introduces new radio elements in the field output formatter in the case it has a cardinality > 1."
Comment #17
Steve Polito Design CreditAttribution: Steve Polito Design commentedI applied this patch which allowed me to use relative dates as demonstrated here.
Comment #18
MoCart CreditAttribution: MoCart commentedSo why does #15 have no final line ending (which generates an error) and in the middle of this statement:
$form['show_remaining_days'] = array(
Even more oddly, it works on my local mac osx but not on a hosted linux server, tho all the files updated exactly the same.
Comment #19
pslcbs CreditAttribution: pslcbs commentedPatch #0 works perfectly for me on Date 7.x-2.9 as @Steve-Polito-Design explains on the link example
Patch on #15 gives me this error:
Thank you all!!
Comment #20
devad CreditAttribution: devad commentedSomething went wrong with #15 re-roll, so I'm hidding #15 patch from files list.
Comment #21
joshuautley CreditAttribution: joshuautley commentedThank you for working on it devad.
I'll re-apply and see how it goes.
Comment #22
podarokComment #24
el35 CreditAttribution: el35 commentedI'm testing my issue. If all will be ok, I publish it
Comment #25
MatthijsG CreditAttribution: MatthijsG as a volunteer commentedSo, after days of struggling with this i found this thread. I used the original patch (see #17) and followed the blog from @steve-polito-design http://www.stevepolitodesign.com/blog/correctly-display-repeating-dates-... Thanks Steve!
In my case i use only a block with Views. The block shows the next date from now (and some extra info). Didn't config the display in Content Type; the date is hidden in the default display.
See for my config the screenshot - the only thing i set up. It's in dutch, but you get the point.
Comment #26
el35 CreditAttribution: el35 commentedAfter patching I still had problem with range date "to". It shows all dates, example: I set date "from -> now" and "to -> today 23:59", but node displays all dates from now to end od event. I found (with friend of mine), that in line 561 is set value2, which relevant nowhere, but I'm not sure. I prepared ptach (including above patch) with my resolve.
Comment #27
Anonymous (not verified) CreditAttribution: Anonymous at Ferlito / Van der Wyk commentedI rerolled the patch because the previous patches no longer apply. Apply this patch to 7.x-2.x-dev.
Comment #28
szt CreditAttribution: szt commentedComment #30
rwilson0429 CreditAttribution: rwilson0429 commentedThank you @pferlito. The re-rolled patch applied cleanly to the 7.x-2.x-dev.
Comment #31
Anonymous (not verified) CreditAttribution: Anonymous at Ferlito / Van der Wyk commentedThank you rwilson0429.
Comment #32
sashken2 CreditAttribution: sashken2 as a volunteer commentedPatch #27 working. Thanks!
Comment #33
DamienMcKennaRerolled.
Comment #34
DamienMcKennaPutting this back to "needs work" as it needs some tests.
Comment #35
sean_e_dietrichI didn't work on the tests but for the time being, rerolled the patch to work with the latest version of 7.x-2.x and should work on 7.x-2.14