Days of the week

Somewhere in my program, I return two Stirngs, which are start-date and end-date of the week.
For example: (30/06/2003 , 06/07/2003)
I have a String[7] array and want to assign each element of the array the days. I mean:
String[0] = 30/06/2003
String[5] = 05/07/2003
String[6] = 06/07/2003
I need a little function like
public static String[] assignDate(String start, String end) {}
is it possible to do this, and how?

How about this:
Use a for loop and a java.util.GregorianCalendar object.
Loop 6 times (a start day, then loop once for each subsequent day).
In the loop body, roll the Calendar forward one day.
Then get the Date and use a SimpleDateFormat to produce a formatted String.

Similar Messages

  • Months/ days of the week not in English?

    Hi,
    When connecting my iPhone with iTunes for the first time, it seems that it picked up the location from my computer’s regional and languages, and as a result the menus on my calendar and weather applications, as well as the time on the home screen (month, day) - are in different language. Everything related to days of the week and months – not in English.
    I’ve changed the main setting from the control panel, installed the iTunes again, but I can’t find how I could change it for the iPhone. (The location within the iTunes store is correct.)
    Any suggestions?

    Thanks Phil,
    I don’t know how it got messed up… Seems ok now, but this is how it looked like:
    Language – English
    Voice control – Английски
    Keyboards 1 – Bulgaria ON
    Region Format – Bulgarian

  • Setting the first day of the week

    Hi,
    Is there any other place in Mac OS X where I could set system's first day of the week, except iCal? In iCal it's set to Sunday, but in OmniFocus mini calendars show Monday as the first day of the week, although even there in OmniFocus preferences I've set it to use Sunday as the first day of the week. Developer says that OmniFocus is using system's settings, but nowhere in my system (except iCal) I can find where I could set the first day of the week. I have set English as the default language and order of list sorting in the International settings. Any ideas or suggestions?

    Unless it is set with the Country in the International preferences, I don't think their tech support knows what they are talking about. However, if that is where it would be set, you should be able to override it with the custom settings, but you can't.
    I'd ask them to tell you where that gets set, or is stored. Ask them what system call is used to get that value. My guess is they won't be able to tell you.

  • Issue with Gregorian Calendar and setting Day of the week

    Hi
    This may have a simple solution, but its currently got me stumped. Basically, after some calculation I determine the date that a particular event should occur on. These events are listed in a JTable where the column headers are the dates of the beginning of the weeks. In order to place my calculated event in the correct column I create a Gregorian Calendar, set it to the date of the event and then set the day of the week to the beginning of the week. Normally this works fine but for a few instances, rather than getting the date at the beginning of the week, I get the date thats the beginning of the next week.
    As a quick example, to kind of illustrate my problem:
    I determine that the date of the event is 27/06/2006 which is a Tuesday.
    I want this event to appear in the column headed 25/06/2006, the date of the beginning of the week.
    In fact it appears in the column headed the 02/07/2006 which is the beginning date of the following week.
    Is there anyway to get it so when I set the day to the first day of the week it goes to the beginning of the current week rather than the beginning of the next week?
    Any suggestions would be gratefully recieved as I'm currently struggling to think of any.
    Thanks

    Hi, I dont say Monday is the begining of the week. At least I dont think I do.
    As for code I'll post the conversion bit which is:
    for (int i = 0; i < areaNameSelectionTable.getRowCount(); i++) {
    GregorianCalendar conversionCalendar = new GregorianCalendar();
    conversionCalendar.setTime((java.util.Date) prioritiesTable.getValueAt(i, 10));
    conversionCalendar.set(GregorianCalendar.DAY_OF_WEEK, GregorianCalendar.SUNDAY);
    }//end for loopI then create a string from the GregorianCalendar in the format DD/MM/YYYY and compare that with the headers of my table columns (Also dates in the format DD/MM/YYYY) When they match thats the column this particular event should appear in. I can post this code if necessary, but I dont know if its relevant.
    Thanks

  • Report Request - Tickets by day of the week

    So there are plenty of reports that show data based on past X days, but as far as I can see, none break it up into by days of the week.
    Example, For the last month, how many tickets were closed on Monday, Tuesday, by what Tech, in which Category/Location/Custom attribute.
    Could someone better than I make this happen?
    This topic first appeared in the Spiceworks Community

    I am not sure about your help.  Text variable is part of the header of a column and how is it possible to use the text variable as part of the result area.  I want the day to be part of the line item in the report.
    Appreciate if any one can provide their thoughts and input.
    Regards
    Sundar

  • Oracle returning incorrect day of the week

    Hi there,
    I have a table named Performance, which includes a date field named PDATE, some other attributes such as title, etc, and a field named WEEKDAY, which includes the numerical value for the day of the week. Here is an example:
    PER#
    P#
    THEATRE#
    WEEKDAY
    PDATE
    PHOUR
    PMINUTE
    COMMENTS
    1
    1
    1
    1
    02-MAR-10
    19
    30
    Normal evening time
    2
    1
    1
    2
    03-MAR-10
    19
    30
    Normal evening time
    58
    6
    6
    3
    04-MAR-10
    19
    30
    Normal evening time
    5
    1
    1
    4
    05-MAR-10
    19
    30
    Normal evening time
    I went to verify the day of the week in a calendar (in fact I checked more than one) and I noticed that the Weekday value seems incorrect. For instance, the 2nd of March was a Tuesday so I would expect WEEKDAY to say 3 (considering Sunday to be the 1st day of the week, which is the universal norm), or perhaps 2 (considering Monday to be the 1st day of the week).
    First thing that came to mind is, since the WEEKDAY is a number field which has been pre-populated, the person who populated it made a mistake.
    So I went to verify this by running a query that would give me the correct day of the week by extracting it from the PDATE field:
    SELECT DISTINCT pdate, EXTRACT(year from pdate) year,
    to_char(to_date(pdate,'DD/MM/YYYY'),'DY') weekdaycalc, weekday
    FROM ops$yyang00.Performance
    ORDER BY pdate
    And to my astonishment, I got the following table as a return:
    PDATE
    YEAR
    WEEKDAYCALC
    WEEKDAY
    02-MAR-10
    2010
    SUN
    1
    03-MAR-10
    2010
    MON
    2
    04-MAR-10
    2010
    TUE
    3
    05-MAR-10
    2010
    WED
    4
    06-MAR-10
    2010
    THU
    5
    07-MAR-10
    2010
    FRI
    6
    08-MAR-10
    2010
    SAT
    7
    09-MAR-10
    2010
    SUN
    1
    10-MAR-10
    2010
    MON
    2
    As you can see, all of the above WEEKDAYCALC values are incorrect, and seem to match the incorrect values in WEEKDAY.
    I could perhaps understand some weird WEEKDAY numbering if there is some general database setting where I could specify any day of the week to be the first day. However, I can't think of any logical explanation on why Oracle would call a Tuesday Sunday.
    Could someone please advise what I mght be doing wrong? This is driving me insane!
    Thank you in advance for all the help and support.
    Regards,
    P.

    Hi,
    1bded5c7-e555-4306-ac86-45da83dff439 wrote:
    Thanks both Frank and Solomon for the help. I am quite new to Oracle and I feel you folks went the extra mile on the explanation
    Based on your explanations, I changed the formula so the date format would be processed as YY rather than YYY.
    SELECT DISTINCT pdate, EXTRACT(year from pdate) year,   
    to_char(to_date(pdate,'DD/MM/YY'),'DY') weekdaycalc, weekday   
    FROM Performance   
    ORDER BY pdate  
    And I got the correct values now:
    PDATE
    YEAR
    WEEKDAYCALC
    WEEKDAY
    02-MAR-10
    2010
    TUE
    1
    03-MAR-10
    2010
    WED
    2
    04-MAR-10
    2010
    THU
    3
    05-MAR-10
    2010
    FRI
    4
    06-MAR-10
    2010
    SAT
    5
    07-MAR-10
    2010
    SUN
    6
    08-MAR-10
    2010
    MON
    7
    The interesting bit here, is the original WEEKDAY field, which clearly has been created with the same mistake I did (this whole table wasn't created by me). I reckon I spotted a design bug.
    Regards,
    P.
    No; you're still calling TO_DATE on something that is already a DATE, and you're still using an implicit conversion (only now you're using a format such that the current NLS settings don't cause you to get punished.  If your DBA changes the NLS settings next week, then you will have similar errors again.)
    If you want to see what day of the week pdate is, then use:
    TO_CHAR (pdate, 'DY')
    or, to make it NLS-independent:
    TO_CHAR (pdate, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH')
    This is simpler than what you posted, it's more efficient and easier to debug and to maintain, and it also gets the results you want in all cases.
    One more time: TO_DATE, as the name hints, converts something (a VARCHAR2, to be precise) TO a DATE.  If pdate is already a DATE, then what do you need to convert?  You're implicitly converting a DATE to a VARCHAR2, then explicitly converting that VARCHAR2 back to a DATE, and then calling TO_CHAR.  That's 3 function calls (1 of them error prone) where only 1 is needed.
    Also if you ever have to reconcile 2-digit years with 4-digit years (and, again, in this problem you don't) the correct way is to convert the 2-digit year to a 4-digit year, not vice-versa.
    Calling Tuesday the 1st day of the week could make sense in a particular application.

  • I have several recuring alarms set up on my calendar for each day of the week. In the past few weeks, an alarm will occasionaly notify me roughly 15 minutes to an hour and a half late. These daily alarms are identical and repeat every day.

    I have several recuring alarms set up on iCal for each day of the week. In the past few weeks, an alarm will occasionaly notify me roughly 15 minutes to an hour and a half late. These daily alarms are identical and repeat every day and there seems to be no apparent pattern to why or when an alarm happens after the event is past.

    I assume you meant iCal rather than iTunes? Yes, iCal the time zone is correct. The delayed alarms only happen sporadically. Since I posted this message, the problem stopped happening every day at the same time, but it still happens occasionally with no rhyme or reason as to when. It's gotten so that I can't depend on my iCal alarms anymore.

  • Weekly schedule line should pass to last working day of the week in SAg

    HI,
    In a scheduling agreement when we have weekly or monthly schedules the system displays the date in the screen as 12/2010 or 13/2010 for say a weekly schedule.
    However when the data is stored in the table the delivery date is always the first working day of the week. In this case when the week is 13/2010 the data is stored in the table as 22/03/2010.
    Is there any way to change this to the last working day of the week?
    We have some config related to define delivery intervals in IMG--> Sales and Distribution --> Sales --> Sales Documents --> Scheduling Agreements with Delivery Schedules --> Define Delivery Intervals. Will this help solve my issue? If it solves what is the procedure behind this?
    Request you to provide your inputs.
    Thank You, Lakshmikanth

    Hi,
    Seems the delivery split concept is different from this requirement. Can Delivery intervals concept help us or not? IMG--> Slaes and Distribution --> Sales --> Sales Documents --> Scheduling Agreements with Delivery Schedules --> Control EDI Inbound Processing --> Define Delivery Intervals.
    What is the procedure and assignment details for delivery intervals concept?
    Thanks, Lakshmikanth

  • I am trying to find out if I can change a setting of the calendar in my iPhone.   When I view calendar, in month, I would like to view it with the starting day of the week being Monday, not Sunday.  Is it possible to make this change? SS

    I am trying to find out if I can change a setting of the calendar in my iPhone. 
    When I view calendar, in month, I would like to view it with the starting day of the week being Monday, not Sunday.  Is it possible to make this change?

    Hello SMEvans32
    You can use iCloud to share the Calendar, that way she will always be up to date on that particular section of your work calendar. If you want to use iCloud, I would recommend backing up so you have a safe copy of your data.
    iCloud: Calendar sharing overview
    http://support.apple.com/kb/PH2689
    iCloud Setup
    http://www.apple.com/icloud/setup/
    Thanks for using Apple Support Communities.
    Regards,
    -Norm G.

  • Wrong starting day of the week printing calendar in month view

    I'm trying to print a month view calendar with the weeks starting from Monday.
    In "Preferences" -> "General tab" ->"Start week on:"  I've set Monday, and it is properly viewed in Calendar, but when I try to print it in the preview I see Tuesday as first day of the week.
    This happens on many MacBook that I've tried, all with Yosemite and Italian regional settings.
    The only way to resolve this issue is to open "System Preferences" ->"Language & Region" and change the "First day of the week:" on Sunday in all my "Preferred Languages" (both Italian and English), to have the printing preview of a calendar starting on Monday!
    Is there an other way?
    Is this a bug that should be submitted to Apple to get a "patch" on future releases of Mac OS X?
    I know, it is a tiny issue, but annoying.
    Mauro

    Re: Calendar printing problem

  • Changing the calendar settings: Sunday as the first day of the week

    Dear Masters of SAP universe,
    In ECC6.0, I am using a LIS info-structure with the period split set to week.
    I would like to know how can I change the calendar settings in order to consider Sunday as the first day of the week, instead of Monday.
    For example:
    A sales order created on Dec 12th creates the record 201049 in the info structure S900 - SPWOC.
    I would like to have it as 201050, where 50 is the currently week in the system.
    I already checked OSS notes and the transaction SCAL for customizing. But I did not find a solution this issue.
    Your help is highly appreciated!

    hi,
    this seems to be a calendar issue.
    please check for OSS also - 1158474.
    balajia

  • Cannot turn on "Show the day of the week" option in Date & Time

    OS X Lion turns "Show the day of the week" option off each time I open that preference pane and after every reboot. My region in Formats tab of Language & Text preference pane is set to "Russia (Russian)". I've noticed that the problem doesn't appear when region is set to US (I didn't try others). Is there any known workaround, except changing my region preference?

    Me too.
    And I have a workaround, until Фззду fixes it finally:
    1) Go to the ~/Library/Preferences, locate a file named com.apple.menuextra.clock.plist, open it with Plist editor (comes with XCode) or just with TextEdit.
    2) There's DateFormat key in it, change it to "EEE H:mm", save the file.
    3) Now Cmd-I (right click - Get info) on that file in Finder, and check option named "Locked" ("Защита").
    System Preferences' Date & Time pane sets the aforementioned DateFormat to "ccc H:mm" when you tick the "Show the day of the week" option, while in Russian locale. And in English it becomes "EEE H:mm". The problem is that Sys.pref and even SystemUIServer (that shows the menu) processes somehow do not like the former value and erase it. After every relaunch of SystemUIServer (after reboot or being killed) tries to change "EEE" to "ccc" again (which would be cleared to nothing next time), that is why you have to lock the plist file.

  • United Kingdom Regional Format sets Monday as the first day of the week.

    With the Region Settings (Settings -> General -> International -> Region Format) set to United Kingdom, Calendar displays Monday as the first day of the week. I have seen other posts whereby it was suggested to change to US Internationalization but this will also change the date and telephone number formats to US settings, far more frustrating.
    Have I been sheltered from properly formatted calendars all my life or is this a mistake and it should start the week on Sunday. It is consistent in both the Week and Month view.
    Am I crazy or does anyone else agree with is?

    Same here. One of the first things I do in this sort of application is switch week start to Mondays.
    Terry, East Grinstead, UK
    Message was edited by: Terry P

  • How i can change te first day of the week?

    By default the week start in sunday and i want monday.
    In the siebelOnDemnad documentation i find some about one parameter named FIRST_DAY_OF_THE_WEEK in NQSConfig.INI but i don't know how to change it.

    I don't believe its possible to change the first day of the week.

  • Can I change the first day of the week on my ipod touch

    I have a new Ipod touch, which i recently upgraded to OS 3.0. I was wondering if it is possible to set the first day of the week in Ical to Sunday instead of Saturday?
    Thanks

    The International Region Format controls the start day of your calendar display. UK region format sets the display to start on Monday. US region format will start the calendar on Sunday. However, that setting also controls your date, time and phone number formats, so using it would only cause you more problems.
    Tell Apple you want the option to set the calendar week start independent of the international region format using the feedback page. http://www.apple.com/feedback/ipodtouch.html

  • Changing the first day-of-the-week on the MyTimesheets app

    IN the SAP ECC and Portal implementations of the timesheet app, we were recently able to change the display so the first day of the week is listed as Monday, rather than Sunday. I would like to do the same thing with Fiori.
    That is, when the app starts up the first view a calendar view of the whole month. If a person wants to enter time manually, they click the button labeled "manual" and a data entry screen pops up. The first day of the week listed across the top is Sunday, which does not reflect our settings in ECC. We need the 1st day of the week to be Monday.
    Is there a configuration change we can make to force the 1st day of the week to be Monday, as it is in ECC?
    thanks for your help!
    -Rob Solomon

    Hi Rob,
    Are you using Wave2 app? You could change the setting for first day of the week in CAC1 and Fiori Timesheet app will adjust te calendar accordingly.
    Nothing needs to be done for Fiori app.
    Please update UIX01HCM to SP03 if you are using Wave2 app?
    Best Regards
    Pankaj

Maybe you are looking for

  • Change logs not working for manual update modify/delete statements.

    Hi experts,                  My requirement is to display the change logs for a few custom z tables.The log data changes is selected in technical settings of the table.When any changes are made to the table using sm30 the changes are logged. My requi

  • Please help with an Indesign Post Card Problem!

    Greetings!   I am in need of some help!  I am trying to create a post card in InDesign and then send it to a printing company.  I sent my finished product to the company and they stated that it would not work out well.  The font is too small, picture

  • IMac 27" Video Output

    I currently have an iMac 27" Intel Core 2 Duo model (November 2009) and whenever I connect to my HDTV via VGA I cannot set a resolution higher than 1600x1200 @ 60Hz. I know the TV is capable of doing so. My MacBookPro 13" with the integrated Nvidia 9

  • Exact String match when calling a recordset

    I have a CategoryID column, and a Cats column. The main catefory for that products is on CategortID, but the in the Cats column is a string of other categories that the item is listed in. The problem is that if the search is for category id 94, and t

  • Can anyone tell me WHY Oracle won't allow sub-queries in outer joins?

    Hi, I've recently been tasked with converting a series of InterBase dbs to Oracle. Many of the queries in the InterBase dbs use sub-queries in outer joins. Oracle won't countenance this (01799 - a column may not be outer-joined to a subquery). I can