date_kit

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DistanceBetweenTimestampSecond

func DistanceBetweenTimestampSecond(from, to int64) (days, hours, minutes, seconds int)

DistanceBetweenTimestampSecond

from and to must be unix timestamp
must be from < to
return days, hours, minutes, seconds

func DistanceBetweenTimestampSecondHuman

func DistanceBetweenTimestampSecondHuman(from, to int64) string

DistanceBetweenTimestampSecondHuman convert DistanceBetweenTimestampSecond to human-readable

if from > to, return "N/A"
if from == to, return "0s"
if from < to, return "daysd hoursh minutesm secondss"

Types

This section is empty.

Jump to

Keyboard shortcuts

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