I'm wanting show the Date in Japanese in this format:
2010年2月18日(木)
which translates to:
February 18, 2010 (Thu)
in PHP
can anyone help? Thanks
I'm wanting show the Date in Japanese in this format:
2010年2月18日(木)
which translates to:
February 18, 2010 (Thu)
in PHP
can anyone help? Thanks
The easiest and most pragmatic way is probably to create a wrapper function around the date function:
function date_japan() {
echo date('Y') . '年 ' . date('m') . '月 ' . date('d') . '日';
}
This is the code I have:
function date_japan() {
$dy = date("w");
$dys = array("日","月","火","水","木","金","土");
$dyj = $dys[$dy];
echo date('Y') . '年 ' . date('m') . '月 ' . date('d') . '日' . '(' . $dyj . ')';
}
date_japan();
Any improvements would be much appreciated. Thanks.