I am working on a problem where date must be converted to the desired format. And if the format is yyyy/MMM/dd then the month should be converted to the language which is fetched from db. eg. For 2021-01-12 the desired format is yyyy/MMM/dd and desired language is Spanish.
I have tried:
'2021-01-12' as :date{format :'yyyy-MM-dd', locale :'es'} as :string{format : 'yyyy/MMM/dd'}
As well as :
`2021-01-12' as :date{format :`yyyy-MM-dd`} as :string{format : `yyyy/MMM/dd' ,locale :'es'}
The output must be 2021/ene/12 but everytime I am getting is 2021/Jan/12.