// ParseInputDate parse the task date into right format
// Support now package and mmdd, dd/mmformat
ParseInputDate parse the task date into right format
Support now package and mmdd, dd/mmformat
// ParseInputDate parse the task date into right format // Support now package and mmdd dd / mmformat
func ParseInputDate(in string) (string, error) {
	if len(in) == 4 {
		in = in[0:2] + "-" + in[2:]
	}
	if len(in) == 5 && strings.Contains(in, "/") {
		in = in[3:] + "-" + in[0:2]
	}
	t, err := now.Parse(in)
	if err != nil {
		return "", err
	}
	out := t.Format("2006-01-02")
	return out, nil
}
func ParseInputDate ( in string ) ( string , error ) { if len ( in ) == 4 { in = in [ 0 : 2 ] + " " + in [ 2 : ] } if len ( in ) == 5 && strings . Contains ( in , " " ) { in = in [ 3 : ] + " " + in [ 0 : 2 ] } t , err := now . Parse ( in ) if err != nil { return " " , err } out := t . Format ( " " ) return out , nil }
ParseInputDate parse the task date into right format
Support now package and mmdd, dd/mmformat
ParseInputDate parse the task date into right format Support now package and mmdd dd / mmformat
// Handle mmdd format // Handle dd/mm format