date-format — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited date-format (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Formats dates using date-fns patterns. Supports relative time ("3 hours ago"), toggling between relative and absolute display, and auto-refreshing relative times.
import { DateFormat } from 'reablocks';| Prop | Type | Default | Description | |||
|---|---|---|---|---|---|---|
date | `Date \ | string \ | number \ | null` | — | The date to format |
format | string | 'MM/dd/yy hh:mm:ss a' | date-fns format string | |||
fromNow | boolean | — | Use relative time display | |||
addSuffix | boolean | true | Add suffix to relative time (e.g. "ago") | |||
includeSeconds | boolean | false | Include seconds in relative time | |||
allowToggle | boolean | false | Allow clicking to toggle relative/absolute | |||
cacheKey | string | — | localStorage key to persist user's toggle preference | |||
emptyMessage | string | 'N/A' | Displayed when date is null/undefined | |||
className | string | — | Additional CSS classes | |||
theme | DateFormatTheme | — | Per-instance theme override |
<DateFormat date={new Date()} /><DateFormat date={someDate} fromNow />
{/* Renders: "3 hours ago", "2 days ago", "now" (if < 30 seconds) */}Relative time auto-refreshes: every 60s for < 1 hour, every hour for < 1 day.
<DateFormat date={new Date()} fromNow allowToggle />
{/* Click to toggle between "2 minutes ago" and "04/15/26 02:30:00 PM" */}<DateFormat date="2022-05-25T16:03:12.2085" /><DateFormat date={null} /> {/* "N/A" */}
<DateFormat date={null} emptyMessage="No date" /> {/* "No date" */}interface DateFormatTheme {
base: string; // Base styles
interactive: string; // Styles when allowToggle is true (cursor-pointer, hover:underline)
}~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.