# 日付系の処理メモ

# Calendar

let calendar = Calendar.current
// Create the start date components
var oneDayAgoComponents = DateComponents()
oneDayAgoComponents.day = -1
let oneDayAgo = calendar.date(byAdding: oneDayAgoComponents, to: Date())

// Create the end date components.
var oneYearFromNowComponents = DateComponents()
oneYearFromNowComponents.year = 1
let oneYearFromNow = calendar.date(byAdding: oneYearFromNowComponents, to: Date())

[ 📩 ご意見 ]