[FIXED] Working time issue when it is started on weekend #375
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now, it has when with more cases to consider the
startDateTime
Fixes #372
This pull request includes various updates and improvements to the Kotlin codebase. The changes focus on improving logging levels, correcting documentation, and enhancing the handling of working hours and dates.
Logging Improvements:
Log.i
toLog.w
insrc/main/kotlin/CodeSnippets.kt
andsrc/main/kotlin/Main.kt
to appropriately reflect the warning nature of the messages. [1] [2]Documentation Corrections:
src/main/kotlin/dev/hossain/githubstats/repository/PullRequestStatsRepoImpl.kt
from "use to review" to "user to review".Working Hours and Dates Handling:
src/main/kotlin/dev/hossain/time/DateTimeDiffer.kt
by adding conditions to handle non-working days and hours more accurately.IllegalArgumentException
if not, insrc/main/kotlin/dev/hossain/time/DateTimeDiffer.kt
.NEXT_NON_WORKING_HOUR_OR_SAME
adjuster insrc/main/kotlin/dev/hossain/time/TemporalsExtension.kt
.nextNonWorkingHour
insrc/main/kotlin/dev/hossain/time/ZonedDateTimeExtension.kt
to provide the next non-working hour for a given date-time, with detailed examples.This pull request includes several changes to improve logging, documentation, and functionality related to working hours calculations in Kotlin files. The most important changes are grouped by theme below:
Logging Improvements:
Log.i
toLog.w
for displaying disclaimers about review time insrc/main/kotlin/CodeSnippets.kt
andsrc/main/kotlin/Main.kt
. [1] [2]Documentation Enhancements:
PullRequestStatsRepoImpl
class by correcting a typo and adding more details to theworkingDuration
function inDateTimeDiffer.kt
. [1] [2]TemporalsExtension
andZonedDateTimeExtension
files to clarify the behavior of working hour calculations. [1] [2]Functionality Improvements:
DateTimeDiffer
object to handle weekends and non-working hours more accurately, including adding debug statements and handling edge cases.PullRequestStatsRepoTest
andDateTimeDifferTest
to verify the correct calculation of review times and working hours, particularly for scenarios involving weekends. [1] [2] [3]