And a 1 and a Tue

Before yanking out the last handful of hair...
I have an integer between 0-11 (or 1-12 if you prefer, I'm flexible) that I would like to use in some clever way (this is where you come in) to return a three-character string object (or string buffer object, I'm flexible) representing the corresponding month of the year ("Oct" for example).
I have another integer between 0-6 (or 1-7) that I would like to similarly use to get a three-digit day of the week ("Tue" for example).
I have read, re-read, and re-re-read the API for Date, DateFormat, SimpleDateFormat and Calendar objects; I've experimented with lots of different code and I can't seem to do this one simple little thing.
What I want is function something like this:
String getMonth(int monthValue) {
if (monthValue==0) {
return "Jan";
} else if (monthValue==1) {
return "Feb";
.... and so on
Do I have to write my own code to do this???
Thanks

public String monthString (int month) {
    return (DateFormatSymbols.getShortMonths())[month];

Similar Messages

  • The monitor on my macbook is turned off while I was working, I could not in any way to do it again, I could see through the screen off the open pages I was working on, I had to turn off the machine and restart it. and it runs. O.O?

    The monitor on my macbook is turned off while I was working, I could not in any way to do it again, I could see through the screen off the open pages I was working on, I had to turn off the machine and restart it. and it runs. WHAT 'success? The report says the console like this: (at approximately 12.30)
    No receipt for 'com.apple.pkg.JamPackWorldMusicInstruments' found at '/'.
    03/05/11 12:08:30 [0x0-0x1e01e]. Com.apple.garageband [239] No receipt for 'com.apple.pkg.JamPackWorldMusicInstruments' found at '/'.
    03/05/11 12:08:30 [0x0-0x1e01e]. Com.apple.garageband [239] No receipt for 'com.apple.pkg.JamPackOneInstruments' found at '/'.
    03/05/11 12:08:30 [0x0-0x1e01e]. Com.apple.garageband [239] No receipt for 'com.apple.pkg.JamPackOrchestralInstruments' found at '/'.
    03/05/11 12:08:30 [0x0-0x1e01e]. Com.apple.garageband [239] No receipt for 'com.apple.pkg.JamPackRhythmSectionInstruments' found at '/'.
    03/05/11 12:08:30 [0x0-0x1e01e]. Com.apple.garageband [239] No receipt for 'com.apple.pkg.JamPackRemixToolsInstruments' found at '/'.
    03/05/11 12:08:32 MIDIServer [255] MIDIServer [255] starting; arch = i386
    03/05/11 12:34:35 com.apple.launchd [1] *** launchd [1] has started up. ***
    03/05/11 12:35:06 com.apple.launchd.peruser.501 [86] (com.apple.ReportCrash) Falling back to default Mach exception handlers. Could not find: com.apple.ReportCrash.Self
    03/05/11 12:35:09 com.apple.launchd.peruser.501 [86] (com.apple.Kerberos.renew.plist [110]) Exited with exit code: 1
    03/05/11 12:35:25 [0x0-0xd00d]. Com.skype.skype [127] WirelessAttach: IOServiceOpen error: e00002c7
    03/05/11 12:35:25 [0x0-0xd00d]. Com.skype.skype [127] WirelessAttach: IOServiceOpen error: e00002c7
    03/05/11 12:35:26 [0x0-0xd00d]. Com.skype.skype [127] WirelessAttach: IOServiceOpen error: e00002c7
    03/05/11 12:35:26 [0x0-0xd00d]. Com.skype.skype [127] WirelessAttach: IOServiceOpen error: e00002c7
    03/05/11 12:35:32 [0x0-0xd00d]. Com.skype.skype [127] WirelessAttach: IOServiceOpen error: e00002c7
    03/05/11 12:35:33 [0x0-0xd00d]. Com.skype.skype [127] WirelessAttach: IOServiceOpen error: e00002c7
    03/05/11 12:35:33 [0x0-0xd00d]. Com.skype.skype [127] WirelessAttach: IOServiceOpen error: e00002c7
    03/05/11 12:36:06 com.apple.WindowServer [64] Tue May 3 12:36:06 MacBook-Pro-17-of-Admin.local WindowServer [64] <error>: kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint () to catch errors logged as They Are.
    03/05/11 12:43:39 helpd [160] Response failed Because Listener can not find a port for this QueryID.
    03/05/11 12:43:43 helpd [160] Response failed Because Listener can not find a port for this QueryID.
    03/05/11 12:43:43 helpd [160] Response failed Because Listener can not find a port for this QueryID.

    Do you have backups of all the data on the startup drive? If not, do nothing else until you've backed up that data, if you still can.

  • [svn:fx-trunk] 5223: Introduce ButtonBase and ToggleButtonBase classes and make FxButton extend ButtonBase , ToggleButtonBase extend ButtonBase, FxToggleButton, FxCheckBox, FxRadioButton extend ToggleButtonBase.as.

    Revision: 5223
    Author: [email protected]
    Date: 2009-03-10 13:10:07 -0700 (Tue, 10 Mar 2009)
    Log Message:
    Introduce ButtonBase and ToggleButtonBase classes and make FxButton extend ButtonBase, ToggleButtonBase extend ButtonBase, FxToggleButton, FxCheckBox, FxRadioButton extend ToggleButtonBase.as.
    The emphasized property and IButton are pushed down to the FxButton, so the rest of the buttons don't have them.
    QE Notes: None
    Doc Notes:
    Bugs: SDK-19671, SDK-19670
    Reviewer: Glenn
    tests: checkintests, mustella (gumbo/components)
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-19671
    http://bugs.adobe.com/jira/browse/SDK-19670
    Modified Paths:
    flex/sdk/trunk/frameworks/mxml-2009-manifest.xml
    flex/sdk/trunk/frameworks/projects/flex4/defaults.css
    flex/sdk/trunk/frameworks/projects/flex4/manifest.xml
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ButtonBarButton.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxCheckBox.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxRadioButton.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxToggleButton.as
    Added Paths:
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/ButtonBase.as
    flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/ToggleButtonBase.a s

  • What is difference between sy-index and sy-tabix and where both are using ?

    what is difference between sy-index and sy-tabix and where both are using ?

    hi nagaraju
    sy-tabix is in Internal table, current line index. So it can only be used while looping at the internal table.
    sy-index is in Loops, number of current pass. This you can use in other loop statements also (like do-enddo loop, while-endwhile)
    SY-INDEX is a counter for following loops: do...enddo, while..endwhile
    SY-TABIX is a counter for LOOP...ENDLOOP, READ TABLE...
    Here is an example from which you can understand the difference between sy-tabix and sy-index.
    Itab is an internal table with the following data in it.
    id Name
    198 XYZ
    475 ABC
    545 PQR.
    loop at itab where id > 300.
    write :/ itab-id, itab-name , sy-tabix, sy-index.
    endloop.
    My output will be :
    475 ABC 2 1
    545 PQR 3 2
    Sy-tabix is the index of the record in internal table.
    sy-index gives the no of times of loop passes.
    So, for the first record in the output (475 ABC), 2 is the index of the record in internal table and as it is first time loop pass occured, sy-index value is 1.
    Regards,
    navjot
    award points

  • Hi Guys,  I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out

    Hi Guys,
    I am using the full width video widget on a site. The widget was working perfectly however I have just added additional content to the site and re-uploaded and now the video is not working! Please help I have tried everything and am freaking out as this web-site has been payed for by my client.
    Alex

    Many thanks.
    With those symptoms, I'd try the following document:
    Apple software on Windows: May see performance issues and blank iTunes Store
    (If there's a SpeedBit LSP showing up in Autoruns, it's usually best to just uninstall your SpeedBit Video Accelerator.)

  • Customer/Vendor A/C with line item details and with opening and closing Bal

    Dear Sir / Madam,
    Is it possible to have a customer and / or vendor Sub-Ledger account-
    with line item details and with opening and closing balance detail
    for a particular period.?
    Regards
    Chirag Shah
    I thank for the given below thread which has solved the same problem for G/L Account
    Re: Report to get the ledger printout with opening balances

    Hello Srinujalleda,
    Thanks for your precious time.
    I tried the referred T-Code
    But this report is not showing Opening balance, closing balance detail.
    It only gives transactions during the specified posting period and total of it.
    Please guide me further in case if I need to give proper input at selection screen or elsewhere.
    Client Requires Report in a fashion
    Opening Balance as on Date
    + / -  Transactions during the period
    = Closing Balance as on date
    As that of appearing for G/L Account by S_ALR_87012311
    Thanks once again & Regards
    Chirag Shah

  • Open sales orders and open deliveries and open billing doc to sap from legesy

    Dear all
    i have some open sales orders and open deliveries and open billing doc are there in the legesy system
    so i want to know how to transfer the doc to sap by using lsmw plz tell me

    Hi Amith,
    it is always good to search in Google before posting .LSMW is very old topic and i am sure you will get lots of Documents on this .Please go through the below link .you will get some idea on this.
    http://scn.sap.com/thread/1012472
    there are 14 steps in LSMW and it is same for all (master data and Transaction Data)
    Pls practice this in your sand box or quality system before working it in the client requirement.
    Hope this helps to you
    Regards
    Sundar

  • I have three iPads and one iPod and one iPhone.  How can I message between them without sending the message to all of them.  You send the message to your email address but all of them are set up und one account.

    I have three iPads and one iPod and one iPhone.  How can I message between them without sending the message to all of them.  You send the message to your email address but all of them are set up under one account.

    You can have a different receiving email in the Messages app on each device : Settings > Messages > Receive At . I'm not sure that there is a different way to have the message only go to one device.

  • How can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    how can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    If you are just visiting Singapore, then leave the account as it is. If you have moved there, then view your account using the iTunes app on a Mac or PC and change the country/region to your current location and address. If you do not have a bank card, you can fund your account using iTunes gift cards if available in Singapore.

  • HT5012 I am having difficulty XMIT/REC text messages to family members using Android phones?  I have a 3GB data plan and all switches and buttons are set properly.  Any suggestions?

    I am having difficulty XMIT/REC text messages to family members using Android phones?  I have a 3GB data plan and all switches and buttons are set properly.  Any suggestions?

        Hello APVzW, we absolutely want the best path to resolution. My apologies for multiple attempts of replacing the device. We'd like to verify the order information and see if we can locate the tracking number. Please send a direct message with the order number so we can dive deeper. Here's steps to send a direct message: http://vz.to/1b8XnPy We look forward to hearing from you soon.
    WiltonA_VZW
    VZW Support
    Follow us on twitter @VZWSupport

  • Probably asked and answered a million times but my laptop died and my boyfriend and i are now sharing a computer when i went to back up my contacts i ended up with all of his! Is there a way to get them off and how do i prevent this from happening again?

    probably asked and answered a million times but laptop died and my boyfriend and i are now sharing a computer when i went to back up my contacts i ended up with all of his? Is there a way to get them off without deleting each one? Also how do i prevent this from happening again? can someone direct me to some info on multiple phones on one itunes i am lost.

    Hey there 79usma79!
    I have a couple of articles for you that can help you troubleshoot the issues you are seeing with iTunes on Windows XP. The first is a general troubleshooting article, which can be found right here:
    iTunes for Windows XP: Troubleshooting unexpected quits, freezes, or launch issues
    http://support.apple.com/kb/TS1421
    This article can help you find out if there are any conflicts between your copy of Windows XP and iTunes, and can tell you what to do if there are. Before going down the troubleshooting route though, you should take a look at this article, which can help you back up your entire iTunes library to an external hard drive, so if this issue is recurring, you will be able to restore from that backup and will not have to worry about losing your playlists or music again:
    iTunes: Back up your iTunes library by copying to an external hard drive
    http://support.apple.com/kb/HT1751
    Thanks for using the Apple Support Communities!
    Cheers,
    Braden

  • I downloaded my Elements 11 software and resitered it and now it won't open on my computer . . . .

    I downloaded my Elements 11 software and resitered it and now it won't open on my computer . . . . do I need to re-install it??

    I am working off of Windows 7. My husband restarted the computer and it works fine now. But before you would click on the icon to open the program it would appear as if it were firing up and then just shut down with no message or anything. Not sure but it looks as if it's running ok now! Thanks for responding though!

  • I've just updated my iPhone to the new iPhone OS and now it won't work and iTunes won't recognise that it's there.  I've uninstalled iTunes and reinstalled twice and it's not working.  Please help.

    I've just updated my iPhone to the new iPhone OS and now it won't work and iTunes won't recognise that it's there.  I've uninstalled iTunes and reinstalled twice and it's not working.  Please help.

    I have not had wifi since November when I upgraded to the newest IOS version.  I called the Apple help line and they told me some things to do and I tried them all and they worked for a few hours and then wifi shut off again.  I kept doing what they told me and it worked for a couple more days and then I could never turn it on again.  My blue tooth doesn't work either.  I had to actually increase my data usage with AT&T becuase of this.  When I did that in December I went to the Apple store and was told that it is a hardware issue and since my phone is out of warranty I would have to pay for a new phone because they could not fix the issue.  My upgrade isn't up until June 2014 so not only do I have to wait for the upgrade and I am not paying for a new phone but I have to pay $10 plus extra a month on my cell phone bill because I was going over on my Data!!!  I have been beyond upset about this and Apple is not doing anything about this nor did they offer up some way to resolve the issue because obviously it is not just some rare incident if several people are having this issue.  Who knows how many people out there have had this issue and have not said anything about it.  Now there is a newer update that I can't do because it requires wifi in order to download.
    June can not get here fast enough and I may not go back to Iphone after dealing with this for so long with no help from Apple.

  • My external hard drive is 'seen' by my iMac and I can go into the Finder and open files and folders. I am using the hard drive for Time Machine back up. However Time Machine says it can't find the drive. Same thing has happened with Final Cut Express.

    My new LaCie external hard drive is 'seen' by my iMac and I can go into the Finder and open files and folders. I am using the hard drive for Time Machine back up. However Time Machine says it can't find the drive.
    The same thing happened recently between Final Cut Express and my other LaCie external hard drive used as the Scratch disk. It fixed itself.
    I've run out of ideas. Help would be very much appreciated. Thanks.

    have you done some searches on FCPx and time machine? Is there a known issue with using a TM drive with FCPx? dunno but ...wait...I'll take 60 sec for you cause I'm just that kind of guy....   google...." fcpx time machine problem"  Frist page link 
    http://www.premiumbeat.com/blog/fcpx-bug-best-practices-for-using-external-hard- drives-and-final-cut-pro-x/
           You cannot have time machine backups on your hard drive if you intend to use it in FCPX.
    booya!

  • How can i save my individual playlist on itunes on my external hard drive because i want to buy a laptop and install itunes and move all my music and playlist thats on my desktop to my laptop and almost all my music is from a bunch of cd's i own

    how can i save my individual playlist on itunes on my external hard drive because i want to buy a laptop and install itunes and move all my music and playlist thats on my desktop to my laptop and almost all of my music is from a bunch of cds i own

    Hello ryane84
    The easiest and most efficient way to copy your music is to follow the steps under the External drive section. Make sure that you have organized the iTunes library first before you copy it over. Then put the copied iTunes folder in the same Music folder on your computer.
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/ht4527
    Regards,
    -Norm G.

  • I have itunes directory on an external hard drive and want to direct a new installation of itunes on windows 8 to use it. I tried holding down ctrl and clicking itunes and after many tries got it to work one time. When I went back in later it had reverted

    I have itunes directory on an external hard drive and want to direct a new installation of itunes on windows 8 to use it. I tried holding down ctrl and clicking itunes and after many tries got it to work one time. When I went back in later it had reverted back to a blank version of itunes and I cant get ctrl to work again. Any other ideas?

    This is sometimes caused by a problem with the iTunesPrefs.xml file, normally found at C:\Users\<User>\AppData\Local\Apple Computer\iTunes\iTunesPrefs.xml. Try dragging this to the desktop and trying again.
    Alternatively the problem may be that you have McAfee AV and it is preventing iTunes from updating the same file and thus causing the problem. See Why does iTunes delete my itunesprefs.xml? for details.
    tt2

Maybe you are looking for

  • Guest network...can't get it to stick

    I'm trying to add a Guest Network to my existing airport network (using the current model Airport Extreme base station) and can't get it to work. Scoured the entire Airport Utility settings looking for it, nowhere to be found. Finally decided to rese

  • Calling One Jax/rpc web service from another.

    We have a number of services residing in the same Oracle 10.1.3 app server container. These are deployed as Jax RPC Web Services I am trying to figure out what are the different options to have once web service invoke an operation on another (without

  • Bridge im Hintergrund laden

    Hallo, ich habe folgendes Problem. Ich habe gestern Photoshop CC installiert. Bei den Einstellungen in der Bridge habe ich eingestellt, dass die Bridge während der Anmeldung beim System im Hintergrund startet,-.. (also Haken bei: Bridge beim Anmelden

  • Hash function question

    I'm working with hash codes for string objects. Here's the method i'm using (i think this is the same as the normal string hash function, except for mine supports skipping characters): public int hashCode () {         int h;         h = 0;         fo

  • Evaluation Path to show ALL

    HI, can someone tell me if there is an evaluation path that can show all OU, positions and jobs, even if OU2 belongs to OU1 and only have positions on 2, and jobs on these positions greets