Beispiel #1
0
        public Testes()
        {
            Calendar cal = CultureInfo.InvariantCulture.Calendar;
            // 1/1/1990 starts on a Monday
            DateTime dt = new DateTime(1990, 1, 1);

            Console.WriteLine("Starting at " + dt + " day: " + cal.GetDayOfWeek(dt) + " Week: " + WeekSorter.WeeksInYear(dt));

            for (int i = 0; i < 100000; i++)
            {
                for (int days = 0; days < 7; dt = dt.AddDays(1), days++)
                {
                    if (WeekSorter.WeeksInYear(dt) != cal.GetWeekOfYear(dt, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday))
                    {
                        Console.WriteLine("Iso Week " + WeekSorter.WeeksInYear(dt) +
                                          " GetWeekOfYear: " + cal.GetWeekOfYear(dt, CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Monday) +
                                          " Date: " + dt + " Day: " + cal.GetDayOfWeek(dt));
                    }
                }
            }
        }
        static void Main(string[] args)
        {
            //new Testes();
            //return;

            if (args.Count() == 0) {
                var CONFS = ConfiguracoesGlobais.GetConfs().DIRS;
                foreach (string str in CONFS)
                {
                    var obj = new WeekSorter(str);
                    obj.OrganizeFiles();
                }
            }
            else
            {
                Console.WriteLine("Parâmetros ainda não suportados . . . ");
            }

            Console.WriteLine("Press any key to continue . . . ");
            Console.ReadKey();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            //new Testes();
            //return;

            if (args.Count() == 0)
            {
                var CONFS = ConfiguracoesGlobais.GetConfs().DIRS;
                foreach (string str in CONFS)
                {
                    var obj = new WeekSorter(str);
                    obj.OrganizeFiles();
                }
            }
            else
            {
                Console.WriteLine("Parâmetros ainda não suportados . . . ");
            }

            Console.WriteLine("Press any key to continue . . . ");
            Console.ReadKey();
        }