PHPカレンダーを改修

カレンダーの祝日データを、2017年〜2020年分追加しました。ついでに、少し改修。


calendar303.php

デザイン変更。日曜始まり。曜日文字を大文字英字にしています。下部ボタンを修飾。

今回の改修箇所

  • 日曜始まり/月曜始まりの指定(calendar303.phpの20行目)
    PHPプログラムソース上での定数指定で、日曜始まりと月曜始まりの切り替え可能に。
  • 上部曜日の表示文字指定(同15〜18行目、18行目で指定)
    曜日の文字を「日.月.火…」、「SUN.MON.TUE…」、「sun.mon.tue…」から選択可能に。
  • 半休日の指定(同19行)
    沢田内科医院のように、土曜日だけでなく水曜日と金曜日も、午後休診の意味で、背景色を「緑色」としたいような場合に備えて、配列で曜日の背景色を設定可能に。
  • 祝祭日の情報を2017年〜2020年分追加(同139〜212行)
  • デザイン変更
    CSS3変更で、見た目を変えたものを作ってみました。

PHPプログラムソースはこちら

<?php
session_cache_limiter('private_no_expire');
session_start(); //ページの最初に呼び出す
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<title>カレンダー</title>
<meta charset="UTF-8">
&lt;link rel="stylesheet" href="./calendar303.css"&gt;</p>

<p>&lt;?php
$h_start_year = 2010;
$h_end_year = 2020;
$day_week_jp = array("日", "月", "火", "水","木","金","土","日");
$day_week_en = array("SUN", "MON", "TUE", "WED","THU","FRI","SAT","SUN");
$day_week_ens = array("sun", "mon", "tue", "wed","thu","fri","sat","sun");
$day_week = $day_week_en;   // 曜日の表示形式を指定(上記のいずれかを指定)
$day_week_class = array("yobi y_red", "yobi y_blue", "yobi y_blue", "yobi y_blue","yobi y_blue","yobi y_blue","yobi y_green","yobi y_red");     // 背景色を指定(日,月,火・・・土,日)
$day_week_start = 0;        // 0:日曜始まり、1:月曜始まり
$holidays = array(
"20100101" =&gt; "元日",
"20100111" =&gt; "成人の日",
"20100211" =&gt; "建国記念の日",
"20100321" =&gt; "春分の日",
"20100322" =&gt; "振替休日",
"20100429" =&gt; "昭和の日",
"20100503" =&gt; "憲法記念日",
"20100504" =&gt; "みどりの日",
"20100505" =&gt; "こどもの日",
"20100719" =&gt; "海の日",
"20100920" =&gt; "敬老の日",
"20100923" =&gt; "秋分の日",
"20101011" =&gt; "体育の日",
"20101103" =&gt; "文化の日",
"20101123" =&gt; "勤労感謝の日",
"20101223" =&gt; "天皇誕生日",
"20101224" =&gt; "振替休日",
"20110101" =&gt; "元日",
"20110110" =&gt; "成人の日",
"20110211" =&gt; "建国記念の日",
"20110321" =&gt; "春分の日",
"20110429" =&gt; "昭和の日",
"20110503" =&gt; "憲法記念日",
"20110504" =&gt; "みどりの日",
"20110505" =&gt; "こどもの日",
"20110718" =&gt; "海の日",
"20110919" =&gt; "敬老の日",
"20110923" =&gt; "秋分の日",
"20111010" =&gt; "体育の日",
"20111103" =&gt; "文化の日",
"20111123" =&gt; "勤労感謝の日",
"20111223" =&gt; "天皇誕生日",
"20120101" =&gt; "元日",
"20120102" =&gt; "振替休日",
"20120109" =&gt; "成人の日",
"20120211" =&gt; "建国記念の日",
"20120320" =&gt; "春分の日",
"20120429" =&gt; "昭和の日",
"20120430" =&gt; "振替休日",
"20120503" =&gt; "憲法記念日",
"20120504" =&gt; "みどりの日",
"20120505" =&gt; "こどもの日",
"20120716" =&gt; "海の日",
"20120917" =&gt; "敬老の日",
"20120922" =&gt; "秋分の日",
"20121008" =&gt; "体育の日",
"20121103" =&gt; "文化の日",
"20121123" =&gt; "勤労感謝の日",
"20121223" =&gt; "天皇誕生日",
"20121224" =&gt; "振替休日",
"20130101" =&gt; "元日",
"20130114" =&gt; "成人の日",
"20130211" =&gt; "建国記念の日",
"20130320" =&gt; "春分の日",
"20130429" =&gt; "昭和の日",
"20130503" =&gt; "憲法記念日",
"20130504" =&gt; "みどりの日",
"20130505" =&gt; "こどもの日",
"20130506" =&gt; "振替休日",
"20130715" =&gt; "海の日",
"20130916" =&gt; "敬老の日",
"20130923" =&gt; "秋分の日",
"20131014" =&gt; "体育の日",
"20131103" =&gt; "文化の日",
"20131104" =&gt; "振替休日",
"20131123" =&gt; "勤労感謝の日",
"20131223" =&gt; "天皇誕生日",
"20140101" =&gt; "元日",
"20140113" =&gt; "成人の日",
"20140211" =&gt; "建国記念の日",
"20140321" =&gt; "春分の日",
"20140429" =&gt; "昭和の日",
"20140503" =&gt; "憲法記念日",
"20140504" =&gt; "みどりの日",
"20140505" =&gt; "こどもの日",
"20140506" =&gt; "振替休日",
"20140721" =&gt; "海の日",
"20140915" =&gt; "敬老の日",
"20140923" =&gt; "秋分の日",
"20141013" =&gt; "体育の日",
"20141103" =&gt; "文化の日",
"20141123" =&gt; "勤労感謝の日",
"20141124" =&gt; "振替休日",
"20141223" =&gt; "天皇誕生日",
"20150101" =&gt; "元日",
"20150112" =&gt; "成人の日",
"20150211" =&gt; "建国記念の日",
"20150321" =&gt; "春分の日",
"20150429" =&gt; "昭和の日",
"20150503" =&gt; "憲法記念日",
"20150504" =&gt; "みどりの日",
"20150505" =&gt; "こどもの日",
"20150506" =&gt; "振替休日",
"20150720" =&gt; "海の日",
"20150921" =&gt; "敬老の日",
"20150922" =&gt; "国民の休日",
"20150923" =&gt; "秋分の日",
"20151012" =&gt; "体育の日",
"20151103" =&gt; "文化の日",
"20151123" =&gt; "勤労感謝の日",
"20151223" =&gt; "天皇誕生日",
"20160101" =&gt; "元日",
"20160111" =&gt; "成人の日",
"20160211" =&gt; "建国記念の日",
"20160320" =&gt; "春分の日",
"20160321" =&gt; "振替休日",
"20160429" =&gt; "昭和の日",
"20160503" =&gt; "憲法記念日",
"20160504" =&gt; "みどりの日",
"20160505" =&gt; "こどもの日",
"20160718" =&gt; "海の日",
"20160811" =&gt; "山の日",
"20160919" =&gt; "敬老の日",
"20160922" =&gt; "秋分の日",
"20161010" =&gt; "体育の日",
"20161103" =&gt; "文化の日",
"20161123" =&gt; "勤労感謝の日",
"20161223" =&gt; "天皇誕生日",
"20170101" =&gt; "元日",
"20170102" =&gt; "振替休日",
"20170109" =&gt; "成人の日",
"20170211" =&gt; "建国記念の日",
"20170320" =&gt; "春分の日",
"20170429" =&gt; "昭和の日",
"20170503" =&gt; "憲法記念日",
"20170504" =&gt; "みどりの日",
"20170505" =&gt; "こどもの日",
"20170717" =&gt; "海の日",
"20170811" =&gt; "山の日",
"20170918" =&gt; "敬老の日",
"20170923" =&gt; "秋分の日",
"20171009" =&gt; "体育の日",
"20171103" =&gt; "文化の日",
"20171123" =&gt; "勤労感謝の日",
"20171223" =&gt; "天皇誕生日",
"20180101" =&gt; "元日",
"20180108" =&gt; "成人の日",
"20180211" =&gt; "建国記念の日",
"20180212" =&gt; "振替休日",
"20180321" =&gt; "春分の日",
"20180429" =&gt; "昭和の日",
"20180430" =&gt; "振替休日",
"20180503" =&gt; "憲法記念日",
"20180504" =&gt; "みどりの日",
"20180505" =&gt; "こどもの日",
"20180716" =&gt; "海の日",
"20180811" =&gt; "山の日",
"20180917" =&gt; "敬老の日",
"20180923" =&gt; "秋分の日",
"20180924" =&gt; "振替休日",
"20181008" =&gt; "体育の日",
"20181103" =&gt; "文化の日",
"20181123" =&gt; "勤労感謝の日",
"20181223" =&gt; "天皇誕生日",
"20181224" =&gt; "振替休日",
"20190101" =&gt; "元日",
"20190114" =&gt; "成人の日",
"20190211" =&gt; "建国記念の日",
"20190321" =&gt; "春分の日",
"20190429" =&gt; "昭和の日",
"20190503" =&gt; "憲法記念日",
"20190504" =&gt; "みどりの日",
"20190505" =&gt; "こどもの日",
"20190506" =&gt; "振替休日",
"20190715" =&gt; "海の日",
"20190811" =&gt; "山の日",
"20190812" =&gt; "振替休日",
"20190916" =&gt; "敬老の日",
"20190923" =&gt; "秋分の日",
"20191014" =&gt; "体育の日",
"20191103" =&gt; "文化の日",
"20191104" =&gt; "振替休日",
"20191123" =&gt; "勤労感謝の日",
"20191223" =&gt; "天皇誕生日",
"20200101" =&gt; "元日",
"20200113" =&gt; "成人の日",
"20200211" =&gt; "建国記念の日",
"20200320" =&gt; "春分の日",
"20200429" =&gt; "昭和の日",
"20200503" =&gt; "憲法記念日",
"20200504" =&gt; "みどりの日",
"20200505" =&gt; "こどもの日",
"20200506" =&gt; "振替休日",
"20200720" =&gt; "海の日",
"20200811" =&gt; "山の日",
"20200921" =&gt; "敬老の日",
"20200922" =&gt; "秋分の日",
"20201012" =&gt; "体育の日",
"20201103" =&gt; "文化の日",
"20201123" =&gt; "勤労感謝の日",
"20201223" =&gt; "天皇誕生日"
);</p>

<p>function calendar(){
global $holidays;
global $h_start_year;
global $h_end_year;
global $day_week;
global $day_week_class;
global $day_week_start;</p>

<p>$nowday = date('Ynj'); //今日の日付</p>

<p>if(isset($_SESSION['nen'])){
$nen = $_SESSION['nen'];
}else{
$_SESSION['nen'] = date('Y');
$nen = date('Y');
}</p>

<p>if(isset($_SESSION['tuki'])){
$tuki = $_SESSION['tuki'];
}else{
$_SESSION['tuki'] = date('n');
$tuki = date('n');
}</p>

<p>//今月の初めの曜日//
$start_youbi = date("N", mktime(0, 0, 0,$tuki,1,$nen));
///↑↑date('n')は1が月曜日 7が日曜日(PHP 5.1から)↑↑///
$tuki_owari = date('t'); // その月の終りの日数</p>

<p>/////////プルダウンリストから年を選んだ時の処理////////////
if(isset($_POST['year'])){
$_SESSION['nen'] = $_POST['year'];
$start_youbi = date("N", mktime(0, 0, 0,$_SESSION['tuki'],1, $_SESSION['nen']));
$tuki_owari = date("t",mktime(0, 0, 0,$_SESSION['tuki'],1, $_SESSION['nen']));
}</p>

<p>/////////プルダウンリストから月を選んだ時の処理////////////
if(isset($_POST['month'])){
$_SESSION['tuki'] = $_POST['month'];
$start_youbi = date("N", mktime(0, 0, 0,$_SESSION['tuki'],1, $_SESSION['nen']));
$tuki_owari = date("t",mktime(0, 0, 0,$_SESSION['tuki'],1, $_SESSION['nen']));
}</p>

<p>/////////ココから←先月の処理/////////////
if(@$_POST['sengetu']){
if($_SESSION['tuki']==1){
$_SESSION['nen']=$_SESSION['nen']-1;
$_SESSION['tuki'] = 12; //1月だったら、年を1減らして12月にする
}else{ //以下は 1月以外の処理
$_SESSION['tuki']=$_SESSION['tuki']-1;
}
if($_SESSION['nen']&lt;=($h_start_year - 1)){   //祭日データの無い月は表示しない
$_SESSION['nen']=$_SESSION['nen']+1;
$_SESSION['tuki']=1;
}
$start_youbi = date("N", mktime(0, 0, 0,$_SESSION['tuki'],1, $_SESSION['nen']));
$tuki_owari = date("t", mktime(0, 0, 0,$_SESSION['tuki'],1, $_SESSION['nen']));
}</p>

<p>/////////ココから来月→の処理////////////
if(@$_POST['raigetu']){
if($_SESSION['tuki']==12){
$_SESSION['nen']=$_SESSION['nen']+1;
$_SESSION['tuki'] = 1; //12月だったら1月にして年を1増やす
}else{ //以下は12月以外の処理
$_SESSION['tuki']=$_SESSION['tuki']+1;
}
if($_SESSION['nen']&gt;=($h_end_year + 1)){ //祭日データの無い月は表示しない
$_SESSION['nen']=$_SESSION['nen']-1;
$_SESSION['tuki']=12;
}
$start_youbi = date("N", mktime(0, 0, 0,$_SESSION['tuki'],1, $_SESSION['nen']));
$tuki_owari = date("t", mktime(0, 0, 0,$_SESSION['tuki'],1, $_SESSION['nen']));
}</p>

<p>/////////ココから今月→の処理////////////
if(@$_POST['kongetu']){
$_SESSION['nen'] = date('Y');
$_SESSION['tuki'] = date('n');
$start_youbi = date("N", mktime(0, 0, 0,$_SESSION['tuki'],1, $_SESSION['nen']));
$tuki_owari = date("t", mktime(0, 0, 0,$_SESSION['tuki'],1, $_SESSION['nen']));
}</p>

<p>//////////////フォーム部分///////////////////////</p>

<p>echo&lt;&lt;&lt;EOT
&lt;div class="calendar_box"&gt;
&lt;div style="text-align:center;"&gt;
&lt;div style="margin-left:auto; margin-right:auto;"&gt;</p>

<p>&lt;form action="" method="post"&gt;</p>

<p>&lt;input type="hidden" name="nen" value="{$_SESSION['nen']}"&gt;
&lt;input type="hidden" name="tuki" value="{$_SESSION['tuki']}"&gt;</p>

<p>&lt;select class="year" name="year" onChange="submit()"&gt;
EOT;
echo "\n";
for ($i = $h_start_year; $i &lt;= $h_end_year; $i++) {
echo "          &lt;option value='".$i."'";
if ($i == $_SESSION['nen']) echo " selected";
$di = mb_convert_kana($i, 'A', 'utf8');
echo "&gt;".$di."年&lt;/option&gt;\n";
}</p>

<p>echo&lt;&lt;&lt;EOT
&lt;/select&gt;
&lt;select class="month" name="month" onChange="submit()"&gt;
EOT;
echo "\n";
for ($i = 1; $i &lt;= 12; $i++) {
echo "          &lt;option value='".$i."'";
if ($i == $_SESSION['tuki']) echo " selected";
$di = mb_convert_kana($i, 'A', 'utf8');
echo "&gt;".$di."月&lt;/option&gt;\n";
}</p>

<p>echo&lt;&lt;&lt;EOT
&lt;/select&gt;</p>

<p>&lt;table class="calendar" align="center"&gt;
&lt;tr&gt;
EOT;</p>

<p>//////////曜日の表示//////////
echo "\n";
for($i=$day_week_start ; $i &lt; $day_week_start + 7 ; $i++){
echo '              &lt;th class="'.$day_week_class[$i].'"&gt;'.$day_week[$i].'&lt;/th&gt;';
echo "\n";
}</p>

<p>echo&lt;&lt;&lt;EOT
&lt;/tr&gt;
&lt;tr&gt;
EOT;</p>

<p>$y = $_SESSION['nen'];
$m = $_SESSION['tuki'];
$zengetsu =0;
$kongetsu =0;
$yokugetsu =0;
$cnt = 1;
$orikaesi =0;
/////////先月の表示処理////////////
if(($day_week_start == 0)&amp;&amp;($start_youbi == 7)){$start_youbi = 0;};
// echo "start_youbi:".$start_youbi." day_week_start:".$day_week_start; // Debug 表示用
if($start_youbi != $day_week_start){        //開始の曜日が同じでない場合は空セル発射!
$zy = $y;
$zm = $m - 1;
if($zm == 0){
$zm = 12;
$zy = $zy - 1;
}
$zd = date("j",mktime(0,0,0,$m,0,$y)) - $start_youbi + $day_week_start + 1 ;
for($i=$day_week_start + 1 ; $i&lt;=$start_youbi ; $i++){
if(($orikaesi == ($day_week_start * 6))or(isset($holidays[date("Ymd", mktime(0, 0, 0, $zm, $zd, $zy))]))){
$td = "bkgd_red_other";//日曜日または祝日の色
$td_txt = "txt_red";
}elseif($day_week_class[$orikaesi + $day_week_start] == "yobi y_green"){
$td = "bkgd_green_other";//土曜日の色
$td_txt = "txt_green";
}else{
$td = "bkgd_blue_other";//平日の色
$td_txt = "txt_blue";
}
$zengetsu_ymd = date("Ymd",mktime(0,0,0,$zm,$zd,$zy));
echo "\n";
echo '              &lt;td&gt;&lt;div class="bkgd_gray '.$td.'"&gt;';
if(isset($holidays[$zengetsu_ymd])){
echo '&lt;div class="holiday_txt_red"&gt;'.$holidays[$zengetsu_ymd].'&lt;/div&gt;';
}
echo '&lt;div class="txt_other date_font"&gt;'.$zd.'&lt;/div&gt;';
echo '&lt;/div&gt;&lt;/td&gt;';
$zd++;
$zengetsu++;
$orikaesi++;
}
}
/////////今月の表示処理////////////
while($cnt&lt;=$tuki_owari){
if($orikaesi ==7){ echo "\n         &lt;/tr&gt;\n           &lt;tr&gt;"; //折り返し
$orikaesi =0;//折り返しカウンタリセット
}
if(($orikaesi == ($day_week_start * 6))or(isset($holidays[date("Ymd", mktime(0, 0, 0, $m, $cnt, $y))]))){
$td = "bkgd_red";//日曜日または祝日の色
$td_txt = "txt_red";
}elseif($day_week_class[$orikaesi + $day_week_start] == "yobi y_green"){
$td = "bkgd_green";//土曜日の色
$td_txt = "txt_green";
}else{
$td = "bkgd_blue";//平日の色
$td_txt = "txt_blue";
}
if($nowday==$_SESSION['nen'].$_SESSION['tuki'].$cnt){
$today_c = "bkgd_today"; //本日を示すの色
}else{
$today_c = ""; //本日以外の色
}
echo "\n";
echo '              &lt;td&gt;&lt;div class="date_block '.$td.'"&gt;';
if(isset($holidays[date("Ymd", mktime(0, 0, 0, $m, $cnt, $y))])){
echo '&lt;div class="holiday_txt_red"&gt;'.$holidays[date("Ymd",mktime(0,0,0,$m,$cnt,$y))].'&lt;/div&gt;';
}
echo '&lt;div class="'.$td_txt.' '.$today_c.' date_font"&gt;'.$cnt.'&lt;/div&gt;';
echo '&lt;/div&gt;&lt;/td&gt;';
$kongetsu++;
$cnt++;
$orikaesi++;
}
/////////来月の表示処理////////////
$zk_days = $zengetsu + $kongetsu;
$e = 42 - $zk_days;
$yy = $y;
$ym = $m + 1;
if($ym == 13){
$ym = 1;
$yy = $yy + 1;
}
$i = 0;
$yd = date("j",mktime(0,0,0,$m,$cnt,$y)) + $i;
while($i&lt;$e){
if($orikaesi ==7){ echo "\n         &lt;/tr&gt;\n           &lt;tr&gt;"; //折り返し
$orikaesi =0;//折り返しカウンタリセット
}
if(($orikaesi == ($day_week_start * 6))or(isset($holidays[date("Ymd", mktime(0, 0, 0, $ym, $yd, $yy))]))){
$td = "bkgd_red_other";//日曜日または祝日の色
$td_txt = "txt_red";
}elseif($day_week_class[$orikaesi + $day_week_start] == "yobi y_green"){
$td = "bkgd_green_other";//土曜日の色
$td_txt = "txt_green";
}else{
$td = "bkgd_blue_other";//平日の色
$td_txt = "txt_blue";
}
echo "\n";
echo '              &lt;td&gt;&lt;div class="bkgd_gray '.$td.'"&gt;';
if(isset($holidays[date("Ymd",mktime(0,0,0,$ym,$yd,$yy))])){
echo '&lt;div class="holiday_txt_red"&gt;'.$holidays[date("Ymd",mktime(0,0,0,$ym,$yd,$yy))].'&lt;/div&gt;';
}
echo '&lt;div class="txt_other date_font"&gt;'.$yd.'&lt;/div&gt;';
echo '&lt;/div&gt;&lt;/td&gt;';
$yd++;
$yokugetsu++;
$orikaesi++;
$i++;
}
echo&lt;&lt;&lt;EOT</p>

<p>&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="2" style="height:36px;"&gt;
&lt;input type="submit" class="sengetu" name="sengetu" value="&lt;&lt;"&gt;
&lt;/td&gt;
&lt;td colspan="3" style="height:36px;"&gt;
&lt;input type="submit" class="kongetu" name="kongetu" value="今月"&gt;
&lt;/td&gt;
&lt;td colspan="2" style="height:36px;"&gt;
&lt;input type="submit" class="raigetu" name="raigetu" value="&gt;&gt;"&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</p>

<p>&lt;/form&gt;</p>

<p>&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</p>

<p>EOT;
}</p>

<p>?&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;?php calendar(); ?&gt;
&lt;/body&gt;
&lt;/html&gt;



CSSはこちら

@charset "utf-8";</p>

<p>body {
margin: 0px;
padding: 0px;
font-family: 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, 'MS Pゴシック', sans-serif;
line-height: 100%;
}</p>

<p>.entry-title {
font-weight: 400;
font-size: 22px;
}</p>

<p>.calendar_box {
height:100%;
}</p>

<p>.top_ctrl {
margin-left:auto;
margin-right:auto;
text-align:left;
}</p>

<p>.calendar{
border: 0px #000000 solid;
}</p>

<p>.calendar th{
border: 0px #000000 solid;
}</p>

<p>.calendar td{
width: 60px;
height: 52px;
padding: 0px;
}</p>

<p>.date_font {
font: 600 26px/1 Times New Roman;
}</p>

<p>.yobi {
height: 18px;
padding-top: 4px;
border: 1px solid #ccc;
font: 600 18px/1 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, 'MS Pゴシック', sans-serif;
}</p>

<p>.y_red {
color: firebrick;
}</p>

<p>.y_blue {
color: navy;
}</p>

<p>.y_green {
color: darkgreen;
}</p>

<p>.date_block {
position: relative;
text-align:center;
height:100%;
}</p>

<p>.bkgd_green {
background: #a0dec0;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
box-shadow:1px 1px 3px;
vertical-align: bottom;
}</p>

<p>.bkgd_green_other {
background: #80bea0;
vertical-align: bottom;
}</p>

<p>.txt_green {
position: absolute;
top: 24px;
left: 0px;
width: 100%;
height: 28px;
color: darkgreen;
line-height: 28px;
overflow: hidden;
}</p>

<p>.bkgd_red {
background: #ffe0ed;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
box-shadow:1px 1px 3px;
vertical-align: bottom;
}</p>

<p>.bkgd_red_other {
background: pink;
vertical-align: bottom;
}</p>

<p>.txt_red {
position: absolute;
top: 24px;
left: 0px;
width: 100%;
height: 28px;
color: crimson;
line-height: 28px;
overflow: hidden;
}</p>

<p>.bkgd_blue {
background: #def;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
box-shadow:1px 1px 3px;
vertical-align: bottom;
}</p>

<p>.bkgd_blue_other {
background: #cde;
vertical-align: bottom;
}</p>

<p>.txt_blue {
position: absolute;
top: 24px;
left: 0px;
width: 100%;
height: 28px;
color: navy;
line-height: 28px;
overflow: hidden;
}</p>

<p>.bkgd_gray {
position: relative;
height:100%;
color: gray;
text-align:center;
}</p>

<p>.txt_other {
position: absolute;
top: 24px;
left: 0px;
width: 100%;
height: 28px;
}</p>

<p>.bkgd_today {
height: 28px;
width: 100%;
background: gold;
border-bottom-left-radius: 5px;
-moz-border-radius-bottomleft: 5px;
-webkit-border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
-moz-border-radius-bottomright: 5px;
-webkit-border-bottom-right-radius: 5px;
}</p>

<p>.txt_today {
height: 28px;
color: #000;
line-height: 28px;
overflow: hidden;
}</p>

<p>.holiday_txt_red {
height: 2em;
color: crimson;
padding-top: 2px;
margin: 0px;
text-align:center;
font: 400 12px/1 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, 'MS Pゴシック', sans-serif;
overflow: hidden;
}</p>

<p>.year {
padding-left: 10px;
padding: 2px 10px;
font: 400 18px/1 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, 'MS Pゴシック', sans-serif;
}</p>

<p>.month {
padding-left: 10px;
padding: 2px 10px;
font: 400 18px/1 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'メイリオ', Meiryo, 'MS Pゴシック', sans-serif;
}</p>

<p>.sengetu {
float: left;
padding: 2px 30px;
font-size: 1.2em;
font-weight: bold;
background-color: #248;
color: #fff;
border-style: none;
box-shadow: 2px 2px 3px 1px #666;
-moz-box-shadow: 2px 2px 3px 1px #666;
-webkit-box-shadow: 2px 2px 3px 1px #666;
text-shadow: 1px 1px 2px #000;
background: -moz-linear-gradient(top,#B1D2E0 0%,#B1D2E0 3%,#0099CC 3%,#069);
background: -webkit-gradient(linear, left top, left bottom, from(#B1D2E0), color-stop(0.03,#B1D2E0), color-stop(0.03,#0099CC), to(#069));
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
.sengetu:hover {
opacity: 0.8;
}</p>

<p>.kongetu {
padding: 2px 30px;
font-size: 1.2em;
font-weight: bold;
background-color: #248;
color: #fff;
border-style: none;
box-shadow: 2px 2px 3px 1px #666;
-moz-box-shadow: 2px 2px 3px 1px #666;
-webkit-box-shadow: 2px 2px 3px 1px #666;
text-shadow: 1px 1px 2px #000;
background: -moz-linear-gradient(top,#B1D2E0 0%,#B1D2E0 3%,#0099CC 3%,#069);
background: -webkit-gradient(linear, left top, left bottom, from(#B1D2E0), color-stop(0.03,#B1D2E0), color-stop(0.03,#0099CC), to(#069));
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
.kongetu:hover {
opacity: 0.8;
}</p>

<p>.raigetu {
float: right;
padding: 2px 30px;
font-size: 1.2em;
font-weight: bold;
background-color: #248;
color: #fff;
border-style: none;
box-shadow: 2px 2px 3px 1px #666;
-moz-box-shadow: 2px 2px 3px 1px #666;
-webkit-box-shadow: 2px 2px 3px 1px #666;
text-shadow: 1px 1px 2px #000;
background: -moz-linear-gradient(top,#B1D2E0 0%,#B1D2E0 3%,#0099CC 3%,#069);
background: -webkit-gradient(linear, left top, left bottom, from(#B1D2E0), color-stop(0.03,#B1D2E0), color-stop(0.03,#0099CC), to(#069));
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
.raigetu:hover {
opacity: 0.8;
}


calendar302.php

デザイン変更。「月曜」始まり。曜日文字を半角英字に変更。


calendar301.php

シンプルなイメージのデザインに。「日曜」始まりにしています。


calendar3.php

これまで、沢田内科医院HPで使用していたものと同等。