VGSDate
public struct VGSDate
extension VGSDate: Comparable
Struct that represents a date including year, month and day. It doesn’t include hours, minutes or seconds.
-
Get the day formatted value, for example if the day is
1it is returned as01Declaration
Swift
public var dayFormatted: String { get } -
Get the month formatted value, for example if the month is
3it is returned as03Declaration
Swift
public var monthFormatted: String { get }
-
Create a new instance of a
VGSDateobject, if the date is not valid, it returnsnilDeclaration
Swift
public init?(day: Int, month: Int, year: Int)Parameters
dayInt. Represents the day in the date.monthInt. Represents the month in the date.yearInt. Represents the year in the date.Return Value
VGSDate, date reference or nil if the date is invalid.
View on GitHub