times

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDesc

func GetDesc(ts time.Duration) string

GetDesc 返回时间中文的描述

return "1 小时 32 分"

func GetSubDesc

func GetSubDesc(ts1 time.Time, ts2 time.Time) string

GetSubDesc 两个时间相减,返回时间中文的描述

return "1 小时 32 分"

func GetTime

func GetTime(d time.Duration) (days int, hours int, minutes int, seconds int)

GetTime 根据time.Duration转换成天、小时、分钟、秒

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL