Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide LocalDate interpolator #446

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

twyatt
Copy link
Member

@twyatt twyatt commented Jan 7, 2025

No description provided.

@twyatt twyatt added the minor Changes that should bump the MINOR version number label Jan 7, 2025
@twyatt twyatt force-pushed the twyatt/LocalDate-interpolator branch from c5eac42 to cc097ea Compare January 7, 2025 19:01
@twyatt twyatt force-pushed the twyatt/LocalDate-interpolator branch from cc097ea to 952797f Compare January 7, 2025 21:15
private val range = stop.toEpochDays() - start.toEpochDays()

override fun interpolate(fraction: Float): LocalDate =
start + DatePeriod(days = (range * fraction).roundToInt())
Copy link
Member Author

@twyatt twyatt Jan 7, 2025

Choose a reason for hiding this comment

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

I wasn't sure if roundToInt (vs. just toInt) is the best approach here.

Copy link

github-actions bot commented Jan 7, 2025

Test Results

 62 files  ±0   62 suites  ±0   10s ⏱️ -6s
321 tests ±0  321 ✅ ±0  0 💤 ±0  0 ❌ ±0 
366 runs  ±0  366 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 952797f. ± Comparison against base commit 965ecf6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor Changes that should bump the MINOR version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant