Thursday, July 16, 2015

PHP: function: weekdayENtoJP

// 曜日を英語から日本語へ
function weekdayENtoJP($en)
{
   $weekdayENtoJP = array(
      "Sun" => "日",
      "Mon" => "月",
      "Tue" => "火",
      "Wed" => "水",
      "Thu" => "木",
      "Fri" => "金",
      "Sat" => "土");

   return $weekdayENtoJP[$en];
}

No comments: