Apologies if the title is not clear, I' not really sure how to explain this clearly.
In a Rails app I'm pulling in users' data from a 3rd party provider's API. One of the attributes is the user's birthday.
I am storing the hashed data in my database and, in certain circumstances, need to display the user's birthday in the view.
The problem is that the birthday is not formatted as a Date. Within the hash, it is in the format mm/dd/yyyy. This means that my usual date scoped formats don't work on it.
Given that I am extracting the birthday from the hashed data column as follows
<%= @user.hashed_data["info"]["birthday"] %>
what is the best/ most efficient way to handle this so that I can display localized date formats?
Do I need to split on the /
symbols, and then recombine the resulting string to a date? Or am I overcomplicating this?
Thanks for any suggestions.