summaryrefslogtreecommitdiff
path: root/modules/dateModule.go
blob: 9dec1dd763564eb30c31d20273808c8643a8a67f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package modules

import (
	"fmt"
	"strconv"
	"time"
)

type DateModule struct {
}

// getDate formats a string for the status bar
func (_ DateModule) GetInfo() (string, error) {
	now := time.Now()
	// return now.Weekday().String() + " " + now.Month().String()[0:3] + " " + now.Year(), nil
	return fmt.Sprintf("%s %s %s %s", now.Weekday(), now.Month().String()[0:3], strconv.Itoa(now.Day()), strconv.Itoa(now.Year())), nil
}