DayOfWeek

public class DayOfWeek

Constants to represent days of the week (Monday = 1 to Sunday = 7, using ISO 8601 conventions).

  • Monday.

    Declaration

    Swift

    public static let monday: Int = (1 as Int)
  • Tuesday.

    Declaration

    Swift

    public static let tuesday: Int = (2 as Int)
  • Wednesday.

    Declaration

    Swift

    public static let wednesday: Int = (3 as Int)
  • Thursday.

    Declaration

    Swift

    public static let thursday: Int = (4 as Int)
  • Friday.

    Declaration

    Swift

    public static let friday: Int = (5 as Int)
  • Saturday.

    Declaration

    Swift

    public static let saturday: Int = (6 as Int)
  • Sunday.

    Declaration

    Swift

    public static let sunday: Int = (7 as Int)
  • Declaration

    Swift

    public static func name(day: Int) -> String

    Parameters

    day

    Day of week (Monday = 1 to Sunday = 7).

    Return Value

    The English day name with starting capital letter.