Improved date handling (DurationComponents)

This commit is contained in:
Vicnet
2023-11-11 11:11:08 +01:00
parent 1598d24b00
commit 13b025771c
7 changed files with 150 additions and 135 deletions

View File

@@ -91,6 +91,16 @@ struct RecipeDetail: Codable {
recipeInstructions = []
nutrition = [:]
}
func getKeywordsArray() -> [String] {
return keywords.components(separatedBy: ",")
}
mutating func setKeywordsFromArray(_ keywordsArray: [String]) {
if !self.keywords.isEmpty {
self.keywords = keywordsArray.joined(separator: ",")
}
}
}
extension RecipeDetail {