Skip to content

Conversation

@skinny85
Copy link
Contributor

Turns out, parseFloat() in JavaScript is even crazier than we thought,
and returns nonsense like 2021 for a string containing a Date like '2021-10-25'.
For that reason, add an explicit check that the string parsed looks like a number before calling parseFloat().

Fixes #16444


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Sep 22, 2021

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Sep 22, 2021
Turns out, `parseFloat()` in JavaScript is even crazier than we thought,
and returns nonsense like `2021` for a string containing a Date like `'2021-10-25'`.
For that reason, add an explicit check that the string parsed looks like a number before calling `parseFloat()`.

Fixes aws#16444
@skinny85 skinny85 force-pushed the fix/cfn-diff-dates branch from 4d6c8aa to bc05dfc Compare October 6, 2021 22:19
@skinny85 skinny85 requested a review from rix0rrr October 6, 2021 22:19
@skinny85
Copy link
Contributor Author

skinny85 commented Oct 6, 2021

@rix0rrr incorporated your comments, would appreciate another pass!

@mergify
Copy link
Contributor

mergify bot commented Oct 19, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 953b149
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 86f2714 into aws:master Oct 19, 2021
@mergify
Copy link
Contributor

mergify bot commented Oct 19, 2021

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
Turns out, `parseFloat()` in JavaScript is even crazier than we thought,
and returns nonsense like `2021` for a string containing a Date like `'2021-10-25'`.
For that reason, add an explicit check that the string parsed looks like a number before calling `parseFloat()`.

Fixes aws#16444

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@skinny85 skinny85 deleted the fix/cfn-diff-dates branch August 12, 2022 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(cli): --hotswap does not detect function env variables changes

3 participants