MLKitEntityExtraction 框架参考
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
DateTimeEntity
class DateTimeEntity : NSObject
从文本中提取的日期和时间实体。
-
声明
Swift
var dateTime: Date { get }
-
-
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eDateTimeEntity is an object that represents a date and time extracted from text.\u003c/p\u003e\n"],["\u003cp\u003eIt provides the parsed date and time as a \u003ccode\u003eDate\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eIt specifies the granularity (precision) of the detected date and time.\u003c/p\u003e\n"],["\u003cp\u003eThe initializer for this class is unavailable, implying that it's likely created internally by the system.\u003c/p\u003e\n"]]],["The `DateTimeEntity` class extracts date and time information from text. It provides two key properties: `dateTime`, a `Date` object representing the parsed date and time, and `dateTimeGranularity`, which indicates the precision level of the extracted date and time using a `DateTimeGranularity` enum. The class's initializer (`init`) is unavailable for direct use.\n"],null,["# MLKitEntityExtraction Framework Reference\n\nDateTimeEntity\n==============\n\n class DateTimeEntity : NSObject\n\nA date and time entity extracted from text.\n- `\n ``\n ``\n `\n\n ### [dateTime](#/c:objc(cs)MLKDateTimeEntity(py)dateTime)\n\n `\n ` \n The parsed date and time. \n\n #### Declaration\n\n Swift \n\n var dateTime: Date { get }\n\n- `\n ``\n ``\n `\n\n ### [dateTimeGranularity](#/c:objc(cs)MLKDateTimeEntity(py)dateTimeGranularity)\n\n `\n ` \n The granularity of the date and time. \n\n #### Declaration\n\n Swift \n\n var dateTimeGranularity: ../Enums/DateTimeGranularity.html { get }\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)MLKDateTimeEntity(im)init)\n\n `\n ` \n Unavailable."]]