Skip to content

Latest commit

 

History

History
110 lines (86 loc) · 7.27 KB

File metadata and controls

110 lines (86 loc) · 7.27 KB

Dates-LE Logo

Dates-LE: Zero Hassle Date Extraction

Pull every date and timestamp out of the current file in one keystroke
JSON, YAML, CSV, XML, logs, HTML, JavaScript, and TypeScript

Install from Open VSX Install from VS Code Marketplace


Dates-LE Demo

What it does

Open a file, press Ctrl+Alt+D (Cmd+Alt+D on Mac), and every date in the document lands in a new editor — deduplicate, sort, analyze, convert, filter, or validate it from there. Works in VS Code and in VS Code–based editors like Cursor and VSCodium (installable from Open VSX).

  • Log analysis — timestamps from server logs: ISO, syslog, and Apache access-log formats
  • Data review — dates and epochs from JSON, YAML, CSV, and XML
  • Code audit — date literals and new Date()/Date.parse()/moment()/dayjs()/DateTime.fromISO() arguments in JS/TS, including calls formatted across multiple lines

Supported formats

Format Language IDs What gets extracted
JSON json Every recognized date pattern in the content
YAML yaml, yml Every recognized date pattern in the content
CSV csv Every recognized date pattern, cell by cell
XML xml Date patterns outside comments (inline and multiline comments are skipped)
Log / plain text log, plaintext Everything above plus YYYY-MM-DD HH:mm:ss log lines, syslog (Mon DD HH:mm:ss), and Apache access-log timestamps
JavaScript / TypeScript javascript, javascriptreact, typescript, typescriptreact Everything above plus string arguments to new Date(), Date.parse(), moment(), dayjs(), DateTime.fromISO()
HTML html Everything above plus datetime attributes, date-bearing <meta> tags, and JSON-LD datePublished/dateModified

Recognized date patterns: ISO 8601 (2024-01-15T10:30:00Z, with optional milliseconds and offset), RFC 2822 (Mon, 15 Jan 2024 10:30:00 GMT), Unix epochs (exactly 10 or 13 digits in a plausible range — digits embedded in longer numbers are never matched), UTC strings, US-style M/D/YYYY HH:mm:ss, and bare YYYY-MM-DD. Every occurrence is reported with its real line and column. Values that cannot be parsed to a timestamp are not extracted.

Known limitations: M/D/YYYY assumes US ordering; syslog lines carry no year, so the current year is assumed.

Commands

Command Description
Dates-LE: Extract Dates (Ctrl+Alt+D / Cmd+Alt+D) Extract all dates from the active document
Dates-LE: Analyze Dates Statistics, patterns, clusters, gaps, and anomalies
Dates-LE: Convert Dates Convert extracted dates to ISO, RFC 2822, Unix, UTC, local, simple, or a custom format
Dates-LE: Filter Dates Filter by range, format, duplicates, future/past
Dates-LE: Validate Dates Check extracted dates against selectable rules
Dates-LE: Deduplicate Dates Remove duplicate lines from the results
Dates-LE: Sort Dates Sort results chronologically or alphabetically
Dates-LE: Open Settings Open Dates-LE settings
Dates-LE: Help Built-in documentation

Settings

Setting Default Description
dates-le.openResultsSideBySide true Open results beside the current editor
dates-le.copyToClipboardEnabled false Also copy results to the clipboard
dates-le.notificationsLevel silent all = every notification, important = warnings + errors, silent = errors only
dates-le.safety.enabled true Guardrails for very large files
dates-le.safety.fileSizeWarnBytes 1000000 Refuse extraction above this file size
dates-le.statusBar.enabled true Show the status bar item
dates-le.telemetryEnabled false Local-only event log (see Privacy)

The settings UI is translated into 12 languages besides English.

Privacy & security

  • No network access. The extension never sends data anywhere. The telemetryEnabled setting only writes events to a local Output Channel you can inspect (Dates-LE Telemetry).
  • Error notifications redact home directories and credential-shaped fragments.

Development

bun install
bun run build            # esbuild bundle -> dist/extension.js
bun run typecheck        # tsc --noEmit (includes tests)
bun run test             # vitest unit suite
bun run test:integration # real VS Code extension host
bun run lint             # biome
bun run package          # VSIX into release/

Architecture and conventions live in AGENTS.md. Changes are tracked in CHANGELOG.md.

More from the LE Family

License

MIT © nolindnaidoo