Пример #1
0
        public static string getDateStringForDateTime(cape.DateTime dd)
        {
            if (!(dd != null))
            {
                return("NODATE");
            }
            var sb = new cape.StringBuilder();

            sb.append(capex.text.VerboseDateTimeString.getLongMonthName(dd.getMonth()));
            sb.append(' ');
            sb.append(cape.String.forInteger(dd.getDayOfMonth()));
            sb.append(", ");
            sb.append(cape.String.forInteger(dd.getYear()));
            return(sb.toString());
        }
Пример #2
0
        public static string forDateTime(cape.DateTime dd)
        {
            if (!(dd != null))
            {
                return("NODATE");
            }
            var sb = new cape.StringBuilder();

            sb.append(capex.text.VerboseDateTimeString.getShortDayName(dd.getWeekDay()));
            sb.append(", ");
            sb.append(cape.String.forIntegerWithPadding(dd.getDayOfMonth(), 2, "0"));
            sb.append(' ');
            sb.append(capex.text.VerboseDateTimeString.getShortMonthName(dd.getMonth()));
            sb.append(' ');
            sb.append(cape.String.forInteger(dd.getYear()));
            sb.append(' ');
            sb.append(cape.String.forIntegerWithPadding(dd.getHours(), 2, "0"));
            sb.append(':');
            sb.append(cape.String.forIntegerWithPadding(dd.getMinutes(), 2, "0"));
            sb.append(':');
            sb.append(cape.String.forIntegerWithPadding(dd.getSeconds(), 2, "0"));
            sb.append(" GMT");
            return(sb.toString());
        }