Print

Print


Having spent the last few weeks creating a Drupal module that give
users a tool to add events to their personal calendars, the challenges
inherent in moving date information are definitely in my mind.

First off, your tool needs to be aware of your date handling system.
In Drupal, you can base on UTC or a local time zone, and you can
choose to allow individual users to set their date handling --
generally a bad idea. To make our tool work, we had to be aware of
this, and it was tricky, as the tool had to work across sites with
different settings.

We built the tool to support five calendars -- iCal, Outlook, Google,
Windows Live, and Yahoo. They divided into three pretty distinct
methodologies. One of them based on start time and duration, so after
a false start, we used this as our baseline. I think that this
provides the most flexible handling and covers date spanning.

While library hours present a different set of needs, I think that the
challenges inherent in sharing them are similar. Fundamentally, I
think that in order to provide an open service, you should consider
providing opening day and hour in a durable format like ISO 8601,
providing time zone offsets, and duration.

Thanks,

Cary

On Wed, Jun 8, 2011 at 11:45 AM, Brice Stacey <[log in to unmask]> wrote:
> You can't necessarily say "We 8:00-2:00" because your closing hour could be after your opening hour on the next day and it would be ambiguous. E.g. Opening at 2am and closing the next day at 4am. I know that's absurd for most libraries but it may happen. A better example is when a library stays open overnight just one day a week.
>
> Ideally, if working with times with date granularity you should honor that choice and say "We 8:00-24:00" and "Th 0:00-2:00". Then, when creating human readable formats you always check tomorrow in the event today's closing time is midnight.
>
> Brice
> —
> Sent from my iPhone
>
> On Jun 8, 2011, at 1:00 PM, "Nate Vack" <[log in to unmask]> wrote:
>
>> On Wed, Jun 8, 2011 at 11:45 AM, Kevin S. Clarke <[log in to unmask]> wrote:
>>
>>> <time itemprop="openingHours" datetime="Mo,We,Fri 17:00-21:00">Mondays, Wednesdays, and Fridays 5-9pm</time>
>>
>> Or, if you just want to talk about
>> http://library.example.com/hours/today, (which I think is what the OP
>> was about?) you could do:
>>
>> <time itemprop="openingHours" datetime="We 8:00-21:00">Open today
>> (Wednesday, June 8) from 8:00 am to 5:00 pm</time>
>>
>> Note that if you're open from, say, 8:00 AM to 2:00 AM, it raises some
>> interesting discussions about what exactly goes in those time ranges,
>> and when "today" should change. I'd vote datetime="We 8:00-2:00" and
>> changing "today" shortly after 2am, but there are valid arguments that
>> that's a dumb vote.
>>
>> The easy solution: change policy to never be open past midnight ;-)
>>
>> Cheers,
>> -Nate
>



-- 
Cary Gordon
The Cherry Hill Company
http://chillco.com