text: 
  test("Test - Single expression", function() {
  
  
      var text = "10 Agosto 2012";
      var results = chrono.parse(text, new Date(2012,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if (result) {
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == 2012, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 8, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.start.get('day') == 10, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          ok(result.index == 0, 'Wrong index')
          ok(result.text == '10 Agosto 2012', result.text )
  
          var resultDate = result.start.date();
          var expectDate = new Date(2012, 8-1, 10, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  
      var text = "10 Agosto 234 AC";
      var results = chrono.parse(text, new Date(2012,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if (result) {
          ok(result.index == 0, 'Wrong index')
          ok(result.text == '10 Agosto 234 AC', result.text )
  
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == -234, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 8, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.start.get('day') == 10, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          var resultDate = result.start.date();
          var expectDate = new Date(-234, 8-1, 10, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  
  
      var text = "10 Agosto 88 d. C.";
      var results = chrono.parse(text, new Date(2012,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if (result) {
          ok(result.index == 0, 'Wrong index')
          ok(result.text == '10 Agosto 88 d. C.', result.text )
  
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == 88, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 8, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.start.get('day') == 10, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          var resultDate = result.start.date();
          var expectDate = new Date(88, 8-1, 10, 12);
          expectDate.setFullYear(88);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  
  
      var text = 'Dom 15Sep';
      var results = chrono.parse(text, new Date(2013,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if(result){
          ok(result.index == 0, 'Wrong index')
          ok(result.text == 'Dom 15Sep', result.text )
  
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == 2013, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 9, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.start.get('day') == 15, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          var resultDate = result.start.date();
          var expectDate = new Date(2013, 9-1, 15, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  
      var text = 'DOM 15SEP';
      var results = chrono.parse(text, new Date(2013,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if(result){
          ok(result.index == 0, 'Wrong index')
          ok(result.text == 'DOM 15SEP', result.text )
  
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == 2013, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 9, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.start.get('day') == 15, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          var resultDate = result.start.date();
          var expectDate = new Date(2013, 9-1, 15, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  
      var text = "La fecha final es el 10 Agosto";
      var results = chrono.parse(text, new Date(2012,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if (result) {
  
          ok(result.index == 21, 'Wrong index')
          ok(result.text == '10 Agosto', result.text )
  
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == 2012, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 8, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.start.get('day') == 10, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          var resultDate = result.start.date();
          var expectDate = new Date(2012, 8-1, 10, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  
  
      var text = "La fecha final es el Martes, 10 Enero";
      var results = chrono.parse(text, new Date(2012,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if (result) {
  
          ok(result.index == 21, 'Wrong index')
          ok(result.text == 'Martes, 10 Enero', result.text )
  
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == 2013, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 1, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.start.get('day') == 10, 'Test Result - (Day) ' + JSON.stringify(result.start) )
          ok(result.start.get('weekday') == 2, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          var resultDate = result.start.date();
          var expectDate = new Date(2013, 1-1, 10, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  
  
      var text = "La fecha final es el Mar, 10 Enero";
      var results = chrono.parse(text, new Date(2012,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if (result) {
  
          ok(result.index == 21, 'Wrong index')
          ok(result.text == 'Mar, 10 Enero', result.text )
  
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == 2013, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 1, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.start.get('day') == 10, 'Test Result - (Day) ' + JSON.stringify(result.start) )
          ok(result.start.get('weekday') == 2, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          var resultDate = result.start.date();
          var expectDate = new Date(2013, 1-1, 10, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  
  });
  
  
  test("Test - Range expression", function() {
  
  
      var text = "10 - 22 Agosto 2012";
      var results = chrono.parse(text, new Date(2012,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if(result){
  
          ok(result.index == 0, 'Wrong index')
          ok(result.text == '10 - 22 Agosto 2012', result.text )
  
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == 2012, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 8, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.start.get('day') == 10, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          var resultDate = result.start.date();
          var expectDate = new Date(2012, 8-1, 10, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
  
  
          ok(result.end, JSON.stringify(result.end) )
          ok(result.end.get('year') == 2012, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.end.get('month') == 8, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.end.get('day') == 22, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          var resultDate = result.end.date();
          var expectDate = new Date(2012, 8-1, 22, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  
  
      var text = "10 al 22 Agosto 2012";
      var results = chrono.parse(text, new Date(2012,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if(result){
  
          ok(result.index == 0, 'Wrong index')
          ok(result.text == '10 al 22 Agosto 2012', result.text )
  
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == 2012, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 8, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.start.get('day') == 10, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          var resultDate = result.start.date();
          var expectDate = new Date(2012, 8-1, 10, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
  
  
          ok(result.end, JSON.stringify(result.end) )
          ok(result.end.get('year') == 2012, 'Test Result - (Year) ' + JSON.stringify(result.end) )
          ok(result.end.get('month') == 8, 'Test Result - (Month) ' + JSON.stringify(result.end) )
          ok(result.end.get('day') == 22, 'Test Result - (Day) ' + JSON.stringify(result.end) )
  
          var resultDate = result.end.date();
          var expectDate = new Date(2012, 8-1, 22, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  
      var text = "10 Agosto - 12 Septiembre";
      var results = chrono.parse(text, new Date(2012,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if(result){
  
          ok(result.index == 0, 'Wrong index')
          ok(result.text == '10 Agosto - 12 Septiembre', result.text )
  
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == 2012, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 8, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.start.get('day') == 10, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          var resultDate = result.start.date();
          var expectDate = new Date(2012, 8-1, 10, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
  
  
          ok(result.end, JSON.stringify(result.end) )
          ok(result.end.get('year') == 2012, 'Test Result - (Year) ' + JSON.stringify(result.end) )
          ok(result.end.get('month') == 9, 'Test Result - (Month) ' + JSON.stringify(result.end) )
          ok(result.end.get('day') == 12, 'Test Result - (Day) ' + JSON.stringify(result.end) )
  
          var resultDate = result.end.date();
          var expectDate = new Date(2012, 9-1, 12, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  
      var text = "10 Agosto - 12 Septiembre 2013";
      var results = chrono.parse(text, new Date(2012,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if(result){
  
          ok(result.index == 0, 'Wrong index')
          ok(result.text == '10 Agosto - 12 Septiembre 2013', result.text )
  
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == 2013, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 8, 'Test Result - (Month) ' + JSON.stringify(result.start) )
          ok(result.start.get('day') == 10, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
          var resultDate = result.start.date();
          var expectDate = new Date(2013, 8-1, 10, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
  
  
          ok(result.end, JSON.stringify(result.end) )
          ok(result.end.get('year') == 2013, 'Test Result - (Year) ' + JSON.stringify(result.end) )
          ok(result.end.get('month') == 9, 'Test Result - (Month) ' + JSON.stringify(result.end) )
          ok(result.end.get('day') == 12, 'Test Result - (Day) ' + JSON.stringify(result.end) )
  
          var resultDate = result.end.date();
          var expectDate = new Date(2013, 9-1, 12, 12);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  });
  
  
  test("Test - Combined expression", function() {
  
      var text = "12 de Julio a las 19:00";
      var results = chrono.parse(text, new Date(2012,7,10));
      ok(results.length == 1, JSON.stringify( results ) )
  
      var result = results[0];
      if(result){
          ok(result.index == 0, 'Wrong index')
          ok(result.text == '12 de Julio a las 19:00', result.text )
  
          ok(result.start, JSON.stringify(result.start) )
          ok(result.start.get('year') == 2012, 'Test Result - (Year) ' + JSON.stringify(result.start) )
          ok(result.start.get('month') == 7, 'Test Result - (Month) ' + JSON.stringify(result) )
          ok(result.start.get('day') == 12, 'Test Result - (Day) ' + JSON.stringify(result.start) )
  
  
          var resultDate = result.start.date();
          var expectDate = new Date(2012, 7-1, 12, 19, 0);
          ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 100000, 'Test result.startDate ' + resultDate +'/' +expectDate)
      }
  
  });
  
  test("Test - Impossible Dates (Strict Mode)", function() {
  
      var text = "32 Agosto 2014";
      var results = chrono.strict.parse(text, new Date(2012,7,10));
      ok(results.length == 0, JSON.stringify( results ) )
  
      var text = "29 Febrero 2014";
      var results = chrono.strict.parse(text, new Date(2012,7,10));
      ok(results.length == 0, JSON.stringify( results ))
  
      var text = "32 Agosto";
      var results = chrono.strict.parse(text, new Date(2012,7,10));
      ok(results.length == 0, JSON.stringify( results ))
  
      // TODO
      var text = "29 Febuary";
      var results = chrono.strict.parse(text, new Date(2012,7,10));
      ok(results.length == 0, JSON.stringify( results ))
  
  });
  
  test("Test - Impossible Dates (Casual Mode)", function() {
  
      var text = "32 Agosto 2015";
      var expectDate = new Date(2015, 8, 1, 12, 0);
      var results = chrono.parse(text);
      var resultDate = results[0].start.date();
      ok(results.length == 1, JSON.stringify(results) )
      ok(Math.abs(expectDate.getTime() - resultDate.getTime()) < 1000, resultDate +'/' +expectDate);
  });