Skip to content

[ical4j 4.x] Unify helpers / deduplicate#262

Merged
cketti merged 4 commits intoical4j-3to4from
260-ical4j-4x-unify-helpers-deduplicate
Mar 26, 2026
Merged

[ical4j 4.x] Unify helpers / deduplicate#262
cketti merged 4 commits intoical4j-3to4from
260-ical4j-4x-unify-helpers-deduplicate

Conversation

@cketti
Copy link
Copy Markdown
Contributor

@cketti cketti commented Mar 25, 2026

  • Use the more generic Temporal.toLocalDate() from TimeApiExtensions instead of Instant.toLocalDate() from DateUtils.
  • Use Temporal.toTimestamp() from AndroidTemporalMapper instead of Temporal.toEpochMilli() from DateUtils. The former one retains ical4j's old behavior when it comes to converting floating DATE and DATE-TIME values to a timestamp.
  • Move AndroidTemporalMapper from the calendar package to a more generic util package since it's not exclusively used by the calendar code.

cketti added 3 commits March 25, 2026 17:21
Use the more generic `Temporal.toLocalDate()` from `TimeApiExtensions` instead.
Use `Temporal.toTimestamp()` from `AndroidTemporalMapper` instead. This function retains ical4j's old behavior when it comes to converting floating DATE and DATE-TIME values to a timestamp.
Move the class to a more generic package since it's not exclusively used by the calendar code.
@cketti cketti linked an issue Mar 25, 2026 that may be closed by this pull request
@cketti cketti added the refactoring Quality improvement of existing functions label Mar 25, 2026
@cketti cketti marked this pull request as ready for review March 25, 2026 16:39
Copy link
Copy Markdown
Member

@ArnyminerZ ArnyminerZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some comments

@cketti cketti merged commit 2cf7553 into ical4j-3to4 Mar 26, 2026
3 checks passed
@cketti cketti deleted the 260-ical4j-4x-unify-helpers-deduplicate branch March 26, 2026 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Quality improvement of existing functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ical4j 4.x] Unify helpers / deduplicate

2 participants