← Docs

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

GET
api.parseapi.com/date/{date}
Normalized ISO date, validity and Unix time
Explore
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.

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

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?

Example response
{
  "date": "2026-03-29",
  "valid": true,
  "unix": 1774742400
}

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

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?

Example response
{
  "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.

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

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?

Example response
{
  "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.

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

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?

Example response
{
  "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.

Run uses the free demo on API 2.0.0. Copied code uses your API key when signed in, or YOUR_API_KEY when signed out.

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?

Example response
{
  "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.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 tagLanguage
enAmerican English
zh-Hans简体中文
frfrançais (France)
deDeutsch
ititaliano
ja日本語
ko한국어
esespañol de España
arالعربية
bgбългарски
cacatalà
hrhrvatski
csčeština
dadansk
nlNederlands
fisuomi
elΕλληνικά
heעברית
hiहिन्दी
humagyar
idIndonesia
kkқазақ тілі
msMelayu
nbnorsk bokmål
plpolski
ptportuguês (Brasil)
roromână
ruрусский
skslovenčina
svsvenska
thไทย
trTürkçe
ukукраїнська
viTiếng Việt
zh-Hant繁體中文
en-AUAustralian English
en-GBBritish English
fr-CAfrançais canadien
es-419español latinoamericano
pt-PTportuguês europeu
zh-Hant-HK繁體中文(中國香港特別行政區)

Build with Date

All tutorials →

Questions? Email