1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

feat: add ability to customize time format

This commit is contained in:
Ryooooooga
2022-05-13 21:56:07 +09:00
parent e28d1334e9
commit 1f1d871837
7 changed files with 42 additions and 9 deletions

View File

@ -20,6 +20,6 @@ func UnixToTimeAgo(timestamp int64) string {
return fmt.Sprintf("%dy", int(delta))
}
func UnixToDate(timestamp int64) string {
return time.Unix(timestamp, 0).Format(time.RFC822)
func UnixToDate(timestamp int64, timeFormat string) string {
return time.Unix(timestamp, 0).Format(timeFormat)
}