Fix for when earliest and/or last date are year-only

Change-Id: I38185eb56317732313e463178589827a36156082