mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 10:49:36 +02:00
Patch.
Improves PHP code style normalisation to reduce inconsistency, refactors and simplifies some PHP code, slightly beautifies some CSS code.
This commit is contained in:
parent
a6ad438fc5
commit
40ecbd28d4
93 changed files with 986 additions and 1056 deletions
|
@ -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}";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue