Hi,
I have worked on android 1.5 and 2.0.
Currently i am doing Migration of Applications available in 1.5 to
android 2.0.
During the work time i have come up with one issue as follow:
The DateFormat of android is not returning the value in CAPITAL
Letters for AM/PM in 2.0 where as in 1.5 it is doing absolutely fine.
Example :::
package com.test.formatter;
import java.util.Calendar;
import java.util.Date;
import android.app.Activity;
import android.os.Bundle;
import android.text.format.DateFormat;
import android.widget.TextView;
public class TestDateFormatterActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView textView = (TextView) findViewById(R.id.textview);
String delegate = "MM/dd/yy h:mm a";
Date noteTS = Calendar.getInstance().getTime();
textView.setText("Found Time :: "+ DateFormat.format(delegate,
noteTS));
}
}
Output ::-->
1. With android 1.5
Found Time :: 03/08/10 4:12 PM
2. With android 2.0
Found Time :: 03/08/10 4:12 pm
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en