[utils] Improve month_by_name and add tests