Rosenmontag berechnen...

Alles, was PHP betrifft, kann hier besprochen werden.

Rosenmontag berechnen...

Postby pepebe » 13. May 2005 14:53

Stehe irgendwie auf dem Schlauch...

Rosenmontag ist ein beweglicher Feiertag und liegt 48 Tage vor Ostern.
Frage: Wie erhalte ich das Datum Y.m.d?
pepebe
 
Posts: 12
Joined: 07. February 2005 19:59

Postby Wiedmann » 13. May 2005 15:38

Code: Select all
<?php
    $jahr = 2005;
    $ostersonntag = easter_date($jahr);
    $rosenmontag = strtotime('-48 days', $ostersonntag);
    echo date('Y-m-d', $rosenmontag);
?>
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to PHP

Who is online

Users browsing this forum: No registered users and 28 guests