! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Date without leading zeros
Status:
CLOSED: INVALID
Component:
clock-plugin

Comments

Description Marek Turnovec 2011-05-03 22:28:07 CEST
I want to specify as format for date:

d. m. y

where:

d - day without leading zeros (like 3)
m - withou leading zeros (like 5)
y - year (like 2011)

But with strftime function, it is not possible to specify months without zeros. Is there some solution?

Best regards

Marek Turnovec
Comment 1 Marek Turnovec 2011-05-03 22:34:34 CEST
It looks I found a solution - at least for Debian, which I'm using. :-)

%-d. %-m. %Y

I was trying to find something before I submitted the bug, but I was not successful. This "minus" form is undocumented in strftime manual, but it should work on some platforms...

But thruth is, that formatting strings for date() function in PHP are better...
Comment 2 juha editbugs 2011-05-31 22:42:54 CEST
yes, agree with the comment about php.
thanks for the hint of that minus sign.

Bug #7570

Reported by:
Marek Turnovec
Reported on: 2011-05-03
Last modified on: 2011-05-31

People

CC List:
0 users

Version

Attachments

Additional information