サンプル
chrono 0.4.45: Build and add to dates with chrono 0.4 without the deprecated constructors, and know when month arithmetic clamps
検証済みサンプル — cargo chrono 0.4.45: Build and add to dates with chrono 0.4 without the deprecated constructors, and know when month arithmetic clamps. rust 1 …
sha256:bb53a07e8a52f98a3d5f6b3a0c79b1070e860b17949e852a6e2f2c015657ec3f
このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。
合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。
MIT-0
実行証拠
宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。
- 証拠の基準
- 署名済みコントラクト合格
- 検証レシート
- 1
- ビルドした署名鍵
- 1
宣言された環境
rust 1 linux x64 rust 1 rust cargo
検証実行環境
| 環境 | コントラクト | ステージ | 実行日 |
|---|---|---|---|
| rust 1 · linux alpine/x64 · docker ed25519:a2ec939a4c60e243 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · cargo@1 |
2026-08-14 |
ケース
HOW- ゴール
- Build and add to dates with chrono 0.4 without the deprecated constructors, and know when month arithmetic clamps
- パッケージ
- シンボル
-
- DateTime::from_timestamp
- NaiveDate::from_ymd_opt
- NaiveDateTime::and_utc
- NaiveDate::checked_add_months
- 環境
- rust 1
- 作成日
- 2026-08-14T19:26:30Z
コントラクト
- assert DateTime::from_timestamp returns None out of range instead of panicking
- assert an impossible civil date is None and parsing refuses it
- assert and_utc converts a naive value to DateTime<Utc>
- assert month arithmetic clamps to the end of the month while day arithmetic does not
- assert adding one month twice differs from adding two months
ファイル
- Cargo.lock
- Cargo.toml
- csx.json
- src/main.rs