parseOwnerWhen accepts an RFC3339 timestamp or a date expression (YYYY-MM-DD, today, tomorrow, weekday, Nd) for `flow owner next --at`.
(s string)
| 337 | // parseOwnerWhen accepts an RFC3339 timestamp or a date expression |
| 338 | // (YYYY-MM-DD, today, tomorrow, weekday, Nd) for `flow owner next --at`. |
| 339 | func parseOwnerWhen(s string) (time.Time, error) { |
| 340 | if t, err := time.Parse(time.RFC3339, s); err == nil { |
| 341 | return t, nil |
| 342 | } |
| 343 | d, err := parseDueDate(s, time.Now()) |
| 344 | if err != nil { |
| 345 | return time.Time{}, fmt.Errorf("not an RFC3339 time or a recognizable date: %w", err) |
| 346 | } |
| 347 | return d, nil |
| 348 | } |
| 349 | |
| 350 | // ownerStart marks an owner active and schedules its first tick now, so |
| 351 | // the next scheduler pass picks it up. Then it ticks every Every. |
no test coverage detected