prettycron icon indicating copy to clipboard operation
prettycron copied to clipboard

Every minute past every hour

Open dhwang opened this issue 8 years ago • 1 comments

When cron expression specifies to run on every minutes, it currently enumerates every minutes from 0 to 59. It would be simpler to simply skip the enumeration in this case and just leave it at "Every minute past every hour".

var numberList = function(numbers, unit) {
    if (numbers.length < 2) {
      return moment()._locale.ordinal(numbers);
    }

   // skip enumeration
    if (unit && unit === 'm' && numbers.length == 60)
      return ' '; // "Every minute"

   var last_val = numbers.pop();
    return numbers.join(', ') + ' and ' + moment()._locale.ordinal(last_val);
  };

dhwang avatar Oct 07 '16 00:10 dhwang

This should be fixed with changes made in #28

anderssonjohan avatar Nov 13 '16 23:11 anderssonjohan