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

made the method getSalaryInfo #1381

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sokoligor29
Copy link

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Your implementation in SalaryInfo.java is well-structured and meets all the task requirements! 🎉 The logic for calculating salaries and handling dates is correct, and you've used efficient practices like StringBuilder and System.lineSeparator(). While there are suggestions for simplifying the date comparison logic for better readability, these are minor improvements and do not impact the functionality. Keep up the great work, and consider those suggestions for future enhancements! 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

Comment on lines +50 to +51
if (year < fromYear || (year == fromYear && (month < fromMonth
|| (month == fromMonth && day < fromDay)))) {

Choose a reason for hiding this comment

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

The condition for checking if the date is before the dateFrom could be simplified for better readability. Consider using a single return statement for both conditions.

Comment on lines +55 to +56
if (year > toYear || (year == toYear && (month > toMonth
|| (month == toMonth && day > toDay)))) {

Choose a reason for hiding this comment

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

Similarly, the condition for checking if the date is after the dateTo could be simplified. Consider using a single return statement for both conditions.

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.

2 participants