Where do i find information regarding the Pattern need to get the week-day using IntlDateFormatter in PHP?

39 views Asked by At

I stumbled upon this solution for getting the week-day on my language but I am still trying to find information regarding the pattern needed to do it, as you can see the pattern is "EEEE" if i were to use date() it would be "l". When i tried with "l" i got a empty echoed string.

Can anyone help me?

<?php
setlocale(LC_ALL, 'pt_BR');
date_default_timezone_set('America/Bahia');
$formatter = new IntlDateFormatter('pt_BR',
    IntlDateFormatter::FULL,
    IntlDateFormatter::FULL,
    'America/Bahia',
    IntlDateFormatter::GREGORIAN, "EEEE");
echo $formatter->format(new DateTime("now"));

0

There are 0 answers