feel free to keep it strictly simple...

lib_lepton::datetools

Lepton date_tools in deep:

 

new method "formatWithMySQL" e.g.

lib_lepton :: datetools

Some formatting examples

  1. $oDT = lib_lepton::getToolInstance("datetools");
  2. echo $oDT->formatWithMySQL("\Am\ %W, \den\ %e. %M %Y\, um\ %k:%i \Uhr\.", time(), "de");
  3. echo $oDT->formatWithMySQL("\Le\ %W %e %M %Y\, nous irons dans un musée à\ %k \h %i.", time(), "fr");
  4. echo $oDT->formatWithMySQL("l, jS F, Y", time(), "en_GB");

see: https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_date-format

last edit: 11. Sep 2022 CEST 14:32:38

Output

  1. Am Sonntag, den 11. September 2022, um 13:52 Uhr.
  2. Le dimanche 11 septembre 2022, nous irons dans un musée à 13 h 52.
  3. Sunday, 11th September, 2022
last edit: 11. Sep 2022 CEST 14:23:03