当前位置:网站首页>PHP returns the abbreviation of the month according to the numerical month
PHP returns the abbreviation of the month according to the numerical month
2022-07-02 07:28:00 【Snow wind in the night sky】
Preface
In the process of project development, sometimes it is necessary to convert the month into English .
/** * Get month abbreviation * @param string $month month */
function get_month_abbr($month)
{
$month = (int) $month;
$monthEng = [
1 => "Jan",
2 => "Feb",
3 => "Mar",
4 => "Apr",
5 => "May",
6 => "Jun",
7 => "Jul",
8 => "Aug",
9 => "Sep",
10 => "Oct",
11 => "Nov",
12 => "Dec",
];
return $monthEng[$month] ?? "";
}
边栏推荐
- Huawei machine test questions-20190417
- [paper introduction] r-drop: regulated dropout for neural networks
- ERNIE1.0 与 ERNIE2.0 论文解读
- Point cloud data understanding (step 3 of pointnet Implementation)
- Get the uppercase initials of Chinese Pinyin in PHP
- The first quickapp demo
- MapReduce concepts and cases (Shang Silicon Valley Learning Notes)
- Drawing mechanism of view (I)
- Oracle RMAN automatic recovery script (migration of production data to test)
- ORACLE EBS DATAGUARD 搭建
猜你喜欢

SSM二手交易网站

ORACLE 11G利用 ORDS+pljson来实现json_table 效果

SSM学生成绩信息管理系统

第一个快应用(quickapp)demo
![[introduction to information retrieval] Chapter 7 scoring calculation in search system](/img/cc/a5437cd36956e4c239889114b783c4.png)
[introduction to information retrieval] Chapter 7 scoring calculation in search system

Cognitive science popularization of middle-aged people

《Handwritten Mathematical Expression Recognition with Bidirectionally Trained Transformer》论文翻译

【信息检索导论】第六章 词项权重及向量空间模型

一份Slide两张表格带你快速了解目标检测

SSM student achievement information management system
随机推荐
@Transational踩坑
Conda 创建,复制,分享虚拟环境
SSM学生成绩信息管理系统
Huawei machine test questions-20190417
Explanation of suffix of Oracle EBS standard table
Spark SQL task performance optimization (basic)
SSM实验室设备管理
Oracle rman半自动恢复脚本-restore阶段
CRP implementation methodology
Only the background of famous universities and factories can programmers have a way out? Netizen: two, big factory background is OK
[introduction to information retrieval] Chapter II vocabulary dictionary and inverted record table
Using MATLAB to realize: Jacobi, Gauss Seidel iteration
ssm超市订单管理系统
parser.parse_args 布尔值类型将False解析为True
[torch] the most concise logging User Guide
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory'
使用MAME32K进行联机游戏
Huawei machine test questions
The first quickapp demo
MapReduce concepts and cases (Shang Silicon Valley Learning Notes)