Skip to content

Instantly share code, notes, and snippets.

@rodrigoea
Created October 2, 2014 17:28
Show Gist options
  • Save rodrigoea/5cedebdc9e0ffb928b21 to your computer and use it in GitHub Desktop.
Save rodrigoea/5cedebdc9e0ffb928b21 to your computer and use it in GitHub Desktop.
Show current date in PHP (Portuguese)
class myDate{
var $myDate;
function theDate ()
{
setlocale (LC_ALL, 'pt_BR');
$this->myDate = strftime ("%A, %d de %B de %Y");
return $this->myDate;
}
}
$showDate = new myDate;
echo $showDate->theDate();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment