Skip to content

[Beam] Implement missing DateTimeOffset members, add DateOnly and TimeOnly#4479

Merged
dbrattli merged 4 commits intomainfrom
beam-datetimeoffset
Apr 3, 2026
Merged

[Beam] Implement missing DateTimeOffset members, add DateOnly and TimeOnly#4479
dbrattli merged 4 commits intomainfrom
beam-datetimeoffset

Conversation

@dbrattli
Copy link
Copy Markdown
Collaborator

@dbrattli dbrattli commented Apr 2, 2026

Summary

Port the Python DateTimeOffset/DateOnly/TimeOnly work from #4477 to the Beam target:

  • DateOnly: New fable_date_only.erl runtime module and Beam Replacements — constructors, properties (Year/Month/Day/DayOfWeek/DayOfYear/DayNumber), Add methods, ToString, Parse, FromDateTime, MinValue/MaxValue
  • TimeOnly: New fable_time_only.erl runtime module and Beam Replacements — constructors, properties (Hour/Minute/Second/Millisecond/Ticks), Add/AddHours/AddMinutes, IsBetween, ToTimeSpan, ToString, Parse, MinValue/MaxValue
  • DateTimeOffset: Extended fable_date_offset.erl with missing members — Add/Subtract/AddYears/AddMonths/AddDays/AddHours/AddMinutes/AddSeconds/AddMilliseconds/AddTicks, op_Addition/op_Subtraction, Compare/CompareTo/Equals/EqualsExact, FromUnixTimeSeconds/Milliseconds, ToUnixTimeSeconds/Milliseconds, DayOfWeek/DayOfYear, Date/TimeOfDay, UtcTicks/TotalOffsetMinutes, LocalDateTime/UtcDateTime, ToOffset, MaxValue/UnixEpoch, DateOnly+TimeOnly constructor

Test plan

  • All 2351 Beam tests pass (0 failures)
  • New DateOnly tests (10 tests)
  • New TimeOnly tests (8 tests)
  • Expanded DateTimeOffset tests (from 7 to 40+ tests)
  • dotnet build src/Fable.Cli succeeds

🤖 Generated with Claude Code

dbrattli and others added 4 commits April 3, 2026 01:07
…eOnly

Port the Python DateTimeOffset/DateOnly/TimeOnly work from #4477 to the
Beam target.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dbrattli dbrattli merged commit 1e9df07 into main Apr 3, 2026
23 checks passed
@dbrattli dbrattli deleted the beam-datetimeoffset branch April 3, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant