DateTimeGranularity
enum DateTimeGranularity : Int
@enum DateTimeGranularity The precision of a timestamp that was extracted from text.
For example, “tomorrow” has the granularity .day
, while “12:51” has the granularity .minute
.
-
The granularity of the
DateTimeEntity
is unknown.Declaration
Swift
case unknown = 0
-
The
DateTimeEntity
is precise to a specific year.Declaration
Swift
case year = 1
-
The
DateTimeEntity
is precise to a specific month.Declaration
Swift
case month = 2
-
The
DateTimeEntity
is precise to a specific week.Declaration
Swift
case week = 3
-
The
DateTimeEntity
is precise to a specific day.Declaration
Swift
case day = 4
-
The
DateTimeEntity
is precise to a specific hour.Declaration
Swift
case hour = 5
-
The
DateTimeEntity
is precise to a specific minute.Declaration
Swift
case minute = 6
-
The
DateTimeEntity
is precise to a specific second.Declaration
Swift
case second = 7