我有这样的云函数代码代码:
console.log(`ts: ${(element.get('expire') as admin.firestore.Timestamp).toDate().toUTCString()} now: ${admin.firestore.Timestamp.now().toDate().toUTCString()}`)
const greater = (element.get('expire') as admin.firestore.Timestamp) > admin.firestore.Timestamp.now()
const lower = (element.get('expire') as admin.firestore.Timestamp) < admin.firestore.Timestamp.now()
console.log(`greater: ${greater} lower: ${lower}`)
Run Code Online (Sandbox Code Playgroud)
在控制台中:
ts:格林威治标准时间 2019 年 4 月 8 日星期一 20:59:59 现在:格林威治标准时间 2019 年 3 月 8 日星期五 20:19:18 GMT
较大:假 较低:假
那么如何正确地与时间戳进行比较?
我以下列方式使用PdfPTable
var myTable = new PdfPTable( 3 );
foreach(var nextString in myStrings)
{
var nextCell = new PdfPCell( new Phrase( nextString, smallFont ) );
nextCell.Border = Rectangle.NO_BORDER;
nextCell.AddCell(nextCell);
}
pdfDocument.Add(myTable);
Run Code Online (Sandbox Code Playgroud)
一切都很完美,然后总细胞数乘以列数(3).但是当我想创建一个包含3列但只有4个单元格的表时 - 最后一行是不可见的.
怎么解决这个问题?
itextsharp 5.3.3.0