开发者

Remove leading zero from jclock

Anyone ever used jclock and know how to remove the leading zero for th开发者_开发技巧e 12h setting?


There is no direct way of doing this with jclock because it displays the time as per the format properties passed to it.

If you are comfortable changing the jclock code you can change the lines like this one

  case "M": // minute as a decimal number
          return ((dateObject.getMinutes() 

to

case "M": // minute as a decimal number return dateObject.getMinutes();

I'd advise you may be add you own format property, using a suitable name like "X" and return it without the leading zeros or whatever changes you prefer

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜