1
0
Fork 0
mirror of https://github.com/Luzifer/worktime.git synced 2024-12-22 22:11:16 +00:00
worktime/cmd/helpers.go

12 lines
203 B
Go
Raw Normal View History

package cmd
import "time"
func parseTime(format, input string) (time.Time, error) {
if input == "today" || input == "now" {
input = time.Now().Format(format)
}
return time.Parse(format, input)
}