# formatDates

> FullCalendar v1 documentation, for an old release. Web version: https://legacy.fullcalendar.io/v1/formatDates
>
> Latest version (v7): https://fullcalendar.io/docs/formatRange.md

Formats a date range (two Date objects) into a string.

<div class='spec' markdown='1'>
$.fullCalendar.formatDates( *date1*, *date2*, *formatString* [, *options* ] ) -> String
</div>

`formatDates` uses all the commands from [formatDate](https://legacy.fullcalendar.io/v1/formatDate.md), but with two special forms:

`{...}`
:   switches to formatting the 2nd date

`[...]`
:   only displays the enclosed format if the current date is different from the alternate date in the same regards
