Package net.rim.device.api.i18n

Examples of net.rim.device.api.i18n.SimpleDateFormat


    public boolean show() {
        return _dateTimePicker.doModal();
    }
   
    public Object getSelectedValue() {
        SimpleDateFormat sdf = new SimpleDateFormat( _HTML5Calendar.getFormat().toString() );
        StringBuffer sb = sdf.format( _dateTimePicker.getDateTime(), new StringBuffer(16), null );
       
        return sb.toString();
    }
View Full Code Here


        }

        messageBuffer.append("Subject: " + subject + "\r\n");
        messageBuffer.append("Content-Type: " + mailmessage.getContentType()+"\r\n");

        SimpleDateFormat formatter = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss ");
        StringBuffer date = new StringBuffer(formatter.format(mailmessage.getSentDate()));
        // Add timezone offset
        Calendar gmt = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
        Calendar local = Calendar.getInstance();
        gmt.setTime(mailmessage.getSentDate());
        local.setTime(mailmessage.getSentDate());
View Full Code Here

                }
            } else {//not allday
                format = DATETIME_FORMAT_UTC;//"yyyyMMdd'T'HHmmss'Z'"
            }

            SimpleDateFormat formatter = new SimpleDateFormat(format);
            // FIXME: why cal.getTime().getTime() should be different from value?
            sdh.log(">>>original date: " + new Date(cal.getTime().getTime()).toString());
            formattedDate = formatter.format( new Date(cal.getTime().getTime() - oneDay) );
            sdh.log(">>>fixed date: " + formattedDate);
           
            /*
             * this is to use the start date
             * information of the <Start>
View Full Code Here

                    case RepeatRule.END://64
                    StaticDataHelper.log("[DEBUG]Found END (" + fieldsArray[i] + ")");
                   
                        long endDate = rule.getDate(RepeatRule.END);

                        SimpleDateFormat formatter = new SimpleDateFormat(DATETIME_FORMAT_UTC);
                        String formattedDate = formatter.formatLocal(endDate);
                       
                        //e.g. <PatternEndDate>20080504T150000Z</PatternEndDate>
                        eventBuffer.append("<" + PATTERN_END_DATE + ">" +
                                           formattedDate +
                                           "</" + PATTERN_END_DATE + ">");
View Full Code Here

     * @param date
     *            Date in long format
     * @return String representation of <code>date</code>
     */
    private String dateFormatter(final long date) {
        final SimpleDateFormat sdf =
                new SimpleDateFormat(SimpleDateFormat.TIME_LONG);
        final Date d = new Date(date);
        final Calendar cal = Calendar.getInstance();
        cal.setTime(d);

        final StringBuffer buff = new StringBuffer();
        buff.append('[');
        buff.append(cal.get(Calendar.DAY_OF_MONTH));
        buff.append('-');
        buff.append(sdf.format(cal, new StringBuffer(), null).toString());
        buff.append("] ");

        return buff.toString();
    }
View Full Code Here

     * @param date
     *            Date in long format
     * @return String representation of <code>date</code>
     */
    private String formatDate(final long date) {
        final SimpleDateFormat sdf =
                new SimpleDateFormat(SimpleDateFormat.TIME_LONG);
        final Date d = new Date(date);
        final Calendar cal = Calendar.getInstance();
        cal.setTime(d);

        final StringBuffer buff = new StringBuffer();
        buff.append('[');
        buff.append(cal.get(Calendar.DAY_OF_MONTH));
        buff.append('-');
        buff.append(sdf.format(cal, new StringBuffer(), null).toString());
        buff.append("] ");

        return buff.toString();
    }
View Full Code Here

                }

                buffer.append(seconds);

                final DateFormat dateFormatter =
                        new SimpleDateFormat(DateFormat.DATETIME_DEFAULT);

                String dateStr =
                        dateFormatter.formatLocal(travelTime.getStartTime());
                String msg = "Start Time: " + dateStr;
                _startLabel.setText(msg);

                dateStr = dateFormatter.formatLocal(travelTime.getEndTime());
                msg = "End Time: " + dateStr;
                _endLabel.setText(msg);

                msg = "Travel Time (h:m:s): " + buffer.toString();
                _elapsedLabel.setText(msg);
View Full Code Here

TOP

Related Classes of net.rim.device.api.i18n.SimpleDateFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.