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

Add support for #booking_datetime and #value_datetime #60

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

danielpuglisi
Copy link
Contributor

I just stumbled upon a camt.053 statement that had a booking datetime value instead of a booking date.

This PR adds support for Entry#booking_datetime and Entry#value_datetime while also returning nil for Entry#booking_date and Entry#value_date if these attributes are empty. This makes it possible to simply check for nil when otherwise Date.parse(nil) would have thrown an ArgumentError.

For example:

booking_date = entry.date || entry.datetime&.to_date

@tobischo
Copy link
Member

tobischo commented Jul 6, 2023

Hi @danielpuglisi, thank you for the contribution.

I will take another look hopefully in the next few days, but it seems reasonable

@tobischo tobischo merged commit 31a9615 into viafintech:master Jul 27, 2023
4 checks passed
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