GetTimeUTC
Returns the timestamp of the comment creation in UTC format.
Syntax
expression.GetTimeUTC();
expression
- A variable that represents a ApiComment class.
Parameters
This method doesn't have any parameters.
Returns
Number
Example
This example shows how to get the timestamp of the comment creation in UTC format.
let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("This is just a sample text");
Api.AddComment(paragraph, "comment", "John Smith");
let comments = doc.GetAllComments();
comments[0].SetTimeUTC("1672247153658");
let timeUTC = comments[0].GetTimeUTC();
paragraph = Api.CreateParagraph();
paragraph.AddText("The timestamp of comment creation in UTC format: " + timeUTC);
doc.Push(paragraph);