DateComponents

In this tutorial, I will share with you a few code examples on how to work with dates in Swift.  I will use DateComponents to add more days, months, or years to the current Date object in Swift. Let’s start with the basics. The first thing you need to know is that Swift provides several…

Read More Add Days, Months or Years to a Current Date in Swift

In this tutorial, you will learn how to add days, months or years to the current date in Swift. To work with dates I will use Date(), DateComponents() and Calendar objects. I will first get the today’s current date and then will use the DateComponents() to add to a current date another day, month or…

Read More Add Days, Months, Years to Current Date in Swift