Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
Boa Noite, preciso descobrir como faço pro dia da semana aparecer em Português e não em inglês como está mostrando. O sistema não foi eu quem fiz, por isso está tão complicado, abaixo segue o link do site que é mostrado o dia da semana. logo apos o código que eu acredito que isso é feito.
http://www.jackrockbar.com.br/programacao/
function DateToDb($text){
$data = explode('/', $text);
return sprintf("%.4d-%.2d-%.2d", $data[2], $data[1], $data[0]);
}
function utf8_strlen($str){
return mb_strlen($str, "UTF-8");
}
function utf8_substr_replace($str, $repl, $start , $length = NULL ) {
preg_match_all('/./us', $str, $ar);
preg_match_all('/./us', $repl, $rar);
if( $length === NULL ) {
$length = utf8_strlen($str);
}
array_splice( $ar[0], $start, $length, $rar[0] );
return join('',$ar[0]);
}
function utf8_strtolower($str){
return mb_strtolower($str, "UTF-8");
}
function utf8_strtoupper($str){
return mb_strtoupper($str, "UTF-8");
}
function real_ucwords($word){
#// Note: [\x0c\x09\x0b\x0a\x0d\x20] matches;
#// form feeds, horizontal tabs, vertical tabs, linefeeds and carriage returns
#// This corresponds to the definition of a "word" defined at [http://www.php.net/ucwords](http://www.php.net/ucwords)
#
return mb_convert_case($word, MB_CASE_TITLE, "UTF-8");
}
function my_urlencode($data){
return str_replace('+', '-', urlencode($data));
}
function CheckData($date, $against = false){
$ret = preg_match('@([0-9]{2})\/([0-9]{2})\/([0-9]{4})@', $date);
if ($ret){
list($dia, $mes, $ano) = explode('/', $date);
if ($dia > 31 || $dia < 1 || $mes < 1 || $mes > 12 || $ano < 1910){
$ret = NULL;
}
if ($against){
$agora_ano = date('Y');
$agora_mes = date('m');
$agora_dia = date('d');
$ret = TRUE;
if ((int)$ano < (int)$agora_ano){
$ret = NULL;
} else if ((int)$mes < (int)$agora_mes){
$ret = NULL;
} else if ((int)$mes == (int)$agora_mes && (int)$dia < (int)$agora_dia){
$ret = NULL;
}
}
} else {
$ret = NULL;
}
return $ret;
}
Acredito que seja umas dessas funções que fazem isso.
Carregando comentários...