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

Fixed a bug in date/time conversion when special input is used. #54

Merged
merged 2 commits into from
Aug 24, 2024

Conversation

yui10
Copy link
Contributor

@yui10 yui10 commented Aug 20, 2024

Added error handling for special input in date/time conversion.

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • New feature or enhancement
  • UI change (please include screenshot!)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Internationalization and localization
  • Other (please describe):

What is the current behavior?

Issue Number: DevToys-app/DevToys#1349

What is the new behavior?

  • Added error handling to DateHelper.cs. If an error occurs, return the original value.
  • Change Convert.ToInt32 to int.TryParse and process the error.

Other information

Translated by DeepL

Quality check

Before creating this PR:

  • Did you follow the code style guideline as described in CONTRIBUTING.md
  • Did you build the app and test your changes?
  • Did you check for accessibility? On Windows, you can use Accessibility Insights for this.
  • Did you verify that the change work in Release build configuration
  • Did you verify that all unit tests pass
  • If necessary and if possible, did you verify your changes on:
    • Windows
    • macOS
    • Linux

@veler
Copy link
Collaborator

veler commented Aug 24, 2024

Hi,
This is awesome, thank you !

@veler veler merged commit 34f21ac into DevToys-app:main Aug 24, 2024
3 checks passed
@yui10 yui10 deleted the BugFix-DateConverter branch September 4, 2024 09:50
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