---
title: "Date and Interval Routines"
canonical: "https://support.appfire.com/space/PSCONF/15302955/Date%20and%20Interval%20Routines"
format: markdown
---
> Macro (aura-html)

> Macro (excerpt)
> 
> This section contains routines that enable users to deal with dates.

## Routines Summary

- [addMonths](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303167) — Adds a number of months to a specified date, preserving the day of month where possible.
- [currentDate](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303169) — Returns the current date.
- [day](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303207) — Returns a number representing the day of month: 1-31.
- [dayOfWeek](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303217) — Returns the day of week.
- [endOfMonth](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303186) — Returns a date set on the last day of the month for the given date. Also sets hours/minutes/seconds/milliseconds to their respective maximum value.
- [formatDate](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303198) — Formats the given date into a date/time string accordingly to the given format expression.
- [hour](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303241) — Returns the hour of the provided date: 0-23.
- [millisToDate](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303243) — Converts milliseconds to a date.
- [millisToInterval](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303245) — Converts milliseconds to a time interval.
- [minute](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303256) — Returns the minutes of the provided date: 0-59.
- [month](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303235) — Returns a number representing the month of the provided date (1-12).
- [monthName](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303237) — Returns the month name of the provided date.
- [parseDate](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303239) — Returns the parsed date according to the format you provided. If parse fails, it will return a null date.
- [second](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15302827) — Returns the seconds of the provided date: 0-59.
- [startOfDay](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15302829) — Returns a date, but strips off the hours, minutes and seconds.
- [startOfMonth](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15302831) — Returns a date set on the first day of the month for the given date. Also sets hours/minutes/seconds to 0.
- [toDate](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303401) — Creates a date value from the specified parameters.
- [toJiraDateFormat](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303424) — Displays the given date using Jira format.
- [toRawWorkingInterval](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303426) — Returns a date interval converted to the specified number of hours per day.
- [toTimeZone](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303435) — Converts a date to the specified time zone.
- [week](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303411) — Returns the week number in the year of the provided date.
- [year](https://appfire.atlassian.net/wiki/spaces/PSCONF/pages/15303420) — Returns the year of the provided date.