hours: draw `+' before positive adjustments

This commit is contained in:
Josh Holtrop 2011-06-30 10:11:37 -04:00
parent 71a2afefb2
commit fd768cf878

3
hours
View File

@ -159,7 +159,8 @@ def main(argv):
hours += adj
sys.stdout.write(' (%.1f hours)' % hours)
if adj != 0.0:
sys.stdout.write(' [%.1f]' % adjustments[iso_spec])
sys.stdout.write(
' [%s%.1f]' % ('+' if adj > 0.0 else '', adj))
if (iso_spec == now.strftime(ISO_DATE_FMT)
and hours < HOURS_PER_DAY):
sys.stdout.write(', %.1f at %s' % (HOURS_PER_DAY,