Page Summary
-
MLKDateTimeGranularityis an enum defining the precision of a timestamp extracted from text. -
The granularity levels range from unknown to year, month, week, day, hour, minute, and second.
-
Each granularity level indicates the specific unit of time to which a
DateTimeEntityis precise. -
Examples of granularity include "tomorrow" having a
.daygranularity and "12:51" having a.minutegranularity. -
This enum helps developers understand the level of detail associated with a detected date or time.
MLKDateTimeGranularity
enum MLKDateTimeGranularity {}@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
DateTimeEntityis unknown.Declaration
Objective-C
MLKDateTimeGranularityUnknown = 0 -
The
DateTimeEntityis precise to a specific year.Declaration
Objective-C
MLKDateTimeGranularityYear -
The
DateTimeEntityis precise to a specific month.Declaration
Objective-C
MLKDateTimeGranularityMonth -
The
DateTimeEntityis precise to a specific week.Declaration
Objective-C
MLKDateTimeGranularityWeek -
The
DateTimeEntityis precise to a specific day.Declaration
Objective-C
MLKDateTimeGranularityDay -
The
DateTimeEntityis precise to a specific hour.Declaration
Objective-C
MLKDateTimeGranularityHour -
The
DateTimeEntityis precise to a specific minute.Declaration
Objective-C
MLKDateTimeGranularityMinute -
The
DateTimeEntityis precise to a specific second.Declaration
Objective-C
MLKDateTimeGranularitySecond