xxxxxxxxxx
import { addYears, formatWithOptions } from 'date-fns/fp'
import { eo } from 'date-fns/locale'
const addFiveYears = addYears(5)
const dateToString = formatWithOptions({ locale: eo }, 'D MMMM YYYY')
const dates = [
new Date(2017, 0, 1),
new Date(2017, 1, 11),
new Date(2017, 6, 2)
]
const toUpper = arg => String(arg).toUpperCase()
const formattedDates = dates.map(addFiveYears).map(dateToString).map(toUpper)
//=> ['1 JANUARO 2022', '11 FEBRUARO 2022', '2 JULIO 2022']