<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<br>> I've notice that the zerofix parameter doesn't work if the format specifier is butted up to another specifier. Here is some test code that can be pasted onto any page.<br>> <br>> This will work as expected:<br /><br>> [convert_date zerofix=1 fmt="%I %P"][/convert_date]<br>> <br>> <br /><br /><br>> <br>> This will not:<br /><br>> [convert_date zerofix=1 fmt="%I%P"][/convert_date]<br>> <br> > BTW - that is a captial eye, not lowercase L.<br>> <br>> I think it is a bug, or...?<br>> <br>> Paul Jordan<br> > ><br> > ><br>> > It looks like zerofix operates on the formatted value, which in turn is implemented via:<br> > ><BR>> > $out =~ s/\b0(\d)\b/$1/g if $opt->{zerofix};<BR>> ><br>> > So this will only remove leading zeros if the final output value matches that regex, <BR>> > which is dependent on word breaks.  %P I assume in this case is alpha-numeric, not <BR>> > digits.  (My system strftime() has %p but not %P).  Definitely unintuitive behavior, but <BR>> > not sure what the best fix would be in general; maybe remove the trailing \b from <BR>> > the regex?<BR>> ><BR>> > David<br> <BR>Hmmm, on the formatted value? That means it could potentially affect the minutes space, which wouldn't be good in most cases.<BR> <BR>I'm just going to have a new convert_date tag made that would allow one to tell it exactly what to zerofix (if applicable) ala zerofix="%H %I %e". It seems even the specifiers that remove leading zeros like %e tend to add a space - which is presumptuous. Mine would apply the zerofix to any named specifiers individually. <BR> <BR>There's some enhancements I need done anyway that probably aren't generally useful.<BR> <BR>Thank you <BR> <BR>Paul<BR> <BR> <BR>                                     </div></body>
</html>