rundiz / thai-date
Display date in Thai language use PHP date() and strftime()
2.1.2
2024-12-10 07:33 UTC
Requires
- php: >=5.3.0
README
Display date in Thai by using same PHP date() and strftime() function attributes.
Tested up to PHP 8.5.
echo thaidate('วันlที่ j F พ.ศ.Y เวลาH:i:s'); // results: วันพฤหัสบดีที่ 12 พฤศจิกายน พ.ศ.2558 เวลา18:55:29
echo sprintf(thaistrftime('%%s%A%%s %d %B %%s%Y %%s%H:%M:%S'), 'วัน', 'ที่', 'พ.ศ.', 'เวลา'); // results: วันพฤหัสบดีที่ 12 พฤศจิกายน พ.ศ.2558 เวลา18:56:06
echo sprintf(intlDate('cccc\'%1$s\' d MMMM Gyyyy \'%2$s\'H:mm:ss'), 'ที่', 'เวลา'); // results: วันพฤหัสบดีที่ 12 พฤศจิกายน พ.ศ.2558 เวลา18:56:06
For more details, please look in tests folder