Bash - Convert Italian date in numeric format

Viewed 135

On my system, if I ask date for month I obtain:

$ date +%B
febbraio

in which "febbraio" is the Italian name for "february".

If I try to convert a date (with the Italian name for the month) to numeric format I obtain an error:

$ date -d "6 febbraio 2021" "+%d/%m/%Y"
date: data "6 febbraio 2021" non valida

which means that date is not valid.

If I change "febbraio" to "february", everything is ok:

$ date -d "6 february 2021" "+%d/%B/%Y"
06/febbraio/2021

Is it possible to convert to the numeric format a date in which the month is expressed in Italian?

0 Answers
Related