allegedwizard/simple-calendar-php
最新稳定版本:v1.0.1
Composer 安装命令:
composer require allegedwizard/simple-calendar-php
包简介
Generates 7x6 sequence calendar arrays for a given month/year input.
README 文档
README
composer require allegedwizard/simple-calendar-php
Generates a calendar data model array for a given input Month and Year.
Can be used to build calendar views.
<?php // Example output of: $calendar = new SimpleCalendar( 'August', 2023 ); $model = $calendar->toArray(); print_r( $model );
Array
(
[0] => Array
(
[date] => 2023-07-30
[day_of_month] => 30
[is_prev_month] => 1
[is_current_month] =>
[is_next_month] =>
[is_today] =>
)
[1] => Array
(
[date] => 2023-07-31
[day_of_month] => 31
[is_prev_month] => 1
[is_current_month] =>
[is_next_month] =>
[is_today] =>
)
[2] => Array
(
[date] => 2023-08-01
[day_of_month] => 1
[is_prev_month] =>
[is_current_month] => 1
[is_next_month] =>
[is_today] =>
)
...
- Arbitrary first day of week calendar assignment (defaults to Sunday).
- Allows for overriding the date($format, $timestamp) formatter function, for example wp_date() in WordPress environments to leverage localized time.
See tests/simple-calendar-test.php for a full calendar example.
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-08-31