Date

struct Date : ReferenceConvertible, Comparable, Equatable
  • This returns date after given years and months

    Declaration

    Swift

    func getDateAfter(years: Int, months: Int) -> Date

    Parameters

    years

    years

    months

    months

    Return Value

    Retruns date after the given time

  • Returns month details for date

    Declaration

    Swift

    func getMonth() -> (month: Int, year: Int, name: String)

    Return Value

    Returns tuple of month count, year and month name

  • This function returns if given date is same as another

    Declaration

    Swift

    func isSame(_ date: Date?) -> Bool

    Parameters

    date

    Date to compare

    Return Value

    Result in boolean

  • This function checks that selected date is less than today or not

    Declaration

    Swift

    func isMinus() -> Bool

    Return Value

    Result in boolean