These docs are for an old release. Info on upgrading to v6
edit doc

formatDate

A utility function that formats a date into a string.

FullCalendar.formatDate( date, settings )

date can be a Date Object or something that will parse into a Date Object.

settings is an object that holds any of the date format config options. It also accepts the following additional properties:

  • locale — the name of a locale like 'es'
  • timeZone — the name of a time zone. Either 'local', 'UTC', or a named time zone

Example:

import { formatDate } from '@fullcalendar/core'

let str = formatDate('2018-09-01', {
  month: 'long',
  year: 'numeric',
  day: 'numeric',
  timeZoneName: 'short',
  timeZone: 'UTC',
  locale: 'es'
})

console.log(str) // "1 de septiembre de 2018 0:00 UTC"