★LocalHost Run Under Construction
  • 首页
  • 文章
  • 工具
http://localhost
首页文章工具
全部工具›时间工具›截断时钟时间

截断时钟时间

截断时钟时间以删除秒数或分钟数。将时间四舍五入到最接近的小时数、分钟数或自定义间隔。

Input text

​

Result

​

工具选项

截断侧

仅截断秒数

从每个时钟时间中删除秒数部分。

截断分钟和秒

删除每个时钟时间中的分钟和秒部分。

打印掉落的组件

将删除的部分显示为零值“00”。

时间填充

使所有时间部分始终为两位数宽度。


截断时钟时间 示例

点击尝试!

Truncate Seconds

In this example, we get rid of the seconds part from several timer values. We select the "Truncate Only Seconds" mode and get a list of timer values consisting only of hours and minutes in format "hh:mm" (the ":ss" part is removed).

​
​

截断侧

仅截断秒数

从每个时钟时间中删除秒数部分。

截断分钟和秒

删除每个时钟时间中的分钟和秒部分。

打印掉落的组件

将删除的部分显示为零值“00”。

时间填充

使所有时间部分始终为两位数宽度。

Truncate Minutes and Seconds

This example truncates five clock times to an hour. It drops the minutes and seconds parts and only outputs the hours with zero padding.

​
​

截断侧

仅截断秒数

从每个时钟时间中删除秒数部分。

截断分钟和秒

删除每个时钟时间中的分钟和秒部分。

打印掉落的组件

将删除的部分显示为零值“00”。

时间填充

使所有时间部分始终为两位数宽度。

Set Seconds to Zero

In this example, we set the seconds part of each time to zero by first truncating the time to minutes and then appending a zero at the end in place of the truncated seconds. To do this, we switch on the seconds-truncation mode and activate the option to print-zero-time-parts. We also turn off the padding option and get the output time in format "h:m:s", where the seconds are always zero so the final format is "h:m:0".

​
​

截断侧

仅截断秒数

从每个时钟时间中删除秒数部分。

截断分钟和秒

删除每个时钟时间中的分钟和秒部分。

打印掉落的组件

将删除的部分显示为零值“00”。

时间填充

使所有时间部分始终为两位数宽度。


全部 时间工具


  • 将天数转换为小时数 — 将天数转换为小时数
  • 将小时转换为天 — 将小时转换为天
  • 将秒转换为时间 — 将秒数转换为时间格式
  • 将时间转换为秒 — 将时间格式转换为秒
  • 日期间隔时间 — 计算两个日期之间的时间
  • Crontab Guru — 用简单语言解析和解释 cron 表达式
  • 检查闰年 — 检查年份是否为闰年
  • 转换 Unix ↔ 日期 — 双向转换 Unix 时间戳和日期。
  • 把时间转换至十进制格式 — 把时段转化为小数小时值
  • Discord 时间戳生成器 — 从日期生成 Discord 时间戳

LocalHost Run · 联系我们 · 隐私政策 · 使用条款

© 2026 LocalHost Run · localhost 指南、文章与开发者工具 · localhostrun.com
访客计数: 1025Best viewed in Netscape Navigator · 800×600© LocalHost Run