templates/components/common-js.html.twig line 1

Open in your IDE?
  1.     var _numberFormat = function (value) {
  2.         if (value === 0) {
  3.             return 0;
  4.         }
  5.         if (! value) {
  6.             return null;
  7.         }
  8.         return value.toString().replace( /([0-9]+?)(?=(?:[0-9]{3})+$)/g , '$1,' );
  9.     };
  10.     var _dateFormat = function (date, format) {
  11.         dayjs.locale('ja');
  12.         if (typeof format === 'undefined') {
  13.             // format = 'YYYY.MM.DD(ddd) HH:mm';
  14.             format = 'YYYY.MM.DD';
  15.         }
  16.         var d = dayjs(date);
  17.         return d.format(format);
  18.     };