• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Date formatted text on bitmap?

Grendizer

Newbie
Hey all,

I'm wondering how to format a date to that it will be shown as following:
January 23 Saturday.

I want it to be displayed on a bitmap. I've been able to draw up the bitmap, which looks like this:
http://img692.imageshack.us/img692/9821/kalenderblad.png

So I'd want to place January on the red part and 23 and saturday on the striped part.
I dont think I have a problem with placing the text but i'd appreciate help with the date formatting.
 
import java.text.SimpleDateFormat;
import java.util.Date;

final Date date = new Date( System.currentTimeMillis() );
final SimpleDateFormat formatterMonth = new SimpleDateFormat( "MMMM" );
final SimpleDateFormat formatterDateDay = new SimpleDateFormat( "d EEEE" );
final String monthText = formatterMonth.format(date);
final String dateDayText = formatterDateDay.format(date);
System.out.println( monthText );
System.out.println( dateDayText );
 
Back
Top Bottom