Bug 168569 - Date literal has type "Double" in Basic
Summary: Date literal has type "Double" in Basic
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:26.2.0 target:25.8.3 target:25...
Keywords: implementationError
Depends on:
Blocks:
 
Reported: 2025-09-26 19:30 UTC by Mike Kaganski
Modified: 2025-09-29 14:57 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2025-09-26 19:30:45 UTC
This code:

Sub TestDateLiteral
  MsgBox TypeName(#2025-09-26#)
End Sub

unexpectedly produces "Double" instead of "Date".

The problem was discussed in https://gerrit.libreoffice.org/c/core/+/36002, where support for date literals was implemented for bug 93727. The problem there was in NextSym(); at that time, no solution was found for keeping the type of parsed literal, so SbxDOUBLE was assigned.

I mark this "implementationError", but "implementationDefect" would fit better IMO.
Comment 1 Mike Kaganski 2025-09-26 19:53:34 UTC
https://gerrit.libreoffice.org/c/core/+/191555
Comment 2 Commit Notification 2025-09-26 21:18:06 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/22d7827c6695358e11ee06a5599b72a92ff0b2ac

tdf#168569: support date values in string pool

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2025-09-29 10:12:12 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/3d7003a7c1010ba50cb6442f407d2560d9aaf26a

tdf#168569: support date values in string pool

It will be available in 25.8.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2025-09-29 14:57:46 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8-2":

https://git.libreoffice.org/core/commit/141585c001780bd1e9c580198c1fe17d604aae05

tdf#168569: support date values in string pool

It will be available in 25.8.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.