Merge pull request #259 from brianclinkenbeard/patch-1

padding for when seconds == 0
This commit is contained in:
James Barnsley
2018-03-02 08:07:43 +13:00
committed by GitHub

View File

@ -27,7 +27,7 @@ export default class Dater extends React.Component{
// get left-over number of seconds
seconds = total_seconds - (total_minutes * 60 )
if (seconds <= 9) seconds = '0'+ seconds
if (seconds == 0) seconds = '0'
if (seconds == 0) seconds = '00'
// get left-over number of minutes
minutes = total_minutes - (total_hours * 60 )
@ -118,4 +118,4 @@ export default class Dater extends React.Component{
return <span className="dater">{ this.calculate() }</span>
}
}
}
}