Open ebruchez opened 1 year ago
IsoDate
class/objectfr:date
and Date.scala
For fr:time
, we use oxf.xforms.xbl.fr.time.output-format
, which also translates into form-level and control-level output-format
parameters. This looks like [h01]:[m]:[s]
.
We'd like to introduce oxf.xforms.xbl.fr.date.output-format
. Could we, as a first step, just do that? Instead of using:
property('xxf:format.input.date')
use:
(fr:component-param-value('output-format'), property('xxf:format.input.date'))[1]
This would give us configurability by properties/form/control. Currently supported formats (from the doc):
Format | Example | Description |
---|---|---|
[M]/[D]/[Y] |
11/5/2023 | also called "North American format" |
[D]/[M]/[Y] |
5/11/2023 | also called "European format" |
[D].[M].[Y] |
5.11.2023 | variation with dot separator |
[D]-[M]-[Y] |
5-11-2023 | variation with dash separator |
[M01]/[D01]/[Y] |
11/05/2023 | force two digits for months and days |
[Y]-[M01]-[D01] |
2023-11-05 | ISO format |
It seems that this would work.
oxf.xforms.xbl.fr.date.output-format
fr:date
must still be usable in plain XForms
xxf:function-library="org.orbeon.oxf.fr.library.FormRunnerFunctionLibrary"
What else do we need to do?
This should also address #4794.
Following #5524/#5621, we should do something similar for date fields.
Here are the aspects of date format we need to be able to control, based on the formats we currently support:
/
,.
,-
We currently don't support (I think):