1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

chore: code smell [ci skip]

This commit is contained in:
Ferdinand Mütsch
2021-02-12 19:25:59 +01:00
parent 88eb68b1a9
commit 703805412b
8 changed files with 352 additions and 336 deletions

View File

@@ -2,16 +2,17 @@ package utils
import (
"errors"
"github.com/muety/wakapi/config"
"regexp"
"time"
)
func ParseDate(date string) (time.Time, error) {
return time.Parse("2006-01-02 15:04:05", date)
return time.Parse(config.SimpleDateTimeFormat, date)
}
func FormatDate(date time.Time) string {
return date.Format("2006-01-02 15:04:05")
return date.Format(config.SimpleDateTimeFormat)
}
func FormatDateHuman(date time.Time) string {