I have date collected like PartialDate if date is complete, date is in english format ('yyyy-mm-dd') in my template I would like to convert this date into french format but considering the date can be partial
if only year is known, I would like to see 2019 if only year and month areknown, I would like to see 10/2019 (convert 2019-10 to 10/2019) and if the date is complete, I would like to see 16/10/2019 (convert 2019-10-16 to 16/10/2019)
I tried to add some logic in my template
{% if participante.pat_nai_dat|length_is:"4" %}
//do something
{% elif participante.pat_nai_dat|length_is:"7" %}
//do something
{% else %}
{{ participante.pat_nai_dat|date:"d/m/Y" }}
{% endif %}
but length_is and date filtesr do not work with PartialDate object I've read Django documentation to for more appropriate filter but did not find any my approach is probably wrong... how can I do this?