Fix: make date format year consistent overall #1712#1726
Fix: make date format year consistent overall #1712#1726zachgoll merged 6 commits intomaybe-finance:mainfrom
Conversation
zachgoll
left a comment
There was a problem hiding this comment.
Thanks for tackling this!
There are a few more spots in the codebase where these date formats are used. I think this may be a good time to consolidate some of these and centralize so that changes like these can be quicker (i.e. referencing a helper method for all of the import forms that use these date formats)
Using
It's adding more formats [ "D/MM/YYYY", "%e/%m/%Y" ], [ "YYYY.MM.DD", "%Y.%m.%d" ], Is it fine having these 2 as well in these? |
|
Also, Should we have required both in HTML attributes and also in the attributes section as well. |
|
@scodes73 looking better! The I think the last step here is to consolidate that list of formats that we have in class Family < ApplicationRecord
DATE_FORMATS = [
[ "MM-DD-YYYY", "%m-%d-%Y" ],
[ "DD.MM.YYYY", "%d.%m.%Y" ],
[ "DD-MM-YYYY", "%d-%m-%Y" ],
[ "YYYY-MM-DD", "%Y-%m-%d" ],
[ "DD/MM/YYYY", "%d/%m/%Y" ],
[ "YYYY/MM/DD", "%Y/%m/%d" ],
[ "MM/DD/YYYY", "%m/%d/%Y" ],
[ "D/MM/YYYY", "%e/%m/%Y" ],
[ "YYYY.MM.DD", "%Y.%m.%d" ]
].freeze
endThen, in our forms, we can use |
Done, let me know of any more changes. Thank you for guiding me thoroughly :) |
zachgoll
left a comment
There was a problem hiding this comment.
Looks good! Thanks for tackling this!
|
@scodes73 looks like we have a few tests failing for |
But it marks the variable as unused, I could always change it to individual labels if you want me to |
Now reverting to the previous state of individual translations |



Fixes simple year formatting, making it consistent everywhere


Fixes : https://github.com/maybe-finance/maybe/issues/1712
Before:
After: