I have implemented an own webform conditional operator. In my javascript code I use Drupal.webform.dateValue to get the value for an date field. The result should be "... calculate a millisecond timestamp from a time field" but the result is divided by 1000.
Why?
Will it stay calculated in seconds in the future?

Comments

  • DanChadwick committed 4eaf1db on 7.x-4.x
    Issue #2541948: JavaScript webform.dateValue docblock wrong.
    
  • DanChadwick committed c5f37e7 on 8.x-4.x
    Issue #2541948: JavaScript webform.dateValue docblock wrong.
    
danchadwick’s picture

Title: JavaScript webform.dateValue wrong? » JavaScript webform.dateValue docblock wrong.
Category: Bug report » Task
Status: Active » Fixed
Issue tags: -conditional, -JavaScript, -date

The comment is wrong. Times are second-based, both in javascript and PHP. The division by 1000 converts the javascript built-in time function's result to seconds.

Committed to 7.x-4.x and 8.x. No patch for this one-word comment fix.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.