CodeSampleX

示例

Show that DateTime.local treats a first object argument as options rather than calendar units and requires positional date components.

sha256:10f99ac67c186a7b35b30645c13de8d8089833efb1b4792bddeebae8b4818817

PUBLISHED L3_CONTRACT_PASS MIT-0

案例

目标
Show that DateTime.local treats a first object argument as options rather than calendar units and requires positional date components. HOW
luxon 3.7.2
环境
node
创建时间
2026-08-17T03:17:27Z

常见的想当然

A caller can create a local calendar date with `DateTime.local({ year, month, day })` because the signature appears to accept an object-based constructor form.

这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。

契约

文件

下载已验证的构件 (tar.gz) — 契约实际运行的那些字节

原始种子者

csx-seed

验证回执