diff --git a/badgy b/badgy index 5311e66..13d26d8 100755 --- a/badgy +++ b/badgy @@ -68,20 +68,23 @@ getCapitalTime() st=$(date --date="${starts}" +'%s') ends=$(echo ${cl} | jq -rc ".end") echo - echo " $(date --date=${starts} +"%A %d %B %Y:")" - echo " Start: $(date --date=${starts} +'%H:%M')" + echo -n " $(date --date=${starts} +"%A %d %B %Y") " + echo -n "$(date --date=${starts} +'%H:%M') to " if [ "${ends}" != "null" ];then ed=$(date --date="${ends}" +'%s') - echo " End: $(date --date=${ends} +'%H:%M')" + echo -n "$(date --date=${ends} +'%H:%M')" else ed=$(date +'%s') - echo " End: running" + echo -n "....." fi - dr=$(( dr + (ed - st))) + timerCount="$((ed - st))" + echo -n " ($(s2h ${timerCount}))" + dr=$(( dr + timerCount)) done nbl=$(getNewBalance "${sl}" "${dr}") + echo echo echo "Your time balance is: ${sl}" echo "Today you worked: $(s2h ${dr})"