1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 10:49:36 +02:00
Improves PHP code style normalisation to reduce inconsistency, refactors
and simplifies some PHP code, slightly beautifies some CSS code.
This commit is contained in:
Caleb Mazalevskis 2017-09-16 16:40:55 +08:00
parent a6ad438fc5
commit 40ecbd28d4
93 changed files with 986 additions and 1056 deletions

View file

@ -1,13 +1,12 @@
<?php
class Main{
class Main {
/**
* receive a YYYY-MM-DD
* @param type $brDate
* @return String dd/mm/yyyy
*/
* receive a YYYY-MM-DD
* @param type $brDate
* @return String dd/mm/yyyy
*/
static public function dateMySQLToBrString($mySqlDate) {
$parts = explode("-", $mySqlDate);
$parts = explode('-', $mySqlDate);
//switch month and day
if (empty($parts[2])) {
return $mySqlDate;
@ -46,4 +45,4 @@ class Main{
return "{$year}-{$parts[1]}-{$parts[0]}{$hour}";
}
}
}
}