Adjust granularity of time display

nschelly - October 17, 2007 - 15:44
Project:Recent Blocks
Version:5.x-1.3
Component:Code
Category:feature request
Priority:normal
Assigned:nschelly
Status:needs review
Description

When the recent blocks are in a sidebar, it can be difficult to fit the full time display that's there. In our case, we are adjusting it to only display times with a granularity of 1. That means the times are shown as "1 day" instead of "1 day 3 hours" for example, or "4 hours" instead of "4 hours 34 minutes." I thought this would make a good admin option, so I added it as an option to configure each recent block created, with how it will display dates, to what granularity.

Please see the attached patch for the adjustments I made to recent_blocks.module to accomplish this.

AttachmentSize
recent_blocks-granularity.patch2.77 KB

#1

nschelly - October 18, 2007 - 17:20
Status:reviewed & tested by the community» needs review

I suspect I set the status wrong... switching it to "code needs review")
-N

 
 

Drupal is a registered trademark of Dries Buytaert.