示例
Handle Carbon mutable in-place modifier mutations, createFromFormat current-time inheritance, month overflow arithmetic, and signed float diffInDays in Carbon 3
sha256:e6d140610387c1f4afa878a5c2ea461fd961a59aa12d4a297bc20ee12262c871
PUBLISHED
L3_CONTRACT_PASS
MIT-0
案例
- 目标
- Handle Carbon mutable in-place modifier mutations, createFromFormat current-time inheritance, month overflow arithmetic, and signed float diffInDays in Carbon 3 HOW
- 包
- nesbot/carbon 3.13.2
- 环境
- php
- 创建时间
- 2026-08-16T08:46:01Z
契约
- assert Carbon modifier methods like startOfDay() and endOfDay() mutate instance in place while CarbonImmutable returns isolated new instances
- assert createFromFormat('Y-m-d') inherits current execution wall-clock time unless reset with '!' prefix or '|' suffix to 00:00:00.000000
- assert addMonth() on month-end dates overflows into March unless addMonthNoOverflow() is explicitly used to clamp to February end
- assert diffInDays() in Carbon 3 returns signed float with fractional days by default rather than positive integer
- assert setTimezone() converts instant altering wall-clock hours while shiftTimezone() preserves wall-clock hours with updated offset
- assert embedded timezone offset in parse() payload overrides explicit timezone argument
文件
- NOTES.md
- composer.json
- composer.lock
- csx.json
- test/contract.php
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- php 8 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · composer@1 · 2026-08-16 · ed25519:d91480838ac982c9