Download the PHP package kanagama/calendarar without Composer
On this page you can find all versions of the php package kanagama/calendarar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package calendarar
Calendarar
かれんだらー
機能概要
開始日と終了日を設定し、その開始日から終了日までのカレンダー出力用の配列を作成する。
php7.4 以上
使い方
composer でインストール
インスタンス化、もしくは静的呼び出しも可能です
example
create()
カレンダー開始日とカレンダー終了日を元にしてカレンダー用配列を出力する
example
返却値
html()
カレンダー開始日とカレンダー終了日を元にしてカレンダー table を html タグで出力する
example
example 出力される html 2023/02
startOfMonday()
カレンダーの週の始まりを月曜にする
example
startOfSunday()
カレンダーの週の始まりを日曜にする(デフォルト)
example
isStartOfMonday()
カレンダーの週の始まりが月曜か判定する
isStartOfSunday()
カレンダーの週の始まりが日曜か判定する
setEncoding
html() で出力する table.thead.tr.th の内容を ja, en で指定する
example
setTrTemplate(string $template)
html() で出力される table.thead.tr.th タグ内のテンプレートを変更します
デフォルト値
{{dayOfWeek}}が曜日の文字列に変換されます
example
setDay(int $year, int $month, int $day, mixed $data)
指定日に、$data を格納する
example
setTdTemplate(string $template)
html() で出力される table.tbody.tr.td タグ内のテンプレートを変更します
デフォルト値
{{day}}が数値の日付に変換されます
example
set(mixed $start, mixed $end)
第一引数にカレンダー開始日、第二引数にカレンダー終了日を設定する
※第一引数は月初に、第二引数は月末に変換されます
setStartMonth(mixed $start)
カレンダー開始月を設定する
※月初に変換されます
setEndMonth(mixed $end)
カレンダー終了月を設定する
※月末に変換されます
thisMonth()
今月1ヶ月分のカレンダーを設定
example
lastMonth()
先月1ヶ月分のカレンダーを設定
example
nextMonth()
来月1ヶ月分のカレンダーを設定
example
oneYear()
今月から12ヶ月分のカレンダーを設定
example
getStartDatetime()
設定されたカレンダー開始日を表示する
example
getEndDatetime()
設定されたカレンダー終了日を表示する
example
addStartYear(int $add)
カレンダー開始年を $add 年分進める
example
addEndYear(int $add)
カレンダー終了年を $add 年分進める
example
subStartYear(int $sub)
カレンダー開始年を $sub 年分戻す
example
subEndYear(int $sub)
カレンダー終了年を $sub 年分戻す
example
addStartMonth(int $add)
カレンダー開始月を $add 月分進める
addEndMonth(int $add)
カレンダー終了月を $add 月分進める
example
subStartMonth(int $sub)
カレンダー開始月を $sub 月分戻す
example
subEndMonth(int $sub)
カレンダー終了月を $sub 月分戻す