MLKitEntity 擷取架構參考資料
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
DateTimeEntity
class DateTimeEntity : NSObject
從文字中擷取的日期和時間實體。
-
聲明
Swift
var dateTime: Date { get }
-
-
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間: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."]]