Support #4888
closedGetting current-dateTime()/js:Date() in UI/browser
0%
Description
I have a UI in which I would like to display some duration info along side certain dates. E.g. "Today at 4:00 pm (2 minutes ago)". Implementing this in xslt is easy enough, however the UI should really update this text as time marches on. If your browser stays open, at some point it should say "Yesterday at 4:00 pm (9 hours ago)".
The problem is that current-dateTime()
always returns the time at which the window was loaded. I assume this is a 'no side-effects' thing. I've tried implementing a JavaScript function that returns Date().toISOString(). That works when the pages is loaded, but when the function is called a second time I'm getting "XError:ixsl:call: property 'isoDate' is not a function; code:SXJS0007"
This is pretty common thing to do in a UI, so I assume there's a way to do it with Saxon-JS that I haven't figured out. Any guidance would be appreciated!
Please register to edit this issue
Also available in: Atom PDF Tracking page