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
1
it is returned as01
Declaration
Swift
public var dayFormatted: String { get }
-
Get the month formatted value, for example if the month is
3
it is returned as03
Declaration
Swift
public var monthFormatted: String { get }
-
Create a new instance of a
VGSDate
object, if the date is not valid, it returnsnil
Declaration
Swift
public init?(day: Int, month: Int, year: Int)
Parameters
day
Int
. Represents the day in the date.month
Int
. Represents the month in the date.year
Int
. Represents the year in the date.Return Value
VGSDate
, date reference or nil if the date is invalid.