Skip to content

added solution#2674

Open
Skoulskiy wants to merge 1 commit into
mate-academy:masterfrom
Skoulskiy:develop
Open

added solution#2674
Skoulskiy wants to merge 1 commit into
mate-academy:masterfrom
Skoulskiy:develop

Conversation

@Skoulskiy

Copy link
Copy Markdown

No description provided.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Your solution is approved because it correctly implements all the required formatDate behavior: it parses the input date using the fromFormat separator, reorders the parts according to toFormat, changes separators when needed, and handles YY/YYYY conversions following the specified 20/19 rule and last-two-digits logic. The examples described in the task (changing only the separator, reordering components, and converting between YYYY and YY in both directions) are all handled by your current implementation.

One minor point for future improvement: your code assumes the separator is always at a fixed index in the format arrays, which is fine for this task but slightly reduces flexibility if the format array structure ever changes. A more robust approach would be to derive the separator from the last element of the format arrays (e.g., fromFormat[fromFormat.length - 1]). Overall, the core requirements are met, there are no functional blockers, and your implementation is clear and aligned with the specification—nice work.


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

Footnotes

  1. Rate AI review example

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