Search by task, endpoint, field, or error.
Date API
An ISO date, validity, and Unix timestamp.
Pass a date the way a spreadsheet, a form, or a log wrote it. 2026-03-29, March 29, 2026, 29 Aug 2026, 3/29/2026, and 20260829 all come back as one clean answer: normalized ISO date, validity and Unix time. Deep adds calendar components, weekday, ISO week, quarter and leap-year detail. A leading weekday and an ISO time tail are ignored.
Junk answers valid: false as a 200, never a 404. Bare GET /date answers today in UTC.
Parse
Parameters 5
- datestring · path · required
The date as you have it
- formatstring · query · optional
mdy or dmy. Breaks the tie on numeric dates where both readings are real days (03/04/2026). Applies to to= as well
Values:
mdy, dmy- tostring · query · optional
Another date. Appends to (normalized ISO) and days (signed days between)
- langstring · query · optional
Display language as one BCP 47 tag, such as fr or zh-Hant. Changes supported display labels only; IDs, codes, native names, facts, parsing and deep access stay unchanged. Omit for the original response. Unsupported regions use the supported language base; unsupported languages or scripts use English. Missing labels retain their source value. Accept-Language is not read automatically. Available on the current API contract; frozen 1.0.0 is unchanged.
- deepboolean · query · optional
Calendar components, ISO week, quarter and leap-year detail. Included on every plan, with no additional charge.
import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI("YOUR_API_KEY");
const result = await parse.date("March 29, 2026");
console.log(result);Run on your server with a secret key. Calling from a browser or app?
{
"date": "2026-03-29",
"valid": true,
"unix": 1774742400
}import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI("YOUR_API_KEY");
const result = await parse.date("3/29/2026");
console.log(result);Run on your server with a secret key. Calling from a browser or app?
{
"date": "2026-03-29",
"valid": true,
"unix": 1774742400
}Response fields
- date
- The date as ISO YYYY-MM-DD, or the input echoed when it does not parse
- valid
- Resolves to one real calendar day. Ambiguous numeric dates answer false without ?format=
- unix
- Unix time at midnight UTC of that date, seconds
- to
- With ?to= only: the other date, normalized ISO
- days
- With ?to= only: signed days from the date to ?to=. Future positive, past negative
Never a guess
3/29/2026 resolves on its own, 29 cannot be a month. 03/04/2026 could be March 4th or April 3rd, so it answers valid: false until ?format=mdy or ?format=dmy asserts a reading. Two-digit years never resolve.
import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI("YOUR_API_KEY");
const result = await parse.date("03/04/2026");
console.log(result);Run on your server with a secret key. Calling from a browser or app?
{
"date": "03/04/2026",
"valid": false,
"unix": null
}Days between
Add ?to= with another date. The response appends to, normalized ISO, and days, signed, so a past date goes negative. Bare /date?to=2026-12-25 is days until Christmas.
import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI("YOUR_API_KEY");
const result = await parse.date("2026-08-29", { to: "2026-12-25" });
console.log(result);Run on your server with a secret key. Calling from a browser or app?
{
"date": "2026-08-29",
"valid": true,
"unix": 1787961600,
"to": "2026-12-25",
"days": 118
}Deep
?deep=true Calendar components, ISO week, quarter and leap-year detail. Included on every plan, with no additional charge.
import { parseAPI } from '@parseapi/sdk';
const parse = parseAPI("YOUR_API_KEY");
const result = await parse.date("March 29, 2026", { deep: true });
console.log(result);Run on your server with a secret key. Calling from a browser or app?
{
"date": "2026-03-29",
"valid": true,
"unix": 1774742400,
"deep": {
"year": 2026,
"month": 3,
"month_name": "March",
"day": 29,
"weekday": 7,
"weekday_name": "Sunday",
"week": 13,
"week_year": 2026,
"day_of_year": 88,
"quarter": 1,
"leap": false,
"days_in_month": 31
}
}Deep fields
- deep.year
- Year
- deep.month
- Month, 1 to 12
- deep.month_name
- English month name
- deep.day
- Day of month
- deep.weekday
- ISO weekday, Monday 1 to Sunday 7
- deep.weekday_name
- English weekday name
- deep.week
- ISO 8601 week number
- deep.week_year
- The year that ISO week belongs to. Differs from year around January 1
- deep.day_of_year
- Day of year, 1 to 366
- deep.quarter
- Quarter, 1 to 4
- deep.leap
- Whether the year is a leap year
- deep.days_in_month
- Days in that month
Display language
Pass lang with a language tag such as fr, pt-BR, or zh-Hant. Requested deep.month_name and deep.weekday_name, covering all 12 Gregorian months and 7 weekdays. Date parsing and formatted date strings stay unchanged.
Omitting lang preserves the original response. Codes, IDs, numeric facts and native-name fields stay unchanged. Missing translations keep their existing source value; unknown values stay null. A preserved name_local may equal the translated name.
Send a chosen browser preference explicitly, for example { lang: navigator.language } in your JavaScript SDK options. The API does not read Accept-Language automatically. Unsupported regions fall back to their supported base language; unsupported languages or scripts use English. Empty, invalid or repeated tags return 400.
Content-Language identifies languages used in translated display fields and known English fallbacks. This option follows the current API contract. Requests selecting frozen 1.0.0 retain that contract. Select API 2.0.0 to use display language.
41 display language choices
| Language tag | Language |
|---|---|
| en | American English |
| zh-Hans | 简体中文 |
| fr | français (France) |
| de | Deutsch |
| it | italiano |
| ja | 日本語 |
| ko | 한국어 |
| es | español de España |
| ar | العربية |
| bg | български |
| ca | català |
| hr | hrvatski |
| cs | čeština |
| da | dansk |
| nl | Nederlands |
| fi | suomi |
| el | Ελληνικά |
| he | עברית |
| hi | हिन्दी |
| hu | magyar |
| id | Indonesia |
| kk | қазақ тілі |
| ms | Melayu |
| nb | norsk bokmål |
| pl | polski |
| pt | português (Brasil) |
| ro | română |
| ru | русский |
| sk | slovenčina |
| sv | svenska |
| th | ไทย |
| tr | Türkçe |
| uk | українська |
| vi | Tiếng Việt |
| zh-Hant | 繁體中文 |
| en-AU | Australian English |
| en-GB | British English |
| fr-CA | français canadien |
| es-419 | español latinoamericano |
| pt-PT | português europeu |
| zh-Hant-HK | 繁體中文(中國香港特別行政區) |
Build with Date
All tutorials →Questions? Email