Omit leading zeros

jandoemen - March 11, 2007 - 13:41
Project:Countdown
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Is there a way to ommit the leading zero's of hours, minutes and seconds?

Thanks
Jan

#1

deekayen - March 11, 2007 - 16:48
Title:Ommit leading zero's» Omit leading zeros

I don't get leading zeros on my installation. What PHP version are you using?

#2

jandoemen - March 11, 2007 - 21:57

I have PHP 5.1.6 and use 24h display, maybe that's the reason. I checked the date() function in PHP and they only provide minutes and seconds WITH leading zero so I guess it has to be stripped in the code itself. Or is there a setting elsewhere?

Thanks
Jan

#3

deekayen - March 14, 2007 - 01:48

Lets clarify where we're talking about... do you mean the block configuration or the block output? The block output doesn't even use the date functions, just math. The returned values of date() from the block config are type-forced to integers, which should strip off the preceding zeros.

#4

deekayen - August 23, 2009 - 05:46
Status:active» closed

No response.

 
 

Drupal is a registered trademark of Dries Buytaert.