Midnight at 00:00 not making sense - looking for ideas and suggestions

Fiddling with a simple booking system for a music venue. The people
working on that venue starts working at 17:00-ish at one day, and is
finished 03:00-04:00. For a maintainer of the calendar, saying that
something happens on May 19th at 01:00 when it actually happens on May
20th at 01:00, makes sense.

Any ideas and suggestions on how to implement this kind of thing and
keep everything smooth, sexy and DRY?

(Yes, that’s a vague question, so I’m looking for overall ideas and
suggestions, not funky app-specific details)

Answering myself for the win.

This - http://www.filamentgroup.com/examples/slider/index2.php looks
pretty sexy. A sensible time input for this particular case. As for
viewing it, doing some fancy sort by with a modulo should work,
setting the “midnight” of the calendar view to 05:00 or something.

calendar_events.sort_by {|e| (e.time_and_date - 16.hours).hour % 24 }

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs