templates/validation-function/time-module.js
function convertToTimestamp(value) {
    if (value instanceof Date) {
      return value.getTime();
    } else if (typeof value === 'number') {
      return Math.floor(value);
    } else if (typeof value === 'string') {
      return Date.parse(value);
    } else {
      return NaN;
    }
  }
function convertToTimestamp(value) {
    if (value instanceof Date) {
      return value.getTime();
    } else if (typeof value === 'number') {
      return Math.floor(value);
    } else if (typeof value === 'string') {
      return Date.parse(value);
    } else {
      return NaN;
    }
  }
function convertToTimestamp ( value ) { if ( value instanceof Date ) { return value . getTime ( ) ; } else if ( typeof value === 'number' ) { return Math . floor ( value ) ; } else if ( typeof value === 'string' ) { return Date . parse ( value ) ; } else { return NaN ; } }
Converts the given date representation to a timestamp that represents the number of ms since the Unix epoch
Converts the given date representation to a timestamp that represents the number of ms since the Unix epoch