snippet-phpfunctions
formatDate() - DE-/EU-version
date = now();
| Function | Description | Req. Type | Return Type | Result |
formatDate($date) |
Date w/o time | String or DateTime | String | 15.04.2026 |
formatDate($date, 1) |
Date w/ time | String or DateTime | String | 15.04.2026, 18:41 Uhr |
formatDate() - US-Version
date = now();
| Function | Description | Req. Type | Return Type | Result |
formatDate($date) |
Date w/o time | String or DateTime | String | 04/15/2026 |
formatDate($date, 1) |
Date w/ time | String or DateTime | String | 04/15/26 06:41 pm |
timeBetween() - EN-Version
date = '2025-12-05 13:44:31';
| Function | Description | Req. Type | Return Type | Result |
daysBetween($date) |
Days between $date and now PARSED AS text/string |
String or DateTime | String | (4 months ago) |
timeBetween() - DE-Version
date = '2025-12-05 13:44:31';
| Function | Description | Req. Type | Return Type | Result |
daysBetween($date) |
Days between $date and now PARSED AS text/string |
String or DateTime | String | (vor 4 Monaten) |
daysBetween()
date = '2020-04-07 19:24:11';
| Function | Description | Req. Type | Return Type | Result |
daysBetween($date) |
Days between $date and now |
String or DateTime | Integer | 2198 |