Closed (fixed)
Project:
Drupal Commons
Component:
Code
Priority:
Critical
Category:
Feature request
Assigned:
Issue tags:
Reporter:
Created:
22 Mar 2013 at 14:40 UTC
Updated:
4 Jan 2014 at 02:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
japerryComment #2
ezra-g commentedComment #3
japerryHere is my first big whack at it... features
it overrides the theme registry and inserts some fun regular expressions to format the date more beautifully. I should only work on those date formats that fit the regular expressions below. I did a bit of testing on different expressions, and does work out of the box and with 12/24 hour formats.
Comment #4
japerryfixed!
http://drupalcode.org/project/commons_events.git/commit/a73e814
Comment #5
ezra-g commentedThe "upcoming events" block looks busted per this screenshot.
Comment #6
ezra-g commentedComment #7
japerryFixed by changing the long formatter to events_datetime in the view.
http://drupalcode.org/project/commons_events.git/commit/5e00bb6
Comment #8
hservaes9 commentedHello.
I have some events which have different begin - end dates.
For event with the same begin - end date, it's okay.
See attachment.
Thanks.
Comment #9
hservaes9 commentedHello.
I have some events which have different begin - end dates.
For event with the same begin - end date, it's okay.
See http://postimg.org/image/6l49p20nb/
Thanks.
Comment #10
japerryMake sure you ran updb after going to 3.1, it should set your view to use the event_datetime formatter, which will be correct.
Thanks for that update -- what date format are you using for your dates? You can find out by checking out admin/config/regional/date-time
You'll either have to inspect the page (view source) to see the actual format, or look at the database like this:
https://www.evernote.com/shard/s12/sh/b2ae6a4a-f2ec-4a91-8a60-ffd75979a2...
Comment #11
japerryAlso, assigning this to Jeff to approve. Here are some potential designs we could use:
Same years; different months,days. we combine the dates together and the times together:
https://www.evernote.com/shard/s12/sh/13dfffe4-5ed8-448b-afdd-5972b5f196...
Same months, years; different days and times.
https://www.evernote.com/shard/s12/sh/d304339a-7a80-40ab-95d8-7d2b82a66a...
Same month , year, day: different time (note this uses the default formatter):
https://www.evernote.com/shard/s12/sh/96619bfc-ee53-4d80-b128-3298825004...
These are much simpler, in code, than the current design, and we can use this for php 5.2. But I still have the other design setup for 5.3
Comment #12
hservaes9 commentedHello,
Thanks, I ran updb after going to 3.1. The view event_datetime formatter seems correct.
I tried with your date format, same problem on the upcoming events view.
Same problem on the event page.
Comment #13
ezra-g commented@japerry, can you post a patch that corresponds to the designs proposed in #11?
Comment #14
japerryopps yah I got snagged on an issue friday afternoon. After the refreshing weekend, figured out the mistake ;-) heres the patch!
Some notes:
* Uses basically the original format outlined in the spec
* Uses the format above only when a) the range is > year or b) when using Mon, Tues, etc in a date
* Doesn't need regular expressions!
I think this is a much simpler solution, and shouldn't be as fragile.
Comment #15
ezra-g commentedThis seems to be functioning well. Nice use of the Date API over regex!
One note:
Any reason not to call theme() here? I don't see a code path to recursion that we're avoiding with the direct call.
Comment #16
ezra-g commentedAlso, bumping radar to 3.2.
Comment #17
ezra-g commentedDiscussed with japerry in IRC. Marking as NW per #15.
Comment #18
japerryComment #19
japerryFixed!
http://drupalcode.org/project/commons_events.git/commit/b6bb399
Comment #20
tmcnamara98 commentedHello,
are we sure this solves the issue? I just downloaded the most recent version and still get the preg_filter() error. I do have PHP version 5.2.
Tim
Comment #21
japerrythe 3.2 release still contains code from 3.1. Sorry about that. When we release 3.3 it will have the updated code.
In the meantime, you should be save to use either the commons dev snapshot, or use 3.2 and manually update the commons_events module to its dev snapshot.
Comment #22
tmcnamara98 commentedThank you for the response.
How do I get this snapshot? I just downloaded 7.x-3.x-dev and it still has preg_filter() called on line 477 of commons_events.module.
-Tim
Comment #23
tmcnamara98 commentedPlease disregard comment #22; I got it. -Tim