1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Rudimentary modal showing up for Todo on 'e'

This commit is contained in:
Chris Cummer
2018-04-24 19:41:15 -07:00
parent ed52835650
commit bef57d799b
7 changed files with 47 additions and 31 deletions

View File

@@ -10,6 +10,11 @@ import (
"github.com/rivo/tview"
)
const SimpleDateFormat = "Jan 2"
const SimpleTimeFormat = "15:04 MST"
const FriendlyDateTimeFormat = "Mon, Jan 2, 15:04"
const TimestampFormat = "2006-01-02T15:04:05-0700"
func CenterText(str string, width int) string {
return fmt.Sprintf("%[1]*s", -width, fmt.Sprintf("%[1]*s", (width+len(str))/2, str))
}