B
bob
Anyone know how to use SimpleDateFormat to get a lowercase am and pm?
Anyone know how to use SimpleDateFormat to get a lowercase am and pm?
Anyone know how to use SimpleDateFormat to get a lowercase am and pm?
You could use String.toLowerCase() on the whole thing, at the
risk of turning "Fri" into "fri". (If you're super-worried, you could
use a regex to locate the AM/PM and apply toLowerCase() only to that
portion.) Or you could extend the class. Other than that, I can't
think of anything.
Anyone know how to use SimpleDateFormat to get a lowercase am and pm?
Roedy said:bob wrote, quoted or indirectly quoted someone who said :
there is no built in code for that. Think instead how to convert your
date/time string AM/PM to am/pm
There various ways you can do it with String.charAt String.indexOf
String.toLowerCase
there is no built in code for that. Think instead how to convert your
date/time string AM/PM to am/pm
There various ways you can do it with String.charAt String.indexOf
String.toLowerCase
Or use Arne's suggestion, which has the virtue of being compact and employing the standard API without having to post-process the output of 'format()'.
but arne does not exist in my universe. I had with him long ago and
plonked him.
but arne does not exist in my universe. I had with him long ago and
plonked him.
but arne does not exist in my universe. I had with him long ago and
plonked him.
Roedy said:Lew wrote, quoted or indirectly quoted someone who said :Or use Arne's suggestion, which has the virtue of being compact and employing the standard API without having to post-process the output of 'format()'.
but arne [sic] does not exist in my universe. I had [it] with him long ago and
plonked him.
Bad move. But that's just my opinion.
I try to balance. I don't plonk Lew, even though I find him grating.
He is just too full of useful information to give up.
Arne is intelligent, but I felt the much smaller number of gems he put
out were not worth the more vicious thorn jabs.
Perhaps I should unplonk him for a while to see if he has mellowed or
my hide has toughened.
Be sure to announce your decision to Usenet at large. Burning
the ballots to produce white smoke is traditional.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.