FormatDate and 1st, 2nd, 3rd...

Hi,
I have done a piece of code to do this, but I can't believe there is not something out there to do that already, so I thought I'd check here :)
What I want is to display the date in the form:
Tuesday, September 24th
With the "th" bit being the correct one for 1st, 2nd, 3rd, and so on.
Is there a way to do that using the <fmt:formatDate> tag ?
Thanks

I doubt if there's a way to to add the "th" simply by using a custom date pattern.
I was unable to find what makes up the custom date pattern in the jstl
format date tag.
However this here : http://java.sun.com/j2se/1.5.0/docs/api/java/text/SimpleDateFormat.html
shows a a chart of date patterns, and the "th" part is not listed anywhere.
Maybe if there was a glossary term for the "th" part of the date, it would be easier to find a solution.
You can also check with Apache's JSTL user mailing list for a solution if no one posts one here.

Similar Messages

  • How do I activate AUTOMATIC superscripting for numbers / dates; e.g. 1st, 2nd, 3rd, 4th, etc .... It used to do this in all PRE-5.0 versions of Pages; now, it is GONE from Pages 5.0, and I cannot find out where / how to activate it !!

    How do I activate AUTOMATIC superscripting for numbers / dates; e.g. 1st, 2nd, 3rd, 4th, etc .... It used to do this in all PRE-5.0 versions of Pages; now, it is GONE from Pages 5.0, and I cannot find out where / how to activate it !!

    Whilst I appreciate your responding - I do not think this helps with what I was enquiring (at least not without further explanations anyways).
    I am aware of, and do use, the function - System Preferences > Keyboard > Text - for various replacements like (tm), (c), etc .... and also for fractions like 1/2, 1/4, 1/3.
    However, my question was in relation to SUPERSCRIPTS for dates / numbers - namely, superscripting numerical suffixes for things like 1st, 2nd, 3rd, 4th,
    So - please help - HOW do I set this up ? If indeed it is possible without System Preferences > Keyboard > Text ???

  • Simple date format with 1st 2nd 3rd etc

    hai
    i want to dispaly the date in the format
    25th of December 2004
    i tryed to format in SimpleDateFormat, but there is not special format to display date as 1st 2nd 3rd.
    can anybody help me how to do this
    Archi

    THANKS YOU
    THANKS FOR YOUR VALUABLE RESPONSE
    THAT I KNOW VERY VERY WELL HOW TO DO THAT.
    ITS URGENT I DONT WANT TO WASTE TO "INVENT A NEW STUFF"
    ARCHI.

  • PDDoc.Save doesn't save on 1st (and sometimes 2nd, 3rd, 4th etc...) try, but saves eventually

    Basically, I have a List of files to import to my C# program from a directory.
    The C# program opens the files in Acrobat X, runs a plugin on them, and once the plug in has completed, it saves the files to another location.
    AcroAppClass mApp = new AcroAppClass();
    AcroAVDocClass avDoc = new AcroAVDocClass();
    AcroPDDoc pdDoc = new AcroPDDoc();
    if (avDoc.Open(fileToOpen, ""))
        pdDoc = (AcroPDDoc)avDoc.GetPDDoc();
        mApp.MenuItemExeute("My plugin name");
        bool saved = false;
        while(!saved)
            pdDoc.Save((short)(PDSaveFlags.PDSaveFull | PDSaveFlags.PDSaveCopy | PDSaveFlags.PDSaveLinearized | PDSaveFlags.PDSaveCollectGarbage), saveFileName);
            if(File.Exists(saveFileName)
               saved = true;
           else
               Console.WriteLine("Save failed");
    The while(!saved) loop runs anywhere from 1 to x times. x has been has high as 10 times, or as low as 2, but never 1.
    Why may this be?
    I have full Administrative access to the drive, the files and the folders. The INTERESTING point is that eventually, after executing the PDDoc.Save command multiple times,
    the file does end up saving, but this can't be correct operation, right?

    BarlaeDC, the plugin edits the annotations in the document to update the links to URI annotations instead of standard Launch annotations.
    Is there a way to get a report back from my plugin to my calling application so that it knows when the plugin is completed doing its job?
    Bernd, application requirements by the client do not permit saving through the plugin. They want the C# code called through even another program, and need the C# to report back to it about the save.

  • Information Broadcasting for specific reports on1st, 2nd, 3rd, 4th of month

    Hi
    I have a multiprover which contains 10 reports .
    Out of 10 reports, four reports have the broadcast settings .
    But i want to broadcast only two specific reports on 1st, 2nd, 3rd, 4th of each month by using the process chain automatically .
    So how can i broadcast those two reports automatically by using the process chain  on 1st, 2nd, 3rd, 4th of each month .
    Please let me know
    Regards
    Mubeen

    You can use RSRD_BROADCAST_FOR_TIMEPOINT or RSRD_BROADCAST_STARTER program for scheduling the broadcast settings.
    You can create variants for the broadcast settings using program RSRD_BROADCAST_STARTER and use ABAP type in process chain for progran and variant.
    create a event using SM64 tcode and use this event to schedule the process chain. You can create a small program to trigger this event as per your date requirement. You can use function module BP_EVENT_RAISE in the program for triggering the event.
    Pravender

  • Remove 1st & 2nd lines in 1st file, and 1st line in 2nd file. I want the headers to be the first line after the script runs!

    I have two files that look like this (Notepad++):
    In the first file, which has a date as a name and always ends in 'COV', I want to remove the 1st & 2nd lines.  All lines end in LF (LineFeed).  In the 2nd file, which has a date as a name and always ends in 'RSK', I want to remove the 1st line. 
    Basically I want only the headers.  I'm working with the code below.  I've tried several different iterations of
    reader.ReadLine().Skip(1);
    reader.ReadLine().Skip(2);
    reader.ReadLine().Skip(3);
    It never really gives me what I want, so I can't tell what's going on here.  I guess I'm missing something simple, but I don't know what.  Any ideas, anyone?
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.IO;
    using System.Diagnostics;
    namespace ConsoleApplication1
    class Program
    static void Main(string[] args)
    string sourceDirectory = @"C:\Users\rshuell\Desktop\Downloads\Files";
    try
    var txtFiles = Directory.EnumerateFiles(sourceDirectory);
    foreach (string currentFile in txtFiles)
    if (currentFile.Contains("COV"))
    var items1 = new LinkedList<string>();
    using (var reader = new StreamReader(currentFile))
    reader.ReadLine().Skip(2); // skip 2lines
    string line;
    while ((line = reader.ReadLine()) != null)
    items1.AddLast(line.Replace("\"", ""));
    File.WriteAllLines(currentFile, items1);
    else
    var items2 = new LinkedList<string>();
    using (var reader = new StreamReader(currentFile))
    reader.ReadLine().Skip(1); // skip one line
    string line;
    while ((line = reader.ReadLine()) != null)
    items2.AddLast(line.Replace("\"", ""));
    File.WriteAllLines(currentFile, items2);
    catch (Exception ex)
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Call the ReadLine() twice if you want to skip the first two lines. Each call results in a single line being read:
    static void Main(string[] args)
    string sourceDirectory = @"C:\Users\rshuell\Desktop\Downloads\Files";
    try
    var txtFiles = Directory.EnumerateFiles(sourceDirectory);
    foreach (string currentFile in txtFiles)
    if (currentFile.Contains("COV"))
    var items1 = new LinkedList<string>();
    using (var reader = new StreamReader(currentFile))
    reader.ReadLine(); //read line 1
    reader.ReadLine(); //read line 2
    string line;
    while ((line = reader.ReadLine()) != null)
    items1.AddLast(line.Replace("\"", ""));
    File.WriteAllLines(currentFile, items1);
    else
    var items2 = new LinkedList<string>();
    using (var reader = new StreamReader(currentFile))
    reader.ReadLine(); // skip one line
    string line;
    while ((line = reader.ReadLine()) != null)
    items2.AddLast(line.Replace("\"", ""));
    File.WriteAllLines(currentFile, items2);
    catch (Exception ex)
    Calling the Skip method on the already read string returned by the ReadLine() method won't help you at all here. By the time you call the Skip method the line has already been read from the file. You must call the ReadLine() method for a new line being read.
    Hope that helps.
    Please remember to close your threads by marking helpful posts as answer and please start a new thread if you have a new question.

  • ?Why do you have to enter it several times over to get an alert in the diary to accept a 1 hr alert to go off 1st and then 2nd alert at 30 mins

    Why is there a problem getting an I phone to accept the fact that I want it to alert me on the first time it goes off an hour before any event and the 2nd alert at 30 mins before the event? I enter the 1st alert for 1 hour and the 2nd alert for 30 mins but it always saves as 30 mins on the 1st alert and an hour as the 2nd alert. It seems the only way around this to to re-enter it several times over and over to get the phone to accept what I want it to do which is time consuming and annoying. Please help.

    I have experiencing this, but only since I have installed I o s 7
    Very frustrating.
    M

  • Airport Express (2nd gen), Airport Extreme and Airport TimeCapule (3rd Gen) interoperability

    Airport Express (2nd gen), Airport Extreme and Airport TimeCapule (3rd Gen) interoperability
    When all configured to provide wireless the network (Wired/Wireless) become unstable and very slow. When I disable wireless on the Airport Express the problem disappears. The problem effects all endpoint clients (iPhones, iPads, Mac's and windows) Any ideas?
    I own the following
    Airport Express 802.11n (2nd gen)
    Airport Extreme 82.11ac
    Airport TimeCapule 802.11n (3rd Gen)
    Config
    Each of the Airport's WAN port is connected my AT&T Uverse modem
    Latest firmware on each device
    All use static IP's (192.168.1.x)
    Airport's are all configured to "Create a wireless network" with same network name, security and password.
    Wireless options are using Automatic for Radio's and Channels
    Router mode is "Off (Bridge Mode)"

    ragu75 wrote:
    Config
    Each of the Airport's WAN port is connected my AT&T Uverse modem
    Don't do that. Decide which one of your AirPort Base Stations is to serve as your router. Connect that one, and no others, to the modem. Connect all the others to it, and configure them as bridges.

  • MBA 1ST GEN AND MBA 2ND GEN

    hey mates! im actually studying and reading all the reviews and feedbacks from this forums. and im just so excited to finally buy my new MBA in exchage from my IBOOKG4.
    I normally uses the laptop for: Internet surfing, word and excel, and some downloads for songs then my ipod. oh dont forget the pictures.
    Do u think the First Gen MBA is enough for me to survive? or i should consider the new one? bec its BOXING day ang the first gen MBa is on sale for only 800pounds.
    please help me. i really dont know what to buy and what to consider. also, next year ill be taking my MAsters so this NEW MBA will be my primary Computer, FYI.
    Do you think what should i CONSIDER? thanks alot mates! ill be waiting for your mssgs! cheers! happy christmas!

    Hey thank you very much for the speedy reply to this post. Actually, im a bit worried of the first gen bec of the reviews ive read like the noise in the fan, the speedy heating of the unit and do u think it is also available in the second gen? and is there any difference on the second gen of 1.6ghz?
    a mate gave me a present this christmas-Its a Civilization4 game for mac. do u think i can play a game on the first gen 1.6ghz and/or 2nd gen MBA? cant really afford the 1.8ghz second gen for its really too much for me.
    Not really a techy person and this ibookg4 was actually ages in me and its memory is not really full up to date. heheehehe.
    purely internet surfing (yahoo, YM, MSN, Google, FAcebook etc. and mostly some MS office apps and some Masters documents in the future.
    Do u think that spending extra 471pounds for a second gen MBA 1.6ghz will make a tremendous difference? thank you verymuch for the time and knowledge your sharing. this really helps!

  • IDvd freezes during 2nd -3rd burn

    When burning DVDs with IDVD the first dvd burns ok
    but on the 2nd -3rd try the process freezes up. The Dvd is ejected but not completely burned. I have to force quit and start the entire process over- takes hour+
    The problem started after upgrading to iLife 06. Can this be apart of the issue?
    Any ideas?
    Thanks!

    Hello Tony,
    glad you got it up and working.
    I'm surpised since the superdrive is a new one, barely 3 months old
    I have never had this problem, but I don't think it depends on the age of the burner or is an indication of a malfunction .... you're just pushing the burner a bit to hard.
    Should I upgrade to 10.4.4? If so, what is the name of the upgrade package?
    I would recommend upgrading to Tiger (OS X 10.4). You'll have to buy the new OS, then get the updates (if necessary). I believe the most recent is 10.4.7.
    I will try the disc image process...
    That is definitely the way to work in iDVD. Not only does it minmize burn errors, but it also produces a file that can be stored on your HDD for future burns.
    hope this helps
    mish

  • Sep 2nd 3rd very slow downloads for V6.1 update 1/10th normal speed

    I have been trying to do a direct update to Forefox 6.1 and also trying a full dowmload of it. I normally get 300KB/sec but on 1st to 3rd Sep it was coming at 3KB/sec suggesting up to 2hrs to do it. I have cable Broadband and normally get 300KB/sec and up to 1MB/sec. Is there a problem with your server or the link to Australia? Other downloads OK.

    I'm not getting errors, but I am getting unacceptable download times that have worsened since January 2011. I tend to think that Apple's content servers for iTunes are overwhelmed, but there is no excuse for having to wait an hour for a movie rental on my AppleTV, or 45 minutes for a music download to my Mac. It's just not acceptable; these files are not particularly large, and my cable connection is otherwise fast.
    As for the hopes of improved download times once the farm goes live, I wouldn't count on it: any increase we (as end users) may experience will evaporate as the number of new users exponentially increases. Then it's back to dialup-like download times.
    Steve-o needs to get his act together and get the situation corrected.

  • How can I realize a period process chain start: the 1st to 3rd day every?

    Hi,All
    I want to set a start in a process chain as the following:
    a period value: the 1st to 3rd day every month
    How can I realize it ? Thanks.
    Best Regards
    Jiande Ding

    Hi Jiande Ding 
    create original chain as a Meta chain.
    create the another process chain with immedaite in start varaint..
    and put abap step in that PC after process chain..
    put this below code in that abap program.
    DATA: wwdate like sy-datum,
              WWDAY(2).
    wwday = sy-datum+6(2).
    IF WWDAY EQ '01' OR WWDAY EQ '03'.
       CALL FUNCTION 'RSPC_API_CHAIN_START'
      EXPORTING
        I_CHAIN             = <ur meta chain tech.name>
    ENDIF.
    Edited by: shanthi bhaskar on May 5, 2009 4:44 PM

  • Use system-wide Text replacement to superscript characters? 1st, 2nd, etc

    I wanted to use the new text substitution in Snow Leopard to transform typed "1st" and "2nd's" into their 'correct' form with superscripted numerical suffixes. I tried to just easy do it by copying a corrected form out of Pages where I had created a proper "1st,", "2nd," and so on, but when I would paste them into the system prefs pane, they would just paste as regular numerals & letters instead of the superscripted variety.
    I then thought to see if I could find the proper superscripted letters in the character viewer but came up empty. Does anyone know of a way to get this working? it's minor and all, but would be a nice addition.

    1) yes, I know that
    2) how would that help this situation any even if I hadn't? i didn't say "I can't get my text replacements to be accepted in any applications," I stated that I cannot find a way to get the Text System Prefs pane to accept supercripted numerical suffixes.
    Sorry to be an *** about it, but everyone's always lambasting posters for not being clear enough or specific enough in what they're trying to do, and I was very clear about what I was asking and even in giving specifics on what i had done to try and remedy the situation myself.
    I'm not asking how to get text replacement to work in apps, I'm asking how to get the system-wide text replacement to accept superscripted numerical suffixes in the first place. Maybe it's not possible? maybe it is and I'm missing something, but if so it's specific to the prefs pane, not other applications.

  • How to restrict from creating the  Network for  1st & 2nd level  WBS

    Hi All,
        In our project structure we have up to 5 levels of WBS, In some cases we have creates  3 level also . Now we want to restrict creates Network for first two level WBS  , actually we want to restrict user to Create PR for those WBS so if we restrict them from creation of Network for 1st &  2nd level then they not able to create PR for same  .
    Thanks,
    Virendra

    Hi Virendra,
    I can suggest you other way round solution.
    If you are sure that those two WBS will not take any actual or commitment cost, then its better to NOT to mark those WBS elements as Account Assignment Element. I mean, if you do not set the indicator of Acct. Assignment Element (Untick Acct Assignment Element) on those WBS, then user will not be able to create Networks on those WBS Elements. Try this on your development or quality client and let me know if it works.
    If it works, then you just need to disabled the Acct. Assignment Element indicator for those two WBS element and you can achieve that through substitution and field selection of WBS as well.
    OR
    Just look at OPSG settings at tab component. Just look if that can solve your purpose because your requirement is to stop PR from those WBS element. (I am just wondering if you can stop user from creating/change material components from those WBS-Networks)
    OR
    Go for User Status and set it to on those WBS Elements. Object Types will be Networks and Network Header.
    OR
    Try to achieve a validation or substitution where in you can mark Res./Pur. Req as 1 (Never) only for those two WBS elements. In this way user cannot create PR on those two WBS elements.
    Regards,
    Amit

  • Overlapping of 1st & 2nd crowns of THAI characters

    Hi All,
    Overlapping of 1st & 2nd crowns of Thai characters after importing from .mif to FM8/9.
    If contents before the problem characters are edited (add/delete spacing of characters), the position of 2nd crown will appear correctly.
    PDF generated will have same problem as FM document.
    Please help.
    Regards,
    P.C.

    Hi,
    Attached is what displayed in FM8, regardless of Windows-English or Windows-TH.
    The 2nd crown of left character was not together with the characters.
    The one on the right side is the correct character.
    This is another sample, red one is NG and the green one is the correct one.
    The FM version that I currently using is 8.0p266
    Thank you!

Maybe you are looking for