Leftpad minutes with 0

This commit is contained in:
Nick Bisby 2019-03-18 19:43:02 -05:00
parent e6062661dd
commit c088ce14ac
No known key found for this signature in database
GPG Key ID: F6E0C4E6D0B5EB36
2 changed files with 2 additions and 1 deletions

View File

@ -71,7 +71,7 @@ function getEndTime() as string
meridian = "PM"
end if
return Substitute("{0}:{1} {2}", stri(hours).trim(), stri(date.getMinutes()).trim(), meridian)
return Substitute("{0}:{1} {2}", stri(hours).trim(), leftPad(stri(date.getMinutes()).trim(), "0", 2), meridian)
end function
sub setFavoriteColor()

View File

@ -32,6 +32,7 @@
<interface>
<field id="itemContent" type="node" onChange="itemContentChanged" />
</interface>
<script type="text/brightscript" uri="pkg:/source/HelperUtils.brs" />
<script type="text/brightscript" uri="pkg:/components/movies/details.brs" />
<script type="text/brightscript">
<![CDATA[