I'd like to propose adding a %W
identifier to the XPath functions format-date() and format-date-time() to return the week number as specified under ISO 8601 .
The %W
identifier was copied from an another implementation in Python.
This is a sample JS implementation: https://www.epoch-calendar.com/support/getting_iso_
Some Enketo users have expressed interest in this functionality. It is relatively minor and probably not controversial.
cc @LN , @Xiphware
LN
November 19, 2019, 7:25pm
2
That sounds good to me! My preference would be to base it off XPath 3.1 which by default outputs an integer. The Python function you point to outputs a 0-padded 2-digit decimal.
1 Like
Ah, I forgot to look at XPath specs... Thank you! I agree to use that as that as the spec for this %W
identifier addition.
FWIW, I likewise agree with proposal, and using XPath 3.1 spec thereof.
1 Like
LN
February 10, 2020, 5:47pm
5
Filed at https://github.com/opendatakit/xforms-spec/issues/265 since there have been no objections and when a feature comes from an existing spec we usually go straight ahead.
Lal_S
February 12, 2020, 12:52pm
6
Very useful would love to see it.
1 Like