如何将UNIX时间戳转换为格式化的日期标记?
不建议使用strftime
setlocale(LC_TIME, 'da_DK');
strftime('%B', time());我想用丹麦语打印这个月。Januar
发布于 2022-04-10 19:17:08
下面是一个使用IntlDateFormatter的示例
$format = new IntlDateFormatter('da-DK', IntlDateFormatter::NONE,
IntlDateFormatter::NONE, NULL, NULL, "MMMM");
$monthName = datefmt_format($format, time());
echo $monthName;https://stackoverflow.com/questions/71819679
复制相似问题