Bug #7642
Assigning SESSION:DATE-FORMAT has no effect on existing date instances
0%
Related issues
History
#1 Updated by Vladimir Tsichevski almost 3 years ago
Run this program. Assume the default date format is mdy (as set in directory.xml).
SESSION:DATE-FORMAT = 'ymd'. DEFINE VARIABLE d AS DATE NO-UNDO VIEW-AS FILL-IN FORMAT "9999/99/99". DEFINE FRAME f d. d:SCREEN-VALUE = '1956/12/29'. ENABLE ALL WITH FRAME f. VIEW FRAME f. WAIT-FOR GO OF FRAME f.
In OE the value in the FILL-IN is 1956/12/29, while in FWD it is 0012/29/56.
#2 Updated by Vladimir Tsichevski almost 3 years ago
- Related to Bug #7515: FILL-IN: editing dates issues added
#3 Updated by Vladimir Tsichevski over 1 year ago
I believe any operation involving date formatting or parsing should rely on the current value of SESSION:DATE-FORMAT. This implies that the DateFormat object must either avoid storing any data dependent on SESSION:DATE-FORMAT, or treat such data as a cache. Before performing any operation that is sensitive to SESSION:DATE-FORMAT, it must verify whether the session format has changed and, if so, recalculate any cached data accordingly.
#4 Updated by Vladimir Tsichevski over 1 year ago
- Status changed from New to WIP
- Assignee set to Vladimir Tsichevski
I've created the 7642a branch for this task.
#5 Updated by Vladimir Tsichevski 9 months ago
Vladimir Tsichevski wrote:
In OE the value in the
FILL-INis1956/12/29, while in FWD it is0012/29/56.
After #9855 was fixed, now the in FWD the screen value is 12/29/1956.
Setting the FILL-IN format again synchronizes it with current SESSION:DATE-FORMAT. This can work as a workaround.
The original example with the workaround:
SESSION:DATE-FORMAT = 'ymd'. DEFINE VARIABLE d AS DATE NO-UNDO VIEW-AS FILL-IN FORMAT "9999/99/99". DEFINE FRAME f d. d:SCREEN-VALUE = '1956/12/29'. // Workaround! d:FORMAT = "9999/99/99". ENABLE ALL WITH FRAME f. VIEW FRAME f. WAIT-FOR GO OF FRAME f.
#6 Updated by Vladimir Tsichevski 9 months ago
Vladimir Tsichevski wrote:
Setting the FILL-IN format again synchronizes it with current SESSION:DATE-FORMAT. This can work as a workaround.
This workaround does not work for the default 99/99/99 format.
For the default format, apply the change twice: first to any alternative format, then revert to the original 99/99/99.
#7 Updated by Vladimir Tsichevski 8 months ago
- Related to Bug #10868: Date FILL-IN: INPUT-VALUE attribute is not sensitive to current SESSION:DATE-FORMAT order added