8.5. oos_date_short (Datums Formatierung)

Formatiert Datum und Uhrzeit in das definierte 'strftime()'-Format.

Beispiel 8.7. oos_date_short aus ~/templates/oos/products/products_new.html

  
    
      {$oos_products_new_array[i].date_added|oos_date_long}

      AUSGABE: Samstag, 17. Juli 2004
    
    

Beispiel 8.8. Konvertierungs Spezifikation von DATE_FORMAT_SHORT

  
    
      /* ~/shop/includes/languages/deu.php */
      define('DATE_FORMAT_SHORT', '%d.%m.%Y');  // this is used for strftime()

      %d - Tag des Monats als Zahl (Bereich 00 bis 31)

      %m - Monat als Zahl (Bereich 01 bis 12)

      %Y - Jahr als 4-stellige-Zahl inklusive des Jahrhunderts

      ANMERKUNG:
      Erhalten Sie das Datum in einem falschen Format, ändern Sie setlocale

      ~/shop/includes/languages/deu.php
      @setlocale(LC_TIME, 'de_DE@euro');

      Ein Testscript:
      <?php
          /* versuche verschiedene mögliche locale Namen für Deutsch */
          $loc_de = setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
          echo "Preferred locale for german on this system is '$loc_de'";
      ?>