Instance Methodswift 6.0.3FoundationInternationalization->FoundationEssentials
input(before:)
- iOS
- 16.4+
- macOS
- 13.3+
- tvOS
- 16.4+
- watchOS
- 9.4+
func input(before input: Date) -> Date?
func input(before input: Date) -> Date?
s20FoundationEssentials4DateV0A20InternationalizationE27AnchoredRelativeFormatStyleV5input6beforeACSgAC_tF
What are these?6EUFW
import FoundationEssentials
import FoundationInternationalization
struct AnchoredRelativeFormatStyle
A relative format style that is detached from the system time, and instead formats an anchor date relative to the format input.
struct Date
Date
represents a single point in time.
init(anchor: Date, allowedFields: Set<Date.AnchoredRelativeFormatStyle.Field>, presentation: Date.AnchoredRelativeFormatStyle.Presentation = .numeric, unitsStyle: Date.AnchoredRelativeFormatStyle.UnitsStyle = .wide, locale: Locale = .autoupdatingCurrent, calendar: Calendar = .autoupdatingCurrent, capitalizationContext: FormatStyleCapitalizationContext = .unknown)
Create a relative format style that is detached from the system time, and instead formats an anchor date relative to the format input.
init(anchor: Date, presentation: Date.AnchoredRelativeFormatStyle.Presentation = .numeric, unitsStyle: Date.AnchoredRelativeFormatStyle.UnitsStyle = .wide, locale: Locale = .autoupdatingCurrent, calendar: Calendar = .autoupdatingCurrent, capitalizationContext: FormatStyleCapitalizationContext = .unknown)
Create a relative format style that is detached from the system time, and instead formats an anchor date relative to the format input.
init(from decoder: any Decoder) throws
var allowedFields: Set<Date.AnchoredRelativeFormatStyle.Field> { get set }
The fields that can be used in the formatted output.
var anchor: Date
The date the formatted output refers to from the perspective of the input values.
var calendar: Calendar { get set }
var capitalizationContext: FormatStyleCapitalizationContext { get set }
var locale: Locale { get set }
var presentation: Date.AnchoredRelativeFormatStyle.Presentation { get set }
var unitsStyle: Date.AnchoredRelativeFormatStyle.UnitsStyle { get set }
func discreteInput(after input: Date) -> Date?
func discreteInput(before input: Date) -> Date?
func format(_ input: Date) -> String
func input(after input: Date) -> Date?
func locale(_ locale: Locale) -> Date.AnchoredRelativeFormatStyle
typealias Field = Date.RelativeFormatStyle.Field
typealias Presentation = Date.RelativeFormatStyle.Presentation
typealias UnitsStyle = Date.RelativeFormatStyle.UnitsStyle