当前位置:网站首页>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 .
边栏推荐
- OpenGL shadow implementation (hard shadow)
- 实验10 Bezier曲线生成-实验提高-交互式生成B样条曲线
- 国内如何下载Vega
- Hugo blog building tutorial
- CVPR 2022 oral Dalian Institute of technology proposed SCI: a fast and powerful low light image enhancement method
- leetcode:6096. 咒语和药水的成功对数【排序 + 二分】
- Start with no place to live
- 笔记本电脑清灰打硅脂后,开机一直黑屏,如何破?
- Hash hash
- CVPR 2022 Oral 大连理工提出SCI:快速、超强的低光照图像增强方法
猜你喜欢

The difference between user status and system status in CRM

Uniapp uses the Ali Icon

Transactions in redis

kali2022如何安装w3af

Go init initialization function

leetcode:6094. 公司命名【分组枚举 + 不能重复用set交集 + product笛卡儿积(repeat表示长度)】
![[image denoising] image denoising based on anisotropic filtering with matlab code](/img/3d/ee2e36b15b5db2502e43f6945685c5.png)
[image denoising] image denoising based on anisotropic filtering with matlab code

Chrome browser solves cross domain problems

数据库全量SQL分析与审计系统性能优化之旅
![[today in history] June 12: the United States entered the era of digital television; Mozilla's original developer was born; 3com merges with American Robotics](/img/91/d7d6137b95f6348f71692164614340.png)
[today in history] June 12: the United States entered the era of digital television; Mozilla's original developer was born; 3com merges with American Robotics
随机推荐
【图像去噪】基于各向异性滤波实现图像去噪附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
Implementation of VGA protocol based on FPGA
美团智能配送系统的运筹优化实战-笔记
Tarfile decompress nested tar
Market scale forecast and future competitive trend outlook report of China's plastic and cosmetic industry 2022-2028
Leetcode 494. Objectives and
The difference between user status and system status in CRM
实验10 Bezier曲线生成-实验提高-交互式生成B样条曲线
Istio 1.14 发布
The Bean Validation API is on the classpath but no implementation could be found
ISCC2022
软件确认测试知识分享,上海第三方软件测试机构有哪些?
数据库全量SQL分析与审计系统性能优化之旅
leetcode:5289. Distribute cookies fairly [see data range + DFS pruning]
Leetcode 416. Split equal sum subset
leetcode:98. 统计得分小于 K 的子数组数目【双指针 + 计算子集个数 + 去重】
Research Report on the overall scale, major manufacturers, major regions, products and application segments of lifeboats in the global market in 2022
Cookie & session & kaptcha verification code
kali通过iptables实现端口转发功能