[fix] Use API to get month and year. Fixes #5244.