We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Date.now
1 parent ef9c227 commit c0e1381Copy full SHA for c0e1381
1 file changed
Sources/Foundation/Date.swift
@@ -27,6 +27,9 @@ public struct Date : ReferenceConvertible, Comparable, Equatable {
27
return CFAbsoluteTimeGetCurrent()
28
}
29
30
+ /// Returns a `Date` initialized to the current date and time.
31
+ public static var now: Date { Date() }
32
+
33
/// Returns a `Date` initialized to the current date and time.
34
public init() {
35
_time = CFAbsoluteTimeGetCurrent()
0 commit comments