🎨 Add created and updated type column to database https://github.com/siyuan-note/siyuan/issues/9371

This commit is contained in:
Daniel 2023-10-08 12:16:58 +08:00
parent c1e0b4ff60
commit 917e21f25e
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 302 additions and 4 deletions

View file

@ -1909,8 +1909,18 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool,
mdTableRow.AppendChild(mdTableCell)
var val string
if nil != cell.Value {
if av.KeyTypeDate == cell.Value.Type && nil != cell.Value.Date {
cell.Value.Date = av.NewFormattedValueDate(cell.Value.Date.Content, cell.Value.Date.Content2, av.DateFormatNone)
if av.KeyTypeDate == cell.Value.Type {
if nil != cell.Value.Date {
cell.Value.Date = av.NewFormattedValueDate(cell.Value.Date.Content, cell.Value.Date.Content2, av.DateFormatNone)
}
} else if av.KeyTypeCreated == cell.Value.Type {
if nil != cell.Value.Created {
cell.Value.Created = av.NewFormattedValueCreated(cell.Value.Date.Content, av.CreatedFormatNone)
}
} else if av.KeyTypeUpdated == cell.Value.Type {
if nil != cell.Value.Updated {
cell.Value.Updated = av.NewFormattedValueUpdated(cell.Value.Date.Content, av.UpdatedFormatNone)
}
}
val = cell.Value.String()