It is currently March 28th, 2024, 11:02 am

Remove time hour zero when using %r time

Get help with creating, editing & fixing problems with skins
Post Reply
User avatar
JohnBurns
Posts: 63
Joined: February 11th, 2011, 4:18 pm
Location: Oklahoma City

Remove time hour zero when using %r time

Post by JohnBurns »

Is there a way to remove the "0" in the hour when using %r time in a skin? I know %#I or %#H works but what do i do with %r? %#r does not seem to work. What's the trick? Appreciate any help. Thanks.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Remove time hour zero when using %r time

Post by jsmorley »

Code: Select all

[MeasureTime]
Measure=Time
Format=%r
RegExpSubstitute=1
Substitute="^0":""
^ Just means "beginning of the string" in Regular Expression.

Having said that, I'm not sure I see any advantage to %r over %#I:%M:%S %p to be honest.
User avatar
JohnBurns
Posts: 63
Joined: February 11th, 2011, 4:18 pm
Location: Oklahoma City

Re: Remove time hour zero when using %r time

Post by JohnBurns »

Thanks for the fast reply - appreciate your help and all your work in Rainmeter.
Post Reply