You can use the Calendar and Date components to get the first day of the current month in Swift:
main.swift236 chars8 lines
And then you can simply call:
main.swift49 chars2 lines
Or, you can create a function to get the first day of any month for any date:
main.swift311 chars9 lines
gistlibby LogSnag