{"uid":"cap_1sv0MMrVzBxw6BlLyQnek","slug":"locale-and-formatting-tools-format-date-time-66782e48","name":"Locale and Formatting Tools – Format Date/Time","description":"Show an instant in an IANA timezone and locale with full/long/medium/short styles; DST-aware, with UTC offset.","url":"https://locale-tools.x402tookit.com/format-date?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["date"],"properties":{"date":{"type":"string","description":"ISO 8601 (2024-01-15T12:00:00Z; no zone means UTC) or epoch milliseconds, up to 40 characters"},"locale":{"type":"string","description":"BCP47 tag such as en-US, de-DE, ja-JP (default en-US)"},"timeZone":{"type":"string","description":"IANA zone such as America/New_York or Asia/Kolkata (default UTC, up to 60 characters)"},"dateStyle":{"type":"string","description":"full, long, medium (default) or short"},"timeStyle":{"type":"string","description":"Optional full, long, medium or short to include the time"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"parts":{"type":["array","null"],"items":{"type":"object","properties":{"type":{"type":["null","string"]},"value":{"type":["null","string"]}}}},"locale":{"type":["null","string"]},"source":{"type":["null","string"]},"epochMs":{"type":["null","number"]},"reasons":{"type":["array","null"]},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"calendar":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"timeZone":{"type":["null","string"]},"formatted":{"type":["null","string"]},"utcOffset":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"icuVersion":{"type":["null","string"]},"instantUtc":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"cldrVersion":{"type":["null","string"]},"resolvedLocale":{"type":["null","string"]},"unicodeVersion":{"type":["null","string"]},"numberingSystem":{"type":["null","string"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_V2YXVa2TtroYQm09HCGCJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Formats a date/time instant into a localized, DST-aware string for a given IANA timezone, BCP47 locale, and date/time style.","exampleAgentPrompt":"Format the timestamp 2024-06-15T14:30:00Z as a full-style date and long-style time in the America/Chicago timezone using the fr-FR locale.","exampleUseCases":[{"title":"Localized event time for global users","prompt":"I have an event at 2025-03-20T18:00:00Z — can you show that as a full date and full time in the Europe/Berlin timezone using de-DE formatting?"},{"title":"Receipts with local date display","prompt":"Format the order timestamp 1718459400000 (epoch ms) as a medium-style date with short time in Asia/Tokyo timezone for a Japanese customer, using the ja-JP locale."},{"title":"Scheduling assistant time display","prompt":"What does 2024-11-05T09:00:00Z look like as a long-style date in the America/Los_Angeles timezone for an en-US user — and what's the UTC offset at that moment given DST?"}],"resultDescription":"Returns a formatted date/time string for the requested locale and timezone, along with the resolved locale, IANA timezone, UTC offset, epoch milliseconds, calendar system, numbering system, CLDR/ICU/Unicode versions, and a degraded flag if fallback formatting was used.","failureModes":["Invalid or unrecognized IANA timezone returns an error or falls back to UTC with degraded=true","Malformed ISO 8601 or out-of-range epoch value returns a parsing error","Unknown BCP47 locale tag may fall back to en-US with degraded=true","Date string longer than 40 characters is rejected","Timezone string longer than 60 characters is rejected"],"whenToPreferThis":"Use this endpoint when you need a fully localized, DST-aware date/time string for a specific IANA timezone and BCP47 locale — especially when you need the UTC offset, calendar system metadata, or CLDR version alongside the formatted output. Prefer this over manual string formatting when serving international users who require culturally correct date presentation.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T12:30:44.849Z","isFirstParty":false,"canonicalSlug":"locale-and-formatting-tools-format-date-time-66782e48"}