当前位置:网站首页>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;
}
边栏推荐
- Plus d'un milliard d'utilisateurs de grandes entreprises comme Facebook ont été compromis, il est temps de se concentrer sur le did
- [meisai] meisai thesis reference template
- Pointer for in-depth analysis (problem solution)
- [Key shake elimination] development of key shake elimination module based on FPGA
- 阿里测试师用UI自动化测试实现元素定位
- three. JS page background animation liquid JS special effect
- Record the pit of NETCORE's memory surge
- C#(三十一)之自定义事件
- SAP ALV color code corresponding color (finishing)
- Schnuka: what is visual positioning system and how to position it
猜你喜欢
![[Massey] Massey font format and typesetting requirements](/img/27/6b641551d6d8699683972f40f3b8e5.jpg)
[Massey] Massey font format and typesetting requirements

简易博客系统

C#(三十)之C#comboBox ListView treeView

C mouse event and keyboard event of C (XXVIII)

Plus d'un milliard d'utilisateurs de grandes entreprises comme Facebook ont été compromis, il est temps de se concentrer sur le did

C#(二十八)之C#鼠标事件、键盘事件

【按键消抖】基于FPGA的按键消抖模块开发

1.16 - check code

2.2 fonctionnement stm32 GPIO

2. GPIO related operations
随机推荐
How to modify field constraints (type, default, null, etc.) in a table
C mouse event and keyboard event of C (XXVIII)
Remote Sensing Image Super-resolution and Object Detection: Benchmark and State of the Art
2.2 fonctionnement stm32 GPIO
WPF effect Article 191 box selection listbox
Schnuka: 3D vision detection application industry machine vision 3D detection
MySQL reads missing data from a table in a continuous period of time
Cf464e the classic problem [shortest path, chairman tree]
阿里测试师用UI自动化测试实现元素定位
Data analysis Seaborn visualization (for personal use)
有条件地 [JsonIgnore]
Security xxE vulnerability recurrence (XXe Lab)
Indicator system of KQI and KPI
math_极限&微分&导数&微商/对数函数的导函数推导(导数定义极限法)/指数函数求导公式推导(反函数求导法则/对数求导法)
[introduction to Django] 11 web page associated MySQL single field table (add, modify, delete)
【Qt5】Qt QWidget立刻出现并消失
Multi project programming minimalist use case
/usr/bin/gzip: 1: ELF: not found/usr/bin/gzip: 3: : not found/usr/bin/gzip: 4: Syntax error:
如何修改表中的字段约束条件(类型,default, null等)
Quick sort function in C language -- qsort