text: /*
   * testdatefmtrange_it_IT.js - test the date range formatter object in Italian/Italy
   * 
   * Copyright © 2012-2017, JEDLSoft
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  if (typeof(GregorianDate) === "undefined") {
      var GregorianDate = require("../../lib/GregorianDate.js");
  }
  if (typeof(DateRngFmt) === "undefined") {
      var DateRngFmt = require("../../lib/DateRngFmt.js");
  }
  if (typeof(ilib) === "undefined") {
      var ilib = require("../../lib/ilib.js");
  }
  
  module.exports.testdatefmtrange_it_IT = {
      setUp: function(callback) {
          ilib.clearCache();
          callback();
      },
  
      testDateRngFmtITRangeinDayShort: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "short"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "31/12/11, 13:45 – 14:30");
          test.done();
      },
      testDateRngFmtITRangeinDayMedium: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "medium"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "31 dic 2011, 13:45 – 14:30");
          test.done();
      },
      testDateRngFmtITRangeinDayLong: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "long"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "31 dicembre 2011 13:45 – 14:30");
          test.done();
      },
      testDateRngFmtITRangeinDayFull: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "full"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "31 dicembre 2011 13:45 – 14:30");
          test.done();
      },
      
      testDateRngFmtITRangeNextDayShort: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "short"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 12,
              day: 30,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "30/12/11, 13:45 – 31/12/11, 14:30");
          test.done();
      },
      testDateRngFmtITRangeNextDayMedium: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "medium"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 12,
              day: 30,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "30 dic 2011, 13:45 – 31 dic 2011, 14:30");
          test.done();
      },
      testDateRngFmtITRangeNextDayLong: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "long"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 12,
              day: 30,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "30 dicembre 2011 13:45 – 31 dicembre 2011 14:30");
          test.done();
      },
      testDateRngFmtITRangeNextDayFull: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "full"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 12,
              day: 30,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "30 dicembre 2011 13:45 – 31 dicembre 2011 14:30");
          test.done();
      },
      
      testDateRngFmtITRangeMultiDayShort: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "short"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 12,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "20 – 31/12/11");
          test.done();
      },
      testDateRngFmtITRangeMultiDayMedium: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "medium"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 12,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "20 – 31 dic 2011");
          test.done();
      },
      testDateRngFmtITRangeMultiDayLong: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "long"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 12,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "20 – 31 dicembre 2011");
          test.done();
      },
      testDateRngFmtITRangeMultiDayFull: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "full"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 12,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "20 – 31 dicembre 2011");
          test.done();
      },
      
      testDateRngFmtITRangeNextMonthShort: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "short"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "20/11 – 31/12/11");
          test.done();
      },
      testDateRngFmtITRangeNextMonthMedium: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "medium"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "20 nov – 31 dic 2011");
          test.done();
      },
      testDateRngFmtITRangeNextMonthLong: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "long"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "20 novembre – 31 dicembre 2011");
          test.done();
      },
      testDateRngFmtITRangeNextMonthFull: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "full"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2011,
              month: 12,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "20 novembre – 31 dicembre 2011");
          test.done();
      },
      
      testDateRngFmtITRangeNextYearShort: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "short"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2012,
              month: 1,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "20/11/11 – 31/01/12");
          test.done();
      },
      testDateRngFmtITRangeNextYearMedium: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "medium"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2012,
              month: 1,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "20 nov 2011 – 31 gen 2012");
          test.done();
      },
      testDateRngFmtITRangeNextYearLong: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "long"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2012,
              month: 1,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "20 novembre 2011 – 31 gennaio 2012");
          test.done();
      },
      testDateRngFmtITRangeNextYearFull: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "full"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2012,
              month: 1,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "20 novembre 2011 – 31 gennaio 2012");
          test.done();
      },
      
      testDateRngFmtITRangeMultiYearShort: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "short"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2014,
              month: 1,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "11/11 – 01/14");
          test.done();
      },
      testDateRngFmtITRangeMultiYearMedium: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "medium"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2014,
              month: 1,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "nov 2011 – gen 2014");
          test.done();
      },
      testDateRngFmtITRangeMultiYearLong: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "long"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2014,
              month: 1,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "novembre 2011 – gennaio 2014");
          test.done();
      },
      testDateRngFmtITRangeMultiYearFull: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "full"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2014,
              month: 1,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "novembre 2011 – gennaio 2014");
          test.done();
      },
      testDateRngFmtITManyYearsFull: function(test) {
          test.expect(2);
          var fmt = new DateRngFmt({locale: "it-IT", length: "full"});
          test.ok(fmt !== null);
          
          var start = new GregorianDate({
              year: 2011,
              month: 11,
              day: 20,
              hour: 13,
              minute: 45,
              second: 0,
              millisecond: 0
          });
          var end = new GregorianDate({
              year: 2064,
              month: 1,
              day: 31,
              hour: 14,
              minute: 30,
              second: 0,
              millisecond: 0
          });
          test.equal(fmt.format(start, end), "2011 – 2064");
          test.done();
      }
      
  };
  