hours: show only hours remaining until week goal for today's projected end time

This commit is contained in:
Josh Holtrop 2011-06-30 10:44:26 -04:00
parent e345fc1f7b
commit 2f6846e09e

9
hours
View File

@ -164,12 +164,13 @@ def main(argv):
if adj != 0.0:
sys.stdout.write(
' [%s%.1f]' % ('+' if adj > 0.0 else '', adj))
hours_to_do_today = min(goal_hours - total_hours, HOURS_PER_DAY)
if (iso_spec == now.strftime(ISO_DATE_FMT)
and hours < HOURS_PER_DAY):
sched_hours += HOURS_PER_DAY
sys.stdout.write(', %.1f at %s' % (HOURS_PER_DAY,
and hours < hours_to_do_today):
sched_hours += hours_to_do_today
sys.stdout.write(', %.1f at %s' % (hours_to_do_today,
fmt_time_dt(time[0] + timedelta(0,
int((HOURS_PER_DAY - adj) * 60 * 60)))))
(hours_to_do_today - adj) * 60 * 60))))
else:
sched_hours += hours
total_hours += hours