Deprecation warning in Moment.js – Not in a recognized ISO format

I’m getting a warning that a value provided to moment is not in a recognized ISO format. I changed my variable today with the moment function and still it doesn’t work.

Here’s the warning error:

Deprecation warning: value provided is not in a recognized ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to for more info.
[0] _isAMomentObject: true, _isUTC: true, _useUTC: true, _l: undefined, _i: 2016-9-26 19:30, _f: undefined, _strict: undefined, _locale: [object Object]

var entryDate = new Date();
var currentDate = entryDate.getDate();

function between(x, min, max) {
  return x.valueOf() >= min.valueOf() && x < max.valueOf();

$('#custom1').change(function () {
  if ($('#custom1 :selected').val() == 'AU') {
    var keyword = '';

    var aus1_s ='2016-9-26 19:30', 'Australia/Sydney');
    var aus2_s ='2016-10-2 19:30', 'Australia/Sydney');
    var aus3_s ='2016-10-9 19:30', 'Australia/Sydney');
    var aus4_s ='2016-10-16 19:30', 'Australia/Sydney');
    var aus5_s ='2016-10-23 19:30', 'Australia/Sydney');
    var aus6_s ='2016-10-30 19:30', 'Australia/Sydney');
    var aus6_e ='2016-11-5 19:30', 'Australia/Sydney');
  } else if ($('#custom1 :selected').val() == 'NZ') {
    var aus1_s ='2016-9-28 20:30', 'Pacific/Auckland');
    var aus2_s ='2016-10-4 20:30', 'Pacific/Auckland');
    var aus3_s ='2016-10-11 20:30', 'Pacific/Auckland');
    var aus4_s ='2016-10-18 20:30', 'Pacific/Auckland');
    var aus5_s ='2016-10-25 20:30', 'Pacific/Auckland');
    var aus6_s ='2016-11-2 20:30', 'Pacific/Auckland');
    var aus6_e ='2016-11-9 20:30', 'Pacific/Auckland');
  } else {
    return false;

  var today = moment();

  switch (true) {
    case between(today, aus1_s, aus2_s):
      keyword = 'RElYT04=';

    case between(today, aus2_s, aus3_s):
      keyword = 'QlJJREU=';

    case between(today, aus3_s, aus4_s):
      keyword = 'U1lETkVZ';

    case between(today, aus4_s, aus5_s):
      keyword = 'R1JPT00=';

    case between(today, aus5_s, aus6_s):
      keyword = 'V0VERElORw==';

    case between(today, aus6_s, aus6_e):
      keyword = 'VExD';



35 thoughts on “Deprecation warning in Moment.js – Not in a recognized ISO format”

  1. 736815 646958This is a very good subject to speak about. Sometimes I fav stuff like this on Redit. I dont feel this would be the very best to submit though. Ill take a appear around your website though and submit something else. 13230


Leave a Comment