Handle years and months better on output

fixes the bug raised by @flynfish on my fix for #16