---
title: Date Objects
excerpt_separator: <!--more-->
---

FullCalendar's API exposes Date objects in many places such as [dateClick](dateClick) or a [View object's](view-object) `activeStart`/`activeEnd`.<!--more--> These Date objects are simply **native JavaScript Date objects!** Nothing fancy. For a comprehensive rundown of how to work with a Date object, [see MDN's documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date).

It's important to always remember that a Date object is merely a wrapper around a millisecond time since the Unix Epoch (Jan 1, 1970 UTC). The accessor methods on the Date object *interpret* this millisecond time differently for different time zones, but the underlying millisecond time will remain the same.

When your calendar's [timeZone](timeZone) is set to `'local'`, the local-flavored methods will be useful to you:

- `.getFullYear()`
- `.getMonth()`
- `.getDate()`
- `.getHours()`
- `.getMinutes()`
- `.getSeconds()`
- `.getMilliseconds()`
- `.toString()`

When your calendar's [timeZone](timeZone) is set to `'UTC'`, the UTC-flavored methods will be useful to you:

- `.getUTCFullYear()`
- `.getUTCMonth()`
- `.getUTCDate()`
- `.getUTCHours()`
- `.getUTCMinutes()`
- `.getUTCSeconds()`
- `.getUTCMilliseconds()`
- `.toUTCString()`

When your calendar's [timeZone](timeZone) is set to a named time zone like `"America/New_York"`, it's recommended to [use Temporal](timeZone#using-temporal) for resolution.


## Date Formatting

FullCalendar offers utilities to help you format these Date objects into strings:

- [formatDate](formatDate)
- [formatRange](formatRange)
- [Calendar::formatDate](Calendar-formatDate) (aware of current calendar's time zone)
- [Calendar::formatIso](Calendar-formatIso) (aware of current calendar's time zone)
- [Calendar::formatRange](Calendar-formatRange) (aware of current calendar's time zone)


## Date Manipulation

Operations such as computing how many days are between two dates, advancing a date 2 years into the future, and finding the first day of the week are all examples of date "manipulation" or date math. FullCalendar does not expose any date manipulation utilities to you.

If you need power, you are encouraged to use the [Temporal API](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal) via the `temporal-polyfill` package, which should already be installed in your project because FullCalendar depends on it as a peer dependency ([more information](temporal-polyfill)).
