Mark:
Sorry about that, it is. I assumed it had been removed since I am not able
to use getRelativeDateTimeString() in the following:
----------------------------------------------------------------------------
long dateMin = 60000;
long dateMax = (86400000 * 2);
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = df.parse(dateTime);
long when = date.getTime();
int flags = 0;
String finalDateTime = DateUtils.getRelativeDateTimeString(this, (when +
TimeZone.getDefault().getOffset(when)), dateMin, dateMax, flags);
return finalDateTime;
----------------------------------------------------------------------------
So when it was switched over from a Library to a built-in Class, was this
function removed?
Thanks,
Nick Owens
VP, ThreeClix
Office: (904) 429-7039
Mobile: (847) 565-9392
After Hours: (904) 540-5830
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Mark Murphy
Sent: Wednesday, February 24, 2010 9:11 AM
To: [email protected]
Subject: Re: [android-developers] FormatDateTime
Nick Owens wrote:
> Mark:
>
> That's great news - I'm cheered up already knowing it can be done easily
> again. I did try searching for a few hours to find a good replacement. I
> searched for:
>
> "android relative date time format" (returns nothing seemingly related)
>
> - and -
>
> "getRelativeDateTimeString()" (returns 0 results)
I get 28 results, the third of which is the developer.android.com page:
http://developer.android.com/reference/android/text/format/DateUtils.html
> If I include the word DateUtils, I get 1000+ results for older code, which
> includes import android.text.format.DateUtils or a similar library.
That's not a library. That's a class. It's built into Android.
--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy
Android App Developer Books: http://commonsware.com/books
--
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
--
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