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 | 10.04.2026 |
formatDate($date, 1) |
Date w/ time | String or DateTime | String | 10.04.2026, 00:09 Uhr |
formatDate() - US-Version
date = now();
| Function | Description | Req. Type | Return Type | Result |
formatDate($date) |
Date w/o time | String or DateTime | String | 04/10/2026 |
formatDate($date, 1) |
Date w/ time | String or DateTime | String | 04/10/26 12:09 am |
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 | 2193 |