Ejemplo n.º 1
0
 public static string[] GetSeasonDateString()
 {
     int[] dt = CoCSeason._GetSeasonDate();
     return(new string[] {
         dt[0].ToString(),
         dt[1].ToString()
     });
 }
Ejemplo n.º 2
0
 public static string GetSeasonDateDB()
 {
     int[] dt = CoCSeason._GetSeasonDate();
     return(string.Format(
                Properties.Settings.Default.DBWhereDate,
                dt[0],
                dt[1]
                ));
 }
Ejemplo n.º 3
0
            private static int[] _GetDate(int idx, string[] cmd)
            {
                int[] dt = { 0, 0 };

                if ((cmd.Length - 1) > idx)
                {
                    int max = ((cmd.Length > (idx + 2)) ? (idx + 2) : (idx + 1));
                    for (int i = max; i > idx; i--)
                    {
                        if (string.IsNullOrWhiteSpace(cmd[i]))
                        {
                            continue;
                        }
                        if (cmd[i].All(char.IsDigit))
                        {
                            dt = CoCSeason._ParseDateDefault(cmd[i], dt);
                        }
                        else if (cmd[i].Contains("-"))
                        {
                            CoCSeason._ParseDateContains(cmd[i], '-', ref dt);
                        }
                        else if (cmd[i].Contains("."))
                        {
                            CoCSeason._ParseDateContains(cmd[i], '.', ref dt);
                        }
                        if ((dt[0] > 0) && (dt[1] > 0))
                        {
                            break;
                        }
                    }
                }
                if ((dt[0] == 0) || (dt[1] == 0))
                {
                    int[] dtc = CoCSeason._GetSeasonDate();
                    dt[0] = ((dt[0] > 0) ? dt[0] : dtc[0]);
                    dt[1] = ((dt[1] > 0) ? dt[1] : dtc[1]);
                }
                return(dt);
            }
Ejemplo n.º 4
0
 public static int[] GetSeasonDateInt()
 {
     return(CoCSeason._GetSeasonDate());
 }