当前位置:网站首页>Determine which week of the month the day is
Determine which week of the month the day is
2022-07-06 03:53:00 【dongjinxin0621】
public function get_week_num(){
$time = strtotime('2022-05-01');
$wk_day = date('w', strtotime(date('Y-m-1 00:00:00', $time))) ? : 7; // What day is today
$day = date('d', $time) - (8 - $wk_day); // What's the date today
echo $day <= 0 ? 1 : ceil($day / 7) + 1; // How many weeks is it
die;
}
边栏推荐
- BUAA计算器(表达式计算-表达式树实现)
- Microkernel structure understanding
- In Net 6 CS more concise method
- 【可调延时网络】基于FPGA的可调延时网络系统verilog开发
- RT thread -- FTP of LwIP (2)
- 如何修改表中的字段约束条件(类型,default, null等)
- math_极限&微分&导数&微商/对数函数的导函数推导(导数定义极限法)/指数函数求导公式推导(反函数求导法则/对数求导法)
- Image super resolution using deep revolutionary networks (srcnn) interpretation and Implementation
- RT-Thread--Lwip之FTP(2)
- cookie,session,Token 这些你都知道吗?
猜你喜欢
Database, relational database and NoSQL non relational database
C language -- structs, unions, enumerations, and custom types
STC8H开发(十二): I2C驱动AT24C08,AT24C32系列EEPROM存储
Remote Sensing Image Super-resolution and Object Detection: Benchmark and State of the Art
[practice] mathematics in lottery
RT-Thread--Lwip之FTP(2)
【按鍵消抖】基於FPGA的按鍵消抖模塊開發
《2022年中国银行业RPA供应商实力矩阵分析》研究报告正式启动
在字节做测试5年,7月无情被辞,想给划水的兄弟提个醒
1. New project
随机推荐
MySQL about self growth
RT thread -- FTP of LwIP (2)
【可调延时网络】基于FPGA的可调延时网络系统verilog开发
cookie,session,Token 这些你都知道吗?
Recommended papers on remote sensing image super-resolution
Cubemx 移植正点原子LCD显示例程
Prime Protocol宣布在Moonbeam上的跨链互连应用程序
【按键消抖】基于FPGA的按键消抖模块开发
C (XXIX) C listbox CheckedListBox Imagelist
C language -- structs, unions, enumerations, and custom types
Développement d'un module d'élimination des bavardages à clé basé sur la FPGA
JS music online playback plug-in vsplayaudio js
关于非虚函数的假派生
登录mysql输入密码时报错,ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: NO/YES
2.2 STM32 GPIO operation
2、GPIO相关操作
SSTI template injection explanation and real problem practice
Conditionally [jsonignore]
Pointer for in-depth analysis (problem solution)
RT-Thread--Lwip之FTP(2)