Skip to forum content

LuxCal Web Calendar

The place for news, questions and suggestions

You are not logged in. Please login or register.


Post new reply

LuxCal Web Calendar → Need Help → Leading zero in time → Post new reply

Post new reply

Compose and post your new reply

You may use: BBCode Images Smilies

All fields with bold label must be completed before the form is submitted.

Required information for guests


Required information

Topic review (newest first)

3

That fixed it.  I like having all the times aligned correctly when the calendar is printed.  It makes everything look better, IMHO.

2

Hi Bill,

You found a bug in the time formatting of the calendar! Thank you for reporting this.
It's surprising, this bug has been there for many years and until today nobody complained. Apparently not many calendar users are interested in leading zeros.

The problem can be solved by editing the file "common/toolbox.php" and replacing line 59 . . .

 $phpFormat = str_replace(array('H','h','m'),array(($ampm ? 'h' : 'H'),($ampm ? 'g' : 'G'),'i'),$format);

by . . .

 $phpFormat = str_replace(array('h','H','m'),array(($ampm ? 'g' : 'G'),($ampm ? 'h' : 'H'),'i'),$format);

I will change this for the next calendar version.

Roel

1

The time display setting for leading zero (H) doesn't work for me.  I have tried H:mA and h:mA, both return the same time without the leading zero.

Is there a local setting on my system that might be preventing the leading zero from working?

Thanks,

Bill

LuxCal Web Calendar → Need Help → Leading zero in time → Post new reply