I'm hoping to find some advice on how to solve a problem I'm having when using From and To dates. As of now, I have a database of nodes related to conventions. On several listings, the conventions are sorted by date. I would like the display of the dates to be improved.

As of right now, I have Mar. 12, 2010 - Mar. 14, 2010. Ideally, this would read out as Mar. 12 - 14, 2010. I would like to suppress the year and month whenever they are identical to the From date.

Is there a way of doing this across the board so I could use it in Views and node displays without duplicating myself too much?

Comments

cayenne’s picture

Use the CCK computed field module, generate the text you want, and display it.

In the alternative, you can theme your node, but probably cannot sort on the resulting values or display them in a table.

:)

StevenSokulski’s picture

I'd begun using the computed field elsewhere, but hadn't thought to use it here. Create a computed field with the PHP to display the dates how I'd like, and plug that into Views, Theme displays, etc.

Thanks!

obrienmd’s picture

How about custom formatters?
http://drupal.org/project/custom_formatters