Skip to content

Conversation

@minichma
Copy link
Collaborator

Make some relevant functions public, including

  • CalendarEvent.EffectiveDuration
  • Duration.ToTimeSpanUnspecified()
  • Duration.ToTimeSpan()
  • Duration.FromTimeSpanExact()

Relates to the conversation in #606 (comment).

@codecov
Copy link

codecov bot commented Feb 15, 2025

Codecov Report

Attention: Patch coverage is 83.33333% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Ical.Net/CalendarComponents/CalendarEvent.cs 78% 1 Missing and 1 partial ⚠️

❌ Your project status has failed because the head coverage (66%) is below the target coverage (80%). You can increase the head coverage or adjust the target coverage.

Impacted file tree graph

@@         Coverage Diff         @@
##           main   #733   +/-   ##
===================================
  Coverage    66%    66%           
===================================
  Files       103    103           
  Lines      4644   4645    +1     
  Branches   1152   1152           
===================================
+ Hits       3064   3065    +1     
  Misses     1144   1144           
  Partials    436    436           
Files with missing lines Coverage Δ
Ical.Net/DataTypes/CalDateTime.cs 90% <100%> (ø)
Ical.Net/DataTypes/Duration.cs 77% <100%> (+<1%) ⬆️
Ical.Net/Evaluation/EventEvaluator.cs 88% <100%> (ø)
Ical.Net/CalendarComponents/CalendarEvent.cs 74% <78%> (ø)

@minichma minichma force-pushed the work/minichma/effectiveduration_public branch from 664e1aa to e13dcbe Compare February 15, 2025 23:29
@minichma minichma marked this pull request as ready for review February 15, 2025 23:29
@sonarqubecloud
Copy link

@minichma minichma requested a review from axunonb February 15, 2025 23:30
/// To convert a duration to a <see cref="TimeSpan"/> while considering the days and weeks as
/// nominal durations, use <see cref="ToTimeSpan"/>.
/// </remarks>
public TimeSpan ToTimeSpanUnspecified()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yep, this was a missing part, agree.

Copy link
Collaborator

@axunonb axunonb left a comment

Choose a reason for hiding this comment

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

This all makes sense, very good

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.

3 participants