当前位置:网站首页>PHP converts total seconds to hours, minutes and seconds
PHP converts total seconds to hours, minutes and seconds
2022-06-12 19:01:00 【Game programming】
Seconds conversion : Minutes and seconds
function changeTimeType($seconds){ if ($seconds > 3600) { $hours = intval($seconds / 3600); $time = $hours . ":" . gmstrftime('%M:%S', $seconds); } else { $time = gmstrftime('%H:%M:%S', $seconds); } return $time;}Seconds conversion : Years, days, hours, minutes and seconds
function Sec2Time($time){ if (is_numeric($time)) { $value = array( "years" => 0, "days" => 0, "hours" => 0, "minutes" => 0, "seconds" => 0, ); $t = ''; if ($time >= 31556926) { $value["years"] = floor($time / 31556926); $time = ($time % 31556926); $t .= $value["years"] . " year "; } if ($time >= 86400) { $value["days"] = floor($time / 86400); $time = ($time % 86400); $t .= $value["days"] . " God "; } if ($time >= 3600) { $value["hours"] = floor($time / 3600); $time = ($time % 3600); $t .= $value["hours"] . " Hours "; } if ($time >= 60) { $value["minutes"] = floor($time / 60); $time = ($time % 60); $t .= $value["minutes"] . " branch "; } $value["seconds"] = floor($time); //return (array) $value; $t .= $value["seconds"] . " second "; return $t; } else { return (bool) false; }}author : Cheche adult
Game programming ️, A game development favorite ~
If the picture is not displayed for a long time , Please use Chrome Kernel browser .
边栏推荐
- Analysis report on market demand and investment strategy of China's re guarantee industry 2022-2028
- dumi 搭建文档型博客
- 基于FPGA的VGA协议实现
- 每日一博 - 微服务权限一二事
- leetcode:6094. 公司命名【分组枚举 + 不能重复用set交集 + product笛卡儿积(repeat表示长度)】
- Cookie & Session & kaptcha驗證碼
- 从应无所住说起
- Kali LAN ARP Spoofing and monitoring other hosts' Internet access records in the LAN
- In 2021, the global revenue of chlorinated polyvinyl chloride (CPVC) was about $1809.9 million, and it is expected to reach $3691.5 million in 2028
- Leetcode 416. Split equal sum subset
猜你喜欢
![[5gc] Introduction to three SSC (session and service continuity) modes](/img/98/6e08986269c5dc1f5ce192cdef3e9f.png)
[5gc] Introduction to three SSC (session and service continuity) modes

The Bean Validation API is on the classpath but no implementation could be found
![leetcode:5259. Calculate the total tax payable [simple simulation + see which range]](/img/f4/e6329c297dbe668e70f5e37bfc2852.png)
leetcode:5259. Calculate the total tax payable [simple simulation + see which range]

【0008】无序列表

io. seata. common. exception. FrameworkException: can not connect to services-server.

leetcode:6096. 咒语和药水的成功对数【排序 + 二分】

ISCC2022

美团获得小样本学习榜单FewCLUE第一!Prompt Learning+自训练实战

RHCA回忆录---CL280介绍

leetcode:98. 统计得分小于 K 的子数组数目【双指针 + 计算子集个数 + 去重】
随机推荐
Kali2022 how to install w3af
笔记本电脑清灰打硅脂后,开机一直黑屏,如何破?
Daily blog - micro service permission 12 matters
leetcode:5270. Minimum path cost in Grid [simple level DP]
Wireshark basic commands
机器学习在美团配送系统的实践:用技术还原真实世界-笔记
[image denoising] image denoising based on regularization with matlab code
Experiment 10 Bezier curve generation - experiment improvement - control point generation of B-spline curve
232-CH579M学习开发-以太网例程-TCP服务器(项目应用封装,局域网或广域网测试)
[5gc] Introduction to three SSC (session and service continuity) modes
Research Report on the overall scale, major manufacturers, major regions, products and application segments of lifeboats in the global market in 2022
Leetcode 474. 一和零
【图像去噪】基于各向异性滤波实现图像去噪附matlab代码
In 2021, the global revenue of electro-optical modulator (EOM) is about USD 360.3 million, and it is expected to reach USD 704.4 million in 2028
标准库template学习入门原创
MySQL数据库实验一 数据定义
Tarfile decompress nested tar
一种灵活注入 Istio Sidecar 的方案探索
lua记录
SCI Writing - Methodology