Functions

Display a user-friendly date

If you press Refresh at the moment in the web browser, the time will change constantly. The problem with this date is that the person does not understand what the date is. This is where the date() function comes into play, which requires two arguments: the date format and the timestamp.

07.12.2025 9:56

The date format added above contains the following formatting symbols:

  • d - date 01-31
  • m - as a month number 01-12
  • Y - four-digit year n: 2013
  • G - 24-hour hour format 0-23
  • i - minutes 0-59

If you don't add a timestamp, the current date and time will be used by default.

07.12.2025 9:56