Example #1
0
 public static System.String ToStringMesInicialMaiuscula(System.DateTime AValue)
 {
     if (DateUtils.IsMinValue(AValue) || AValue.Year < 1760)
     {
         return(System.String.Empty);
     }
     else
     {
         String data = "";
         if (AValue.Month == 1)
         {
             data = "Janeiro";
         }
         else if (AValue.Month == 2)
         {
             data = "Fevereiro";
         }
         else if (AValue.Month == 3)
         {
             data = "Março";
         }
         else if (AValue.Month == 4)
         {
             data = "Abril";
         }
         else if (AValue.Month == 5)
         {
             data = "Maio";
         }
         else if (AValue.Month == 6)
         {
             data = "Junho";
         }
         else if (AValue.Month == 7)
         {
             data = "Julho";
         }
         else if (AValue.Month == 8)
         {
             data = "Agosto";
         }
         else if (AValue.Month == 9)
         {
             data = "Setembro";
         }
         else if (AValue.Month == 10)
         {
             data = "Outubro";
         }
         else if (AValue.Month == 11)
         {
             data = "Novembro";
         }
         else if (AValue.Month == 12)
         {
             data = "Dezembro";
         }
         return(data);
     }
 }
Example #2
0
 public static System.String ToStringMes(System.DateTime AValue)
 {
     if (DateUtils.IsMinValue(AValue) || AValue.Year < 1760)
     {
         return(System.String.Empty);
     }
     else
     {
         String data = "";
         if (AValue.Month == 1)
         {
             data = "janeiro";
         }
         else if (AValue.Month == 2)
         {
             data = "fevereiro";
         }
         else if (AValue.Month == 3)
         {
             data = "março";
         }
         else if (AValue.Month == 4)
         {
             data = "abril";
         }
         else if (AValue.Month == 5)
         {
             data = "maio";
         }
         else if (AValue.Month == 6)
         {
             data = "junho";
         }
         else if (AValue.Month == 7)
         {
             data = "julho";
         }
         else if (AValue.Month == 8)
         {
             data = "agosto";
         }
         else if (AValue.Month == 9)
         {
             data = "setembro";
         }
         else if (AValue.Month == 10)
         {
             data = "outubro";
         }
         else if (AValue.Month == 11)
         {
             data = "novembro";
         }
         else if (AValue.Month == 12)
         {
             data = "dezembro";
         }
         return(data);
     }
 }
Example #3
0
 public static System.String ToStringCompletoDetalhado(System.DateTime AValue)
 {
     if (DateUtils.IsMinValue(AValue) || AValue.Year < 1760)
     {
         return(System.String.Empty);
     }
     else
     {
         return(AValue.ToString("dd/MM/yyyy") + " as " + AValue.ToString("HH:mm") + " horas");
     }
 }
Example #4
0
 public static System.String ToStringHora(System.DateTime AValue)
 {
     if (DateUtils.IsMinValue(AValue) || AValue.Year < 1760)
     {
         return(System.String.Empty);
     }
     else
     {
         return(AValue.ToString("HH:mm"));
     }
 }
Example #5
0
 public static System.String ToStringCompletoComSegundo(System.DateTime AValue)
 {
     if (DateUtils.IsMinValue(AValue) || AValue.Year < 1760)
     {
         return(System.String.Empty);
     }
     else
     {
         return(AValue.ToString("dd/MM/yyyy HH:mm:ss"));
     }
 }
Example #6
0
 public static System.String ToStringValidacao(System.DateTime AValue)
 {
     if (DateUtils.IsMinValue(AValue) || AValue.Year < 1901)
     {
         return(System.String.Empty);
     }
     else
     {
         return(AValue.ToString("dd/MM/yyyy"));
     }
 }
Example #7
0
        public static System.String ToStringMesAnoSimples(System.DateTime AValue)
        {
            if (DateUtils.IsMinValue(AValue) || AValue.Year <= 1800)
            {
                return(System.String.Empty);
            }
            else
            {
                if (AValue.Year > 2200)
                {
                    return("");
                }

                return(AValue.ToString("MM/yyyy"));
            }
        }
Example #8
0
 public static System.String ToStringCompletoForum(System.DateTime AValue)
 {
     if (DateUtils.IsMinValue(AValue) || AValue.Year < 1760)
     {
         return(System.String.Empty);
     }
     else
     {
         String data = "";
         if (AValue.Day < 10)
         {
             data = "0";
         }
         data = data + AValue.Day + " de ";
         if (AValue.Month == 1)
         {
             data = data + "Janeiro";
         }
         else if (AValue.Month == 2)
         {
             data = data + "Fevereiro";
         }
         else if (AValue.Month == 3)
         {
             data = data + "Março";
         }
         else if (AValue.Month == 4)
         {
             data = data + "Abril";
         }
         else if (AValue.Month == 5)
         {
             data = data + "Maio";
         }
         else if (AValue.Month == 6)
         {
             data = data + "Junho";
         }
         else if (AValue.Month == 7)
         {
             data = data + "Julho";
         }
         else if (AValue.Month == 8)
         {
             data = data + "Agosto";
         }
         else if (AValue.Month == 9)
         {
             data = data + "Setembro";
         }
         else if (AValue.Month == 10)
         {
             data = data + "Outubro";
         }
         else if (AValue.Month == 11)
         {
             data = data + "Novembro";
         }
         else if (AValue.Month == 12)
         {
             data = data + "Dezembro";
         }
         data = data + " de " + AValue.Year;
         return(data);
     }
 }