jaimesanz / paguen_po

Web App to manage Expenses with Roommates
https://paguenpo.cl/
GNU General Public License v3.0
1 stars 0 forks source link

Date formats are hardcoded #14

Open jaimesanz opened 8 years ago

jaimesanz commented 8 years ago

Dates related to userIsOut instances appear as "%Y-%m-%d" in both edit and create forms. Furthermore, this format is hardcoded in settings.py (DATE_FORMAT) to match the format given in static/js/jquery.ui.datepicker-es.js. This format is also wrong (at least in Chile) and should be "%d-%m-%Y".

The "wrong" format is hardcoded so that the following will match:

Because of this, if the format is changed, the tests won't pass, since django prints dates in this format. Can this be changed? Ie, is it posible to match jqueryUI datepicker, datetime's strptime and the way python prints dates with no harcoding involved? Is this posible using just the magic of locale?