"01", "feb"=>"02", "mar"=>"03", "apr"=>"04", "may"=>"05", "jun"=>"06", "jul"=>"07", "aug"=>"08", "sep"=>"09", "oct"=>"10", "nov"=>"11", "dec"=>"12"); //月数字(0サプレスあり)→月略称 $monnam = array( "1"=>"jan", "2"=>"feb", "3"=>"mar", "4"=>"apr", "5"=>"may", "6"=>"jun", "7"=>"jul", "8"=>"aug", "9"=>"sep", "10"=>"oct", "11"=>"nov", "12"=>"dec"); //月数字(0サプレスなし)→月略称 $monname = array( "01"=>"jan", "02"=>"feb", "03"=>"mar", "04"=>"apr", "05"=>"may", "06"=>"jun", "07"=>"jul", "08"=>"aug", "09"=>"sep", "10"=>"oct", "11"=>"nov", "12"=>"dec"); //曜日の名称対応表 $weektbl = array( "Sun"=>"日", "Mon"=>"月", "Tue"=>"火", "Wed"=>"水", "Thu"=>"木", "Fri"=>"金", "Sat"=>"土"); //日付の降順となるような比較関数 function cmp_date_desc($a, $b) { $astr = ""; $bstr = ""; /* if(strlen($a) < 23 || strlen($b) < 23) { $astr = $a; $bstr = $b; } else { */ if(substr($a,0,1) == "C"){ $astr = substr($a, 2, 8); }else{ $astr = substr($a, 1, 8); } if(substr($b,0,1) == "C"){ $bstr = substr($b, 2, 8); }else{ $bstr = substr($b, 1, 8); } // } if($astr == $bstr) { return 0; } return ($astr > $bstr) ? -1 : 1; } //日付の降順となるような比較関数 function cmp_date_dir($a, $b) { $astr = ""; $bstr = ""; /* if(strlen($a) < 23 || strlen($b) < 23) { $astr = $a; $bstr = $b; } */ if(strlen($a) > 11 || strlen($b) > 11){ $astr = substr($a, -2, 2); $bstr = substr($b, -2, 2); } else { } if($astr == $bstr) { return 0; } return ($astr > $bstr) ? -1 : 1; } ?> $bstr) ? -1 : 1; } //日付と連番の降順となるような比較関数 function cmp_daynumber_desc($a, $b) { $astr = ""; $bstr = ""; /* if(strlen($a) < 23 || strlen($b) < 23) { $astr = $a; $bstr = $b; } else { */ if(substr($a,0,1) == "C"){ $astr = substr($a, 8, 2); $astr .= substr($a, 15, 3); }else{ $astr = substr($a, 7, 2); $astr .= substr($a, 20, 3); } if(substr($b,0,1) == "C"){ $bstr = substr($a, 8, 2); $bstr .= substr($a, 15, 3); }else{ $bstr = substr($a, 7, 2); $bstr .= substr($a, 20, 3); } // } if($astr == $bstr) { return 0; } return ($astr > $bstr) ? -1 : 1; } //連番の昇順となるような比較関数 function cmp_number_asc($a, $b) { $astr = ""; $bstr = ""; /* if(strlen($a) <= 10) { $astr = $a; $bstr = $b; } else { */ if(substr($a,0,1) == "C"){ $astr = substr($a, 15, 3); }else{ $astr = substr($a, 20, 3); } if(substr($b,0,1) == "C"){ $bstr = substr($b, 15, 3); }else{ $bstr = substr($b, 20, 3); } // } if($astr == $bstr) { return 0; } return ($astr < $bstr) ? -1 : 1; } ?> ニュース ジャンル別インデックス
KYOTO SHIMBUN
[INDEX]










12月の記事

[INDEX]