ady624 / CoRE

CoRE - Community's own Rule Engine
GNU General Public License v3.0
222 stars 663 forks source link

Display single digit minutes as 0x, not just x #17

Closed Toy4Rick closed 8 years ago

Toy4Rick commented 8 years ago

When using $minutes as a variable, the displayed result for a 2 digit minute is 26, or 31 for example. When it's a single digit like 6 mins, it shows just as 6. There is a space preceding the first digit where it would normally show the leading 0, it should show as 06.

Current hr:min 8: 6 Desired hr:min 8:06

Thanks, Rick

ady624 commented 8 years ago

This could create trouble for those who don't need the padding. I created the $time and $time24 variables instead. Will look into ways to "format" variables, as proposed here https://community.smartthings.com/t/core-and-piston-rules-engine-first-design-steps/46546/2484?u=ady624