[Znote AAC] Change months language

Discussion in 'Website Applications' started by Glombers, Dec 29, 2016.

Tags:
  1. Glombers

    Glombers Die

    Joined:
    May 14, 2016
    Messages:
    94
    Likes Received:
    18
    Best Answers:
    0
    Special thanks to @Znote for help
    PHP:
    1. function getClock($time = false, $format = false, $adjust = true) {
    2.     if ($time === false) $time = time();
    3.     // Date string representation
    4.     $date = "d F Y (H:i)"; // 15 July 2013 (13:50)
    5.     if ($adjust) $adjust = (1 * 3600); // Adjust to fit your timezone.
    6.     else $adjust = 0;
    7.     if ($format) {
    8.         $EnglishMonth = date("F", $time+$adjust);
    9.         // Will be translated to polish in switch statement
    10.         $PolishMonth = $EnglishMonth;
    11.         switch ($EnglishMonth) {
    12.             case 'January':
    13.                 $Polishmonth = "PolishJanuary";
    14.                 break;
    15.             case 'February':
    16.                 $Polishmonth = "PolishFebruary";
    17.                 break;
    18.             // And so on....
    19.             case 'December':
    20.                 $Polishmonth = "PolishDecember";
    21.                 break;
    22.         }
    23.         return str_replace($EnglishMonth, $Polishmonth, date($date, $time+$adjust));
    24.     }
    25.     else {
    26.         return $time+$adjust;
    27.     }
    28. }
     
  2. StreamSide

    StreamSide Joseluis Gonzalez

    Joined:
    Aug 31, 2007
    Messages:
    2,586
    Likes Received:
    512
    Best Answers:
    2
  3. Glombers

    Glombers Die

    Joined:
    May 14, 2016
    Messages:
    94
    Likes Received:
    18
    Best Answers:
    0
    what you have entered will not work here
     
  4. StreamSide

    StreamSide Joseluis Gonzalez

    Joined:
    Aug 31, 2007
    Messages:
    2,586
    Likes Received:
    512
    Best Answers:
    2
    lmao gl with it, btw it should work, but you do no effort
     
    Glombers likes this.
  5. Glombers

    Glombers Die

    Joined:
    May 14, 2016
    Messages:
    94
    Likes Received:
    18
    Best Answers:
    0

Share This Page

Loading...