UNPKG

@leafygreen-ui/date-utils

Version:
8 lines (6 loc) 231 B
import { setUTCMonth } from '../setUTCMonth'; export const addMonthsUTC = (date: Date, months: number): Date => { const utcMonth = date.getUTCMonth(); const newDate = setUTCMonth(date, utcMonth + months); return newDate; };