top of page

Let's Play Date Format


Let's play date:

https://developer.apple.com/documentation/foundation/dateformatter

//: Playground - noun: a place where people can play

import UIKit

var today = Date() let formatter = DateFormatter()

//formatter.dateStyle = .none //formatter.string(from: today)

//formatter.dateStyle = .short //formatter.string(from: today)

//formatter.dateStyle = .medium //formatter.string(from: today)

formatter.dateStyle = .short formatter.string(from: today)

//formatter.dateStyle = .full //formatter.string(from: today)

formatter.dateFormat = "MM/dd/yyyy" formatter.string(from: today)

//"MM.dd.yy" = 11.21.18 //MM = 1 digits of month //MMM = 3 letters of month //MMMM = full month name //EEE = abreviation of week //EEEE = full day // "MM/dd/yy"

print(today) ================ 1. Create the birthdays table view controller 2. Add cells to the table view 3. Setup table view controller Remember that The Birthdays table view controller will display a list of all the birthdays stored in the app.

What is a method?

- numberOfSections(in:) Tells the table view how many sections it should have - tableView(_:numberOfRowsInSection:) Tells the table view how many rows will be displayed in each section - tableView(_:cellForRowAt:) Sets up each cell that’s going to be displayed in each row of the table view


Featured Posts
Recent Posts
Archive
Search By Tags
No tags yet.
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page