Open anjalakaturi opened 2 years ago
Great job so far Anjala! You're doing a great job figuring things out for yourself and putting things together!
Here's a little snippet on something you could do with the Calendar
API to calculate time intervals instead of what you're doing now:
let now = Date()
if let targetDate = Calendar.current.date(byAdding: .day, value: 6, to: now) {
let secondsToTarget = now.distance(to: targetDate)
}
Another little note from something I saw in your code:
var isReadyToWater: Bool {
if (daysBeforeWatering == 0){
return true
}
else{
return false
}
}
// Would be the same as:
var isReadyToWater: Bool {
return daysBeforeWatering == 0
}
There's no need for an if/else when you are returning true/false from it! :)
Project Check-In
Currently
Screenshot of ContentView:
Next Steps:
Planned Feature List: https://github.com/anjalakaturi/plant/blob/main/planning/feature_list.txt
Learning:
Is anything particularly exciting to you about what you’ve accomplished so far?
Do you have any specific questions about how to proceed?
What have been the most challenging aspects so far?