0

Got a bit of an odd question. After creating a PHP script for a friend who lives in Germany, he has decided he needs the time/date in German format, an example being:

Montag, 16.März 2014

Is there a date/time function that can do this in PHP?

Any help much appreciated, Thanks!

GeordieDave1980
  • 589
  • 4
  • 11
  • 25

1 Answers1

4

Use strftime() and set the locale to German


Example

<?php
    setlocale(LC_ALL, "de_DE.utf8");
    echo strftime("%A, %e.%B %Y"); 
?>

Which would output: Donnerstag, 7.August 2014

Erlesand
  • 1,525
  • 12
  • 16