Use to display the date, stacking month and day.
VStack(alignment: .leading, spacing: Spacing.small) {
PBDateStacked(
alignment: .leading,
date: Date().makeDate(year: 2018, month: 3, day: 20),
variant: .standard,
dateSize: .title4,
isStandardStacked: true
)
PBDateStacked(
alignment: .leading,
date: Date().makeDate(year: 2018, month: 3, day: 20),
variant: .standard,
dateSize: .title3,
isStandardStacked: true
)
}
VStack(alignment: .leading, spacing: Spacing.small) {
PBDateStacked(
alignment: .leading,
date: Date(),
variant: .short(showIcon: false),
dateSize: .title4,
isMonthStacked: true,
isMonthBold: true
)
PBDateStacked(
alignment: .center,
date: Date().makeDate(year: 2018, month: 3, day: 20),
variant: .standard,
dateSize: .title4,
isStandardStacked: true,
isYearBold: true,
isMonthBold: true
)
.frame(maxWidth: .infinity, alignment: .center)
PBDateStacked(
alignment: .trailing,
date: Date(),
variant: .short(showIcon: false),
dateSize: .title4,
isMonthStacked: true,
isMonthBold: true
)
.frame(maxWidth: .infinity, alignment: .trailing)
}
| Name | Type | Description | Default | Values |
|---|---|---|---|---|
| alignment | HorizontalAlignment |
Changes the alignment of the date | .leading |
.leading .trailing |
| dateSize | PBFont |
Sets the size of the date | .body |
.subcaption .caption .body |
| isReversed | Bool |
Boolean value that determines whether or not the month and date are reversed. | false |
true false |
| isMonthStacked | Bool |
Boolean value that determines whether or not the month is stacked | false |
true false |
| isStandardStacked | Bool |
Boolean value that determines whether or not the standard date variant is stacked. | false |
true false |
| isYearBold | Bool |
Boolean value that determines whether or not the the year is bold | false |
true false |
| isMonthBold | Bool |
Boolean value that determines whether or not the month is bold. | false |
true false |