当前位置:网站首页>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;
}
边栏推荐
- Codeforces Global Round 19
- BUAA喜鹊筑巢
- Image super resolution using deep revolutionary networks (srcnn) interpretation and Implementation
- Record the pit of NETCORE's memory surge
- 20、 EEPROM memory (AT24C02) (similar to AD)
- Prime protocol announces cross chain interconnection applications on moonbeam
- [Key shake elimination] development of key shake elimination module based on FPGA
- How to modify field constraints (type, default, null, etc.) in a table
- C#(二十七)之C#窗体应用
- 潘多拉 IOT 开发板学习(HAL 库)—— 实验9 PWM输出实验(学习笔记)
猜你喜欢
How do we make money in agriculture, rural areas and farmers? 100% for reference
Serial port-rs232-rs485-ttl
How to standardize the deployment of automated testing?
Alibaba testers use UI automated testing to achieve element positioning
Record the pit of NETCORE's memory surge
ESP32(基于Arduino)连接EMQX的Mqtt服务器上传信息与命令控制
2.13 weekly report
WPF效果第一百九十一篇之框选ListBox
Schnuka: 3D vision detection application industry machine vision 3D detection
1. New project
随机推荐
JVM的手术刀式剖析——一文带你窥探JVM的秘密
[prediction model] difference method model
【按键消抖】基于FPGA的按键消抖模块开发
Canvas cut blocks game code
Maxay paper latex template description
C language -- structs, unions, enumerations, and custom types
Pandora IOT development board learning (HAL Library) - Experiment 9 PWM output experiment (learning notes)
《2022年中国银行业RPA供应商实力矩阵分析》研究报告正式启动
BUAA magpie nesting
Pytoch foundation - (1) initialization of tensors
自动化测试的好处
Crawler of explanation and application of agency theory
有条件地 [JsonIgnore]
MySQL reads missing data from a table in a continuous period of time
判断当天是当月的第几周
In Net 6 CS more concise method
[matlab] - draw a five-star red flag
BUAA calculator (expression calculation - expression tree implementation)
[001] [stm32] how to download STM32 original factory data
Cf603e pastoral oddities [CDQ divide and conquer, revocable and search set]