@ 2015-04-13T20:30:06Z <?php
date_default_timezone_set('America/Sao_Paulo');
$datestring = '';
$monthago = '';
$monthsago = '';
$period = new DatePeriod(
new DateTime('-3 months'),
DateInterval::createFromDateString('first day of next month'),
new DateTime('NOW')
);
$months = array();
foreach ($period as $p)
$months[] = strftime('%B', $p->getTimestamp());
if($months == "January"){
$months = "Janeiro";
if ($months[3] == "Janeiro") {
$datestring = '0115';
}
if ($months[2] == "Janeiro") {
$lastmonth = "0115";
}
if ($months[1] == "Janeiro") {
$monthsago = "0115";
}
}elseif($months == "February"){
$months = "Fevereiro";
if ($months[3] == "Fevereiro") {
$datestring = "0215";
}
if ($months[2] == "Fevereiro") {
$lastmonth = "0215";
}
if ($months[1] == "Fevereiro") {
$monthsago = "0215";
}
}elseif($months == "March"){
$months = "Mar����¯�¿�½���¯���¿���½������¯������¿������½����¯�¿�½���¯���¿���½����¯�¿�½������§o";
if ($months[3] == "Mar����¯�¿�½���¯���¿���½������¯������¿������½����¯�¿�½���¯���¿���½����¯�¿�½������§o") {
$datestring = "0315";
}
if ($months[2] == "Mar����¯�¿�½���¯���¿���½������¯������¿������½����¯�¿�½���¯���¿���½����¯�¿�½������§o") {
$lastmonth = "0315";
}
if ($months[1] == "Mar����¯�¿�½���¯���¿���½������¯������¿������½����¯�¿�½���¯���¿���½����¯�¿�½������§o") {
$monthsago = "0315";
}
}elseif(array_search("April",$months) >= 1){
$months = str_replace("April","Abril",$months);
if ($months[3] == "Abril") {
$datestring = "0415";
}
if ($months[2] == "Abril") {
$lastmonth = "0415";
}
if ($months[1] == "Abril") {
$monthsago = "0415";
}
}elseif($months == "May"){
$months = "Maio";
if ($months[3] == "Maio") {
$datestring = "0515";
}
if ($months[2] == "Maio") {
$lastmonth = "0515";
}
if ($months[1] == "Maio") {
$monthsago = "0515";
}
}elseif($months == "June"){
$months = "Junho";
if ($months[3] == "Junho") {
$datestring = "0615";
}
if ($months[2] == "Junho") {
$lastmonth = "0615";
}
if ($months[1] == "Junho") {
$monthsago = "0615";
}
}elseif($months == "July"){
$months = "Julho";
if ($months[3] == "Julho") {
$datestring = "0715";
}
if ($months[2] == "Julho") {
$lastmonth = "0715";
}
if ($months[1] == "Julho") {
$monthsago = "0715";
}
}elseif($months == "August"){
$months = "Agosto";
if ($months[3] == "Agosto") {
$datestring = "0815";
}
if ($months[2] == "Agosto") {
$lastmonth = "0815";
}
if ($months[1] == "Agosto") {
$monthsago = "0815";
}
}elseif($months == "September"){
$months = "Setembro";
if ($months[3] == "Setembro") {
$datestring = "0915";
}
if ($months[2] == "Setembro") {
$lastmonth = "0915";
}
if ($months[1] == "Setembro") {
$monthsago = "0915";
}
}elseif($months == "October"){
$months = "Outubro";
if ($months[3] == "Outubro") {
$datestring = "1015";
}
if ($months[2] == "Outubro") {
$lastmonth = "1015";
}
if ($months[1] == "Outubro") {
$monthsago = "1015";
}
}elseif($months == "November"){
$months = "Novembro";
if ($months[3] == "Novembro") {
$datestring = "1115";
}
if ($months[2] == "Novembro") {
$lastmonth = "1115";
}
if ($months[1] == "Novembro") {
$monthsago = "1115";
}
}elseif($months == "December"){
$months = "Dezembro";
if ($months[3] == "Dezembro") {
$datestring = "1215";
}
if ($months[2] == "Dezembro") {
$lastmonth = "1215";
}
if ($months[1] == "Dezembro") {
$monthsago = "1215";
}
}
echo $months[3].$datestring;
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 Deprecated: Function strftime() is deprecated in /in/npZtd on line 18
Deprecated: Function strftime() is deprecated in /in/npZtd on line 18
Deprecated: Function strftime() is deprecated in /in/npZtd on line 18
Deprecated: Function strftime() is deprecated in /in/npZtd on line 18
Abril0415 Output for 5.3.4 - 5.3.29 , 5.4.0 - 5.4.39 , 5.5.25 - 5.5.29 , 5.5.34 , 5.6.8 - 5.6.14 , 5.6.20 , 5.6.28 , 7.0.5 , 7.0.14 - 7.0.20 , 7.1.0 - 7.1.33 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 Abril0415 Output for 5.3.0 - 5.3.3 , 5.5.24 , 5.5.35 , 5.6.21 , 7.0.6 May Output for 5.5.31 - 5.5.33 , 5.6.15 - 5.6.19 , 7.0.0 - 7.0.4 March Output for 5.5.30 Notice: Undefined offset: 3 in /in/npZtd on line 193
Output for 5.4.45 September Output for 5.4.40 - 5.4.44 August Output for 5.1.0 - 5.1.6 , 5.2.0 - 5.2.17 Fatal error: Class 'DatePeriod' not found in /in/npZtd on line 9
Process exited with code 255 . Output for 5.0.0 - 5.0.5 Fatal error: Call to undefined function date_default_timezone_set() in /in/npZtd on line 3
Process exited with code 255 . Output for 4.4.5 - 4.4.9 Fatal error: Call to undefined function: date_default_timezone_set() in /in/npZtd on line 3
Process exited with code 255 . Output for 4.3.2 - 4.3.11 , 4.4.0 - 4.4.4 Fatal error: Call to undefined function: date_default_timezone_set() in /in/npZtd on line 3
Process exited with code 255 . Output for 4.3.0 - 4.3.1 Fatal error: Call to undefined function: date_default_timezone_set() in /in/npZtd on line 3
preferences:dark mode live preview
240.81 ms | 401 KiB | 342 Q