stroom-docs icon indicating copy to clipboard operation
stroom-docs copied to clipboard

stroom:format-date() documentation needs revamp

Open DS177 opened this issue 4 years ago • 2 comments

Using the format-date() function confusing for non-UK locations if following the Stroom Documentation examples. TimeZone ID needs to be in long format eg Europe/London, Pacific/Auckland, Australia/Canberra. But this is not intuitive from the documentation provided.

Change documentation to be more helpful:

  • Show working examples of all 5 arguments.
  • Expected output of examples is always useful.
  • Changing GMT/BST in the doco to be Europe/London
  • Above 3 things would probably be OK but an example or two from other timezones would be useful
  • Maybe something re timezone/offset format a bit like what is in [https://binkley.blogspot.com/2019/02/java-date-time-timezone-formats.html] . I'm not sure whether Stroom format-date() supports all these options so it would be good to know.

Also current documentation example 3 incorrect - 'GMT+1:00' should be 'GMT+0100'

In attached documents: Tests 1-3 correspond to the first three examples in Stroom documentation format-date(). Tests 4-6 correspond to the Stroom unit tests. Tests 7-12 is attempts to get it timezone working for NZ. Several issues here - The 'NZ' ID works for date/time but can't generate an offset if this is the ID. The 'NST' fails completely. I would have thought I should use NZST/NZDT for the 5th argument but that generates errors. Have to use 'Pacific/Auckland' as timezone to get things working OK TimeZone Tests TimeZone Tests - Output FormatDate Translation Errors

Additional info in Slack #stroom-content 15Nov21

DS177 avatar Nov 20 '21 01:11 DS177

This is the page in question

https://gchq.github.io/stroom-docs/docs/user-guide/pipelines/xslt/xslt-functions/#format-date

at055612 avatar Jan 27 '23 11:01 at055612

Loosely related to #78 in the sense that some of the docs need to be generated from java annotations in the code.

at055612 avatar Jan 27 '23 11:01 at055612