func isEqual (to: Date) -> Bool
func earlierDate (Date) -> Date
func laterDate (Date) -> Date
Availability 有効性
Technology
func compare(_ other: Date
) -> ComparisonResult
anotherDate
The date with which to compare the receiver. レシーバと比較する日付。
This value must not be nil
. If the value is nil
, the behavior is undefined and may change in future versions of macOS.
この値は、nil
ではいけません。値がnil
ならば、その挙動は未定義です、そして将来のバージョンのmacOSで変更されるかもしれません。
If: もし:
The receiver and another
are exactly equal to each other, Comparison
レシーバとanother
が互いに正確に等しいならば、Comparison
The receiver is later in time than another
, Comparison
レシーバが時間でanother
より後ならば、Comparison
The receiver is earlier in time than another
, Comparison
.
レシーバが時間でanother
より前ならば、Comparison
。
This method detects sub-second differences between dates. If you want to compare dates with a less fine granularity, use time
to compare the two dates.
このメソッドは、日付間の秒未満の差異を検知します。あなたが一層小さい精細粒度で日付を比較したいならば、time
を使って2つの日付を比較してください。
func isEqual (to: Date) -> Bool
func earlierDate (Date) -> Date
func laterDate (Date) -> Date
func isEqual (Any?) -> Bool