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.

[PHP] Datumsstring prüfen

Empfohlene Antworten

ich glaube ich leide gerade unter amnesie.... ^^

wie kann ich am besten einen Datumsstring darauf prüfen, ob es sich um ein wirkliches datum handelt ?

ich hatte irgendwie in erinnerung das mktime() einen Fehler ausgibt, wenn da was nicht stimmt....aber meine Tests zeigen das dem nicht so ist.

Ausgangsdatum: 41.30.2006

split: Array ( [0] => 41 [1] => 30 [2] => 2006 )

time: 1215727200

re-date: 11.07.2008

mktime gibt dann irgendein Datum aus.

mit Preg_match kann ich die zusammensetzung prüfen, aber nicht ob es an sich gültig ist. Da aber die Datenbank das hinterher in einem Timestamp speichert hab ich dann zum Teil 0000-00-00 in dem Feld stehen.

Ganz schlecht, weil ich mit dem Feld eingrenze, welche Funktionalität wann freigeschaltet ist.

jemand eine Idee / erleuchtung für mich ?

Hi,

PHP: checkdate - Manual

Gruß Jaraz

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.