🐛 Date field does not respect end time switch when exporting database block https://github.com/siyuan-note/siyuan/issues/10409

This commit is contained in:
Daniel 2024-02-23 17:53:43 +08:00
parent 2b2aced238
commit d2dc9623a7
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 15 additions and 11 deletions

View file

@ -117,7 +117,7 @@ func ExportAv2CSV(avID string) (zipPath string, err error) {
if nil != cell.Value {
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, cell.Value.Date.IsNotTime)
cell.Value.Date = av.NewFormattedValueDate(cell.Value.Date.Content, cell.Value.Date.Content2, av.DateFormatNone, cell.Value.Date.IsNotTime, cell.Value.Date.HasEndDate)
}
} else if av.KeyTypeCreated == cell.Value.Type {
if nil != cell.Value.Created {
@ -2274,7 +2274,7 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool,
if nil != cell.Value {
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, cell.Value.Date.IsNotTime)
cell.Value.Date = av.NewFormattedValueDate(cell.Value.Date.Content, cell.Value.Date.Content2, av.DateFormatNone, cell.Value.Date.IsNotTime, cell.Value.Date.HasEndDate)
}
} else if av.KeyTypeCreated == cell.Value.Type {
if nil != cell.Value.Created {