clock

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package clock contains time and date-related functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HourMinFormat

func HourMinFormat(t time.Time) string

HourMinFormat formats the given time in hh:mm format

func Sleep

func Sleep(pause time.Duration, start time.Time)

Sleep pauses for a given duration, given the start time

func TimestampFormat

func TimestampFormat(t time.Time) string

TimestampFormat formats the given time in timestamp format (yymmddhhmmss)

Types

type Date

type Date = string

func DateFormat

func DateFormat(t time.Time) Date

DateFormat formats the given time in date format (yyyy-mm-dd)

type DateTime

type DateTime = string

func DateTimeNow

func DateTimeNow() DateTime

DateTimeNow returns the current datetime in standard format

func StandardFormat

func StandardFormat(t time.Time) DateTime

StandardFormat formats the given time in standard format (yyyy-mm-dd hh:mm:ss)

type Time

type Time = string

func TimeFormat

func TimeFormat(t time.Time) Time

TimeFormat formats the given time in time format (hh:mm:ss)

Jump to

Keyboard shortcuts

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