samedi 2 mars 2019

Can't create proper function in swift ("if" or maybe "while")

i am new to SWIFT so please don't judge me too strictly. Here's the problem: trying to make a simple app that shows current date in format "dd MMMM" and who exactly have a birthday today.

With the 1 part there is no any problem. Also i have a bank of tuples with data, for ex: var friend1 = ("John Black", "02 March")

So with one tuple i can make smth like that:

if friend1.1 == currentDay() { print(friend1.0)} else { print("No match")}

But when i have a dozen of tuples i don't want to check every one of them personally, how can i make it more "automated"?

Aucun commentaire:

Enregistrer un commentaire