Ticket #205 (closed defect: fixed)

Opened 12 years ago

Last modified 11 years ago

submission date should have leading zeros

Reported by: kmaclean Owned by: kmaclean
Priority: minor Milestone: SpeechSubmission 0.1
Component: SpeechSubmission Version: 0.1-alpha
Keywords: Cc:

Description

This:

[   ] anonymous-200799-orf..> 09-Sep-2007 20:54   117k

should look like this:

[   ] anonymous-20070909-orf..> 09-Sep-2007 20:54   117k

Change History

comment:1 Changed 11 years ago by kmaclean

see http://emu.freenetproject.org/pipermail/cvs/2006-February/023509.html

-    public static String getExtendedDate(int daysAgo) {
-        GregorianCalendar cal = new GregorianCalendar();
-        cal.setTimeZone(TimeZone.getTimeZone("GMT"));
-        cal.add(Calendar.DATE,-daysAgo);
-        int year = cal.get(Calendar.YEAR);
-        int month = cal.get(Calendar.MONTH) + 1;
-        int day = cal.get(Calendar.DATE);
-        StringBuffer sb = new StringBuffer(11);
-        sb.append(year).append(".");
-        if( month < 10 )
-            sb.append("0");
-        sb.append(month).append(".");
-        if( day < 10 )
-            sb.append("0");
-        sb.append(day);
-        return sb.toString();
-    }

comment:2 Changed 11 years ago by kmaclean

  • Status changed from new to closed
  • Resolution set to fixed

comment:3 Changed 11 years ago by root

  • Milestone SpeechSubmission 0.1 deleted

Milestone SpeechSubmission 0.1 deleted

comment:4 Changed 11 years ago by kmaclean

  • Milestone set to SpeechSubmission 0.1
Note: See TracTickets for help on using tickets.