Esempio n. 1
0
        /*
         * Produces a string representation of the date in SQL format
         *
         * @return a string representation of the date in SQL format - {@code
         *         "yyyy-mm-dd"}.
         */
        public override String ToString()
        {
            java.util.Calendar c = new java.util.GregorianCalendar();
            c.setTimeInMillis(this.milliseconds);
            java.lang.StringBuilder sb = new java.lang.StringBuilder(10);

            format(c.get(java.util.Calendar.YEAR), 4, sb);
            sb.append('-');
            format(c.get(java.util.Calendar.MONTH + 1), 2, sb);
            sb.append('-');
            format(c.get(java.util.Calendar.DAY_OF_MONTH), 2, sb);

            return(sb.toString());
        }
Esempio n. 2
0
        /**
         * Produces a string representation of the date in SQL format
         *
         * @return a string representation of the date in SQL format - {@code
         *         "yyyy-mm-dd"}.
         */
        public override String ToString()
        {
            java.util.Calendar c = new java.util.GregorianCalendar();
            c.setTimeInMillis(this.milliseconds);
            java.lang.StringBuilder sb = new java.lang.StringBuilder(10);

            format(c.get(java.util.Calendar.YEAR), 4, sb);
            sb.append('-');
            format(c.get(java.util.Calendar.MONTH + 1), 2, sb);
            sb.append('-');
            format(c.get(java.util.Calendar.DAY_OF_MONTH), 2, sb);

            return sb.toString();
        }
Esempio n. 3
0
 public virtual int getMinutes()
 {
     java.util.Calendar c = new java.util.GregorianCalendar();
     c.setTimeInMillis(this.milliseconds);
     return(c.get(java.util.Calendar.MINUTE));
 }
Esempio n. 4
0
 public virtual int getHours()
 {
     java.util.Calendar c = new java.util.GregorianCalendar();
     c.setTimeInMillis(this.milliseconds);
     return(c.get(java.util.Calendar.HOUR));
 }
Esempio n. 5
0
 public virtual int getYear()
 {
     java.util.Calendar c = new java.util.GregorianCalendar();
     c.setTimeInMillis(this.milliseconds);
     return(c.get(java.util.Calendar.YEAR) - 1900);
 }
Esempio n. 6
0
 public virtual int getDate()
 {
     java.util.Calendar c = new java.util.GregorianCalendar();
     c.setTimeInMillis(this.milliseconds);
     return(c.get(java.util.Calendar.DAY_OF_MONTH));
 }