I am having problems to get a localized date on Django templates.
I have this in my config file:
LOCALE_NAME ='es_VE'
LANGUAGE_CODE = 'es-ve'
TIME_ZONE = 'America/Caracas'
USE_I18N = True
USE_L10N = True
USE_TZ = True
The date I want to render is : mydate=2016-03-21 23:59:59.999999-04:30
This code {{mydate|date:"d/m/Y"}}
shows "21/03/2016"
and this one {{mydate|localize}}
shows "22 de Marzo de 2016 a las 04:29" (22/03/2016).
I want to get the result of the localize filter using the date's filter format.
Is there a way to achieve that?
If I understand correctly, you want a localized custom date format. Django's documentation has something for you: Creating custom format files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With