mirror of
https://github.com/Luzifer/worktime.git
synced 2024-12-22 22:11:16 +00:00
11 lines
203 B
Go
11 lines
203 B
Go
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)
|
|
}
|