[ Index ]

PHP Cross Reference of phpBB-3.3.7-deutsch

title

Body

[close]

/vendor/s9e/text-formatter/src/Parser/AttributeFilters/ -> TimestampFilter.js (source)

   1  /** @const */
   2  var TimestampFilter =
   3  {
   4      /**
   5      * @param  {*} attrValue
   6      * @return {*}
   7      */
   8      filter: function(attrValue)
   9      {
  10          var m = /^(?=\d)(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?$/.exec(attrValue);
  11          if (m)
  12          {
  13              return 3600 * (m[1] || 0) + 60 * (m[2] || 0) + (+m[3] || 0);
  14          }
  15  
  16          return NumericFilter.filterUint(attrValue);
  17      }
  18  };


Generated: Thu Mar 24 21:31:15 2022 Cross-referenced by PHPXref 0.7.1