Esempio n. 1
0
        public void GTSExamplesTest07()
        {
            // Create a periodic interval with first week of all Septembers
            PIVL <TS> firstWeekofSept = new PIVL <TS>
                                        (
                new IVL <TS>(
                    new TS(new DateTime(2011, 09, 01), DatePrecision.Day),
                    new TS(new DateTime(2011, 09, 08), DatePrecision.Day)
                    ),
                new PQ(1, "a")
                                        );
            // Create a periodic interval of all mondays
            PIVL <TS> mondays = new PIVL <TS>
                                (
                new TS(new DateTime(2011, 01, 03), DatePrecision.Day).ToIVL(),
                new PQ(1, "wk")
                                );

            // Intersect to get labour day
            GTS labourDay = new GTS(
                QSI <TS> .CreateQSI(
                    firstWeekofSept,
                    mondays
                    )
                );

            labourDay.NullFlavor = null;
            Console.WriteLine(labourDay);
            Assert.IsTrue(GTS.IsValidBoundedPivlFlavor(labourDay));
        }