Can the end time be earlier than the start time, as would be the case for a party starting at 22:00 and ending at 2 in the morning?

"Patches welcome" - I haven't got my hands dirty yet with patches etc nor have I used CVS but in principle I'd be happy to get involved with this especially as the scenario of an event on a single date ending after midnight is something I need to handle, and I'd use this module in place of my horrible hack if it were fully formed.

So ... how would you feel about me asking for some pointers and assistance in helping me help turn this into a fully-fledged module?

Comments

joachim’s picture

Version: 6.x-1.0 »

Hi Nick! I was going to ping you on the Scotland group but you've found this anyway :)

Possible pitfalls with this: what if you want an event that starts Friday 2pm and ends Saturday 6pm? That seems kinda excessive, but I have friends on Facebook who've posted parties like this! ;) Having an end time earlier than start mean 'next day' is a sort of tweak feature that doesn't feel very safe because of this.

More practically: really weird stuff happens with date validation. I tried going down this route and having the validation handler put the start date value into the end date when you save the form, but got stuck because the end time wasn't there when I was setting the end date to type 'value'. I've left the stub code in -- you can uncomment the bit in date_single_day_after_build() and have a play.

nickrice’s picture

Version: » 6.x-1.0
Category: support » feature

I'm subscribed to Duvien's Drupal aggregator feed so things like this jump out at me. Was a surprise to see this so soon after talking about it the other day.

I'll take a look shortly.

nickrice’s picture

Version: » 6.x-1.0

I don't believe it is over 2 months since I wrote the above!!!

I have to apologise and confess I've got caught up in summer (such as it is) and other things and haven't followed up on this. I'm progressing bit by bit through module development stuff in parallel with other things and once I feel up to speed on that (and the light is already flickering on wrt how to use hooks) I should be more able and less fearful of diving into it all!

markdavidzahn’s picture

Version: 6.x-1.0 » 6.x-1.2
Priority: Normal » Major

Is this still a possibility? I have a need for this on 2 sites I'm working on.

stackpr’s picture

Perhaps the module can support an additional configuration so that the end time could be specified not as a time but as a duration (on a per-node-type basis). That would allow the module to keep roughly the same function as before. I would be worried that adding this functionality without changing the UI could cause confusion. For instance, inputting an end time earlier than the start time could just be an error. With this change, what would have generated an error would turn instead into an all-night event...

There could be a relative-day (ex: today, tomorrow, etc.), but that would complicate a module that seems to focus on simplifying things.