跳到主要內容

Sample contract · AUP cross-device · ARC 2.0.0-beta.28

`time` primitive

Show time values with partial document support; do not promise a live clock in static docs.

time is an AUP cross-device primitive, not a Web Device layout component and not a Web-only widget. It is one of the 18 names in AUP_PRIMITIVES and appears in every target's DeviceCaps.primitives map as native, webview, partial, or unsupported.

Contract

FieldValue
Primitive nametime
LayerAUP cross-device primitive (AUP_PRIMITIVES)
Public statusexperimental
Document capabilitypartial
Shared degradation chaintime → text (when unsupported)
Author entryAUP tree / DSL · generic Markdown ::time{…}
Document renderer / notesrenderer/primitives/time.ts (<time> element; clock mode snapshots at render)
Showcase evidenceblocklets/showcase-dsl/.aup/pages/time.aup

When to use

You need a semantic time value (formatted display, clock, countdown) on a supporting target.

When not to use

Do not claim a ticking live clock on the static document target. Document is partial: static snapshot only.

Sample contract

FieldValue
PurposeStatic <time> presentation on document (display mode)
BoundariesNo live clock promise on document; no picker session
Author entry::time{…}
SurfaceWeb Device document (partial)
Public statusexperimental
Fallback / failureMissing value → empty display; unsupported → text chain; clock mode is prerender snapshot
VerificationRoutes below · arc --version = 2.0.0-beta.28

Document sample (display mode)

Source:

markdown
::time{id="docs-prim-time-display" mode="display" value="2026-02-21T14:30:00Z"}

Rendered:

Accept interactive clock/countdown on Showcase time, not as a docs live ticker.

Failure and limits

SituationExpected result
mode="clock" on documentSnapshot at prerender/request time — not a continuous client ticker
Missing value in display modeEmpty / blank time text
Unsupported targetChain to text
Treating this as a date pickerOut of contract

Verification evidence

ItemValue
Baseline2026-08-09 · arc --version → 2.0.0-beta.28
Capability rowdocs/aup/capability-matrix.md (internal, non-routed) · time
Implementationrenderer/primitives/time.ts; caps partial in device-caps.ts
Public routes/en/docs/aup/primitives/time/ · /zh/docs/aup/primitives/time/
Local runarc service start --blocklet blocklets/arcblock --port 4900 · open routes; confirm static <time> text
AcceptDisplay sample shows formatted time; page states partial / no live clock

Evidence anchors

ItemValue
Registrypackages/aup/src/aup-types.ts · AUP_PRIMITIVES
Document capsproviders/runtime/web-device/src/device-caps.ts · DEVICE_CAPS_DOCUMENT
Degradationpackages/aup/src/degradation.ts · DEGRADATION_CHAINS
Internal matrixdocs/aup/capability-matrix.md (internal, non-routed)
Taxonomy hubPrimitive taxonomy and evidence
Sample contract rulesLive examples: scope and contract

Nearby pages