Project

Profile

Help

Bug #3596

current-date and current-dateTime does not give the instant date/time stamp

Added by O'Neil Delpratt 7 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
2018-01-03
Due date:
% Done:

100%

Applies to JS Branch:
1.0, Trunk
Fix Committed on JS Branch:
1.0, Trunk
Fixed in JS Release:
SEF Generated with:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

The current-date and current-dateTime does not give the instant date/time stamp when called during an 'interactive' XSLT event. This is noticeable if the browser is not refreshed overnight.

As a workaround I guess I could force a call to the transform function or call out to JavaScript.

It would be desirable to have implemented in Saxon-JS the extension function saxon:timestamp.

History

#2 Updated by Michael Kay 7 months ago

I think it would probably make sense for current-dateTime() to be updated whenever an ixsl:schedule-action occurs or when an event-driven template rule is activated. If we went this way we would have to make sure that the optimizer is aware that current-dateTime() and friends are no longer pure functions, and mustn't be promoted to global variables. If that proves problematic, then using saxon:timestamp() for the purpose might be an alternative way forward.

Note also that implicit-timezone() can also potentially change while a stylesheet is waiting for the next user event.

#3 Updated by Debbie Lockett 5 months ago

Function saxon:timestamp() implemented (1.0 and trunk branches).

#4 Updated by Debbie Lockett 4 months ago

JS unit test saxonExt/timestamp01 added (note saxon:timestamp() available from 9.8).

To do: add information to documentation.

#5 Updated by Debbie Lockett 4 months ago

  • Status changed from New to Resolved
  • Fix Committed on JS Branch 1.0, Trunk added

Documentation updated: added subsection about available Saxon extensions in Conformance section (conformance/saxon-extensions).

#6 Updated by Debbie Lockett 2 months ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in JS Release set to Saxon-JS 1.1.0

Bug fix applied in the Saxon-JS 1.1.0 maintenance release.

Please register to edit this issue

Also available in: Atom PDF Tracking page