mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-05 16:28:49 +01:00
🐛 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:
parent
2b2aced238
commit
d2dc9623a7
3 changed files with 15 additions and 11 deletions
|
|
@ -301,7 +301,7 @@ const (
|
|||
DateFormatDuration DateFormat = "duration"
|
||||
)
|
||||
|
||||
func NewFormattedValueDate(content, content2 int64, format DateFormat, isNotTime bool) (ret *ValueDate) {
|
||||
func NewFormattedValueDate(content, content2 int64, format DateFormat, isNotTime, hasEndDate bool) (ret *ValueDate) {
|
||||
var formatted string
|
||||
contentTime := time.UnixMilli(content)
|
||||
if 0 == content || contentTime.IsZero() {
|
||||
|
|
@ -321,7 +321,7 @@ func NewFormattedValueDate(content, content2 int64, format DateFormat, isNotTime
|
|||
formatted = contentTime.Format("2006-01-02 15:04")
|
||||
}
|
||||
|
||||
if 0 < content2 {
|
||||
if hasEndDate {
|
||||
var formattedContent2 string
|
||||
content2Time := time.UnixMilli(content2)
|
||||
if isNotTime {
|
||||
|
|
@ -343,7 +343,7 @@ func NewFormattedValueDate(content, content2 int64, format DateFormat, isNotTime
|
|||
ret = &ValueDate{
|
||||
Content: content,
|
||||
Content2: content2,
|
||||
HasEndDate: false,
|
||||
HasEndDate: hasEndDate,
|
||||
IsNotTime: true,
|
||||
FormattedContent: formatted,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue