mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-06 02:36:49 +00:00
13 lines
193 B
Go
13 lines
193 B
Go
package time
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
func ParseFromForm(src string) (time.Time, error) {
|
|
ts, err := time.Parse(time.DateOnly, src)
|
|
if err != nil {
|
|
return time.Time{}, err
|
|
}
|
|
return ts, nil
|
|
}
|