Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Datum des 3. $wochentag in Monat+1

Empfohlene Antworten

Veröffentlicht

Huhu,

ich steh grad ma wieder aufm Schlauch *gg*

Ich hab ein fixes Datum, sagen wir den 9.7.2007.

Wochentag ist Montag, der 2. Montag im Juli.

Gibts irgendwie ne sinnvolle Formel die ich verwenden kann um herauszufinden welches Datum der entsprechende 2. Montag im August (Also Monat+1) hat?

gruß

Jan

jo brauche das allgemein

hab das in php gelöst bekommen:

    $basedate = mktime();

$day_of_week = date('w',$basedate); // wochentag von heute

$day_count_index = date('j',$basedate) % 7; // wievielter $wochentag in diesem monat?

$first_next_month = date('w',mktime(0,0,0,date('n',$basedate)+$offset,1,date('Y',$basedate)));

if ( $first_next_month == 1 ) $day_count_index--;
$result = ($day_of_week - $first_next_month) + (7*$day_count_index);
echo strftime('%d.%m.%Y',mktime(0,0,0,date('n',$basedate)+$offset,$result+1,date('Y',$basedate)));[/PHP]

Vorteil von PHP: kann der alles schon:

$day_of_week = date('w',$basedate);

trotzdem danke :)

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.