MCPcopy
hub / github.com/Jguer/yay / FormatTime

Function FormatTime

pkg/text/time.go:62–65  ·  view source on GitHub ↗

Formats a unix timestamp to ISO 8601 date (yyyy-mm-dd).

(i int)

Source from the content-addressed store, hash-verified

60
61// Formats a unix timestamp to ISO 8601 date (yyyy-mm-dd).
62func FormatTime(i int) string {
63 t := time.Unix(int64(i), 0)
64 return t.Format("2006-01-02")
65}
66
67// Formats a unix timestamp to ISO 8601 date (Mon 02 Jan 2006 03:04:05 PM MST).
68func FormatTimeQuery(i int) string {

Callers 3

aurPkgSearchStringFunction · 0.92
printNewsMethod · 0.92
TestFormatTimeFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestFormatTimeFunction · 0.68