我有以下代码,用于获取某个日期的月份名称,然后用于获取希伯来语月份的名称。
$thismonthname = date("F", mktime(0, 0, 0, $thismonthnumber, 10));
date_default_timezone_set('Asia/Tel_Aviv'); // Set timezone to Israel
$locale = 'he_IL.utf8'; setlocale(LC_ALL, $locale); // Set Locale to Hebrew
$thismonthnameheb = strftime('%B', strtotime($thismonthname));
它工作得很好,除了二月。
当我打印出 $thismonthname 时,它会显示“二月”,但是当我打印出 $thismonthnameheb 时,它会在希伯来语中显示 מרץ(三月)。
疯了,我想不通。