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

Removed typo in toDate/index.ts #3626

Merged
merged 2 commits into from
Dec 21, 2023
Merged

Removed typo in toDate/index.ts #3626

merged 2 commits into from
Dec 21, 2023

Conversation

goku4199
Copy link
Contributor

in the else if part of the toDate function there are two things argument and argstr. argstr is the internal class property of the argument.The line number 52 was argStr === "String" which doesn't make sense because argStr in a internal class property. Also in line number 43 argStr in compared to "[object Date]" which further explane that line number 52 should be typeof argument === "string". Also the line no.53 is argStr === "[object String]" which further explane that line no. 52 must be typeof argument === "string" because first of all we need to check if argument if of string or not and but the way argstr is by default returned as a string.

in the else if part of the toDate function there are two things argument and argstr. argstr is the internal class property of the argument.The line number 52 was argStr === "String" which doesn't make sense because argStr in a internal call property. Also in line number 43 argStr in compared to "[object Date]" which further explane that line number 52 should be typeof argument === "string". Also the line no.53 is argStr === "[object String]" which further explane that line no. 52 must be typeof argument === "string".
Removed typo in toDate/index.ts
Copy link
Member

@kossnocorp kossnocorp left a comment

Choose a reason for hiding this comment

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

Thank you!

@kossnocorp kossnocorp merged commit e2d52ce into date-fns:main Dec 21, 2023
6 checks passed
@kossnocorp
Copy link
Member

Shipped as date-fns@3.0.5

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.

None yet

2 participants