How the Date Formatter Works
AnyTool Date Formatter takes a single instant and renders it many ways from one Date object. It first parses the input flexibly: the word “now” snaps to the current moment; a pure integer is treated as a Unix timestamp (seconds for ≤11 digits, milliseconds for 12 or more); slash- or dash-separated numbers are resolved as US (month-first) or European (day-first) by inspecting which part exceeds 12; and anything else falls back to the native Date constructor, which accepts ISO 8601 and RFC 2822. From that Date it produces ISO 8601 (UTC via toISOString and local-offset via tokens), RFC 2822 (toUTCString), US and European slashes, Unix seconds and milliseconds, a localized long form, a relative phrase, the weekday, the ISO week number and the ordinal day of the year. All of this is pure client-side JavaScript.
- Flexible parser: ISO 8601, US, European, RFC 2822, Unix and “now”
- Integer inputs auto-detected as Unix seconds or milliseconds
- US vs European resolved by which date part is greater than 12
- Thirteen formats generated from one Date, each independently copyable
- Runs entirely in the browser — no server round-trip
