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

feat: custom time intervals (resolve #115)

This commit is contained in:
Ferdinand Mütsch
2021-02-13 12:59:59 +01:00
parent daf67b844a
commit 30510591eb
14 changed files with 118 additions and 54 deletions

View File

@ -8,10 +8,18 @@ import (
)
func ParseDate(date string) (time.Time, error) {
return time.Parse(config.SimpleDateFormat, date)
}
func ParseDateTime(date string) (time.Time, error) {
return time.Parse(config.SimpleDateTimeFormat, date)
}
func FormatDate(date time.Time) string {
return date.Format(config.SimpleDateFormat)
}
func FormatDateTime(date time.Time) string {
return date.Format(config.SimpleDateTimeFormat)
}