当前位置:网站首页>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] ?? "";
}
边栏推荐
- ORACLE EBS 和 APEX 集成登录及原理分析
- oracle apex ajax process + dy 校验
- ORACLE 11G利用 ORDS+pljson来实现json_table 效果
- allennlp 中的TypeError: Object of type Tensor is not JSON serializable错误
- 【MEDICAL】Attend to Medical Ontologies: Content Selection for Clinical Abstractive Summarization
- SSM laboratory equipment management
- Oracle EBS database monitoring -zabbix+zabbix-agent2+orabbix
- Calculate the difference in days, months, and years between two dates in PHP
- Drawing mechanism of view (II)
- Illustration of etcd access in kubernetes
猜你喜欢
随机推荐
Only the background of famous universities and factories can programmers have a way out? Netizen: two, big factory background is OK
[model distillation] tinybert: distilling Bert for natural language understanding
@Transitional step pit
Principle analysis of spark
离线数仓和bi开发的实践和思考
ORACLE EBS中消息队列fnd_msg_pub、fnd_message在PL/SQL中的应用
【Torch】最简洁logging使用指南
SSM实验室设备管理
华为机试题
Alpha Beta Pruning in Adversarial Search
Implement interface Iterable & lt; T>
Pyspark build temporary report error
Get the uppercase initials of Chinese Pinyin in PHP
ssm垃圾分类管理系统
SSM second hand trading website
聊天中文语料库对比(附上各资源链接)
Transform the tree structure into array in PHP (flatten the tree structure and keep the sorting of upper and lower levels)
Oracle general ledger balance table GL for foreign currency bookkeeping_ Balance change (Part 1)
Find in laravel8_ in_ Usage of set and upsert
Implementation of purchase, sales and inventory system with ssm+mysql
![[introduction to information retrieval] Chapter 7 scoring calculation in search system](/img/cc/a5437cd36956e4c239889114b783c4.png)








