Skip to content

Conversation

@oroth8
Copy link
Contributor

@oroth8 oroth8 commented Aug 24, 2022

Items Addressed

feature request

  • Adds better error handling for invalid dates using the Date and DateTime parsers
  • Decanter::ValueFormatError '(invalid (Date/DateTime) value for format'

@oroth8 oroth8 requested a review from chawes13 as a code owner August 24, 2022 15:05
@oroth8 oroth8 self-assigned this Aug 24, 2022
@oroth8 oroth8 marked this pull request as draft August 24, 2022 15:06
@oroth8 oroth8 marked this pull request as ready for review August 24, 2022 16:27
Copy link
Contributor

@chawes13 chawes13 left a comment

Choose a reason for hiding this comment

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

Can you bump the version number as well?

@oroth8
Copy link
Contributor Author

oroth8 commented Dec 14, 2022

Can you bump the version number as well?

bumped the minor version number

@oroth8 oroth8 requested a review from chawes13 December 14, 2022 00:50
Copy link
Contributor

@chawes13 chawes13 left a comment

Choose a reason for hiding this comment

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

Sorry for the radio silence 📻 🫣. A few comments regarding some design choices, but overall super close!

@oroth8 oroth8 requested a review from nicoledow April 7, 2025 16:41
Copy link
Contributor

@nicoledow nicoledow left a comment

Choose a reason for hiding this comment

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

Sorry for the wait on this. I thought there were changes requested, but I was mistaken!

This looks and works great, just left a couple minor questions.

@@ -1,3 +1,3 @@
module Decanter
VERSION = '5.0.0'.freeze
VERSION = '5.1.0'.freeze
Copy link
Contributor

Choose a reason for hiding this comment

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

The latest from main may need to be pulled in here - we're at 5.1.0 now so this can be bumped up to 5.2.0


parser do |val, options|
next if (val.nil? || val === '')
raise Decanter::ParseError, 'Expects a single value' if val.is_a? Array
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this line can be removed since this parser inherits from ValueParser, which raises an error if the value is an array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Return Decanter Exception when there are formatting errors in :date parser

4 participants