10
I need to convert the number of the month to the name of the same, but it has to be in Portuguese (and preferably without the need to substr
)
I can do this with the standard English language
$monthNum = 3;
$dateObj = DateTime::createFromFormat('!m', $monthNum);
$monthName = $dateObj->format('F');
echo substr($monthName, 0, 3);
// output Mar
There is a way to modify the language type to en-Br to use this function?
I don’t want to create a array()
containing all the months already abbreviated and in Portuguese. I want a solution in-built
This might help, http://answall.com/questions/8317/como-fazer-a-fun%C3%A7%C3%A3o-date-formatar-uma-data-em-portugu%C3%Aas
– rray
I’m sorry, this is the first time I’ve asked a question in this ER. If I did wrong, please put a comment so I can correct, only vote negatively does not help improve the question.
– Michel Ayres
@lost maybe help, searched the site before creating the question and found nothing. I was looking for something directly related to the title I created.
– Michel Ayres