I am trying to display a list of dates in the following format:
20 January 2005 20 March 2005 20 July 2005 20 February 2005 20 May 2005 20 June 2005
There is a method in the Java program to format the date in the above format only.. I mean keeping 3 spaces between date and month and month size is having fixed length 11.. So it will keep minimum 2 spaces between month and year.
But when its getting displayed in the browser, all the spaces are converted to one space only... So what should I do in that formatDate() method to overcome the problem... I tried with £ instead of blank spaces, but didn't work.. Please help me out.
Except within certain contexts (such as the body of certain tags like <pre>) multiple spaces are not significant to the browser. If you need the spaces preserved, one approach would be to use the non-breaking space HTML entity ( ) in place of space characters. [ March 19, 2006: Message edited by: Bear Bibeault ]