Calendar object issues ... recompute remaining fields after change?

Hello all. I'm doing date manipulation and arithmetic, but I'm running into a problem.
I'm taking a date provided by a user and comparing it the current date. However, it's the month-end that I'm interested in.
I'm already creating GregorianCalendar objects from each one, and doing the set on the DAY_OF_MONTH field to the value from getActualMaximum(DAY_OF_MONTH).
The problem I'm having is that when dealing two dates from the same month, the two Calendar objects are >NOT< returning as EQUAL. After converting each object to a Date and running compareTo() (Side Bar: Why isn't compareTo() available in the Calendar class?) I'm not getting zero.
I tried a toString() on the two objects, and I can see that some of the fields are not exact ... the time field is "?", WEEK_OF_YEAR, WEEK_OF_MONTH are different, etc. I can see the protected method complete() in the API, but attempts to execute them (gcCurrDate.complete()) yield compile errors stating the method is not visible.
So how does one ask the system to fill in the remaining fields?
Thanks!
Steve

According to the API docs for Calendar:
"set(f, value) changes field f to value. In addition, it sets an internal member variable to indicate that field f has been changed. Although field f is changed immediately, the calendar's milliseconds is not recomputed until the next call to get(), getTime(), or getTimeInMillis() is made."

Similar Messages

  • Is there a way to add event details using a calendar object vs. those dumb field entry boxes?

    I have switched from PC to Mac over a year and a half ago, and have been plagued with the "dumb" date entry boxes in iCal and now Reminders on the mac. For one, they don't show you the DAY OF WEEK for an event, it assumes you are parked on that day, but of course reality sets in and causes constant date changes for events. Picking a date in the future would be much more helpful if Apple followed some usability norms in iCal. For instance, if you are booking a flight online, those helpful little calendar objects pop up, and further, they are smart about "end dates and times" for events, knowing it can't be earlier than the start date. Apple iCal unfortunately always thinks you are creating an ALL DAY event, and when you change the start time, it creates the end time for the next day. Not very smart. Or is it me that is not very smart for constantly hawking every little data entry field for correctness. Why, oh why dear lord has Apple not given some usability attention to iCal on the mac??? At least match the interface of the iPhone with a nice little slot machine rolling control.
    Is there an add in?
    Is there hope that Apple will ever fix its lagging Mail and iCal apps on the Mac?
    Please advise. Or just offer a kind word of consolation if there is no hope for a better interface.

    In the future, Swing related questions should be posted in the Swing forum.
    The code you posted is of little use since it uses custom classes so we can't see the behaviour of your code.
    In general if you add a component to a Container at run time then you just use
    container.revalidate()
    This will invoke the LayoutManager and repaint the components in the container based on the new layout.

  • I can not map field after changing data source location

    Hi
    I have a small problem that I got a report file and database from my customer, after that I setup database, open the file and change data source to my setting. but some filed can not map. The field mapping widonw does not display all field in the table. Of course I have checked the missing fields are existing in the table.
    OS:Windows7
    DB:Oracle11
    CR:XI Release 2
    Does anyone have an idea?

    hi,
    In Map Fields window, there is an option "Match Type".
    Please Unchek that option, so that you will be able to see all the fields from that table.
    Also, while mapping please verify the datatypes of source and target fields.
    Regards,
    Vamsee

  • Changing color of a field after changing the data using OOPS ALV.

    Hi Experts,
    I have displayed three fields (price, no. of products and total amount) in my ALV grid using OOPS.
    Then am changing the data in either price or no. of products fields. When I click ENTER key the value in total amount changes correspondingly. Am able to achieve till this point.
    Now I have to change the color of the three fields( price, products and total amount) of the affected row alone and not the entire set of rows in the output grid.
    Please provide suggestions.
    Thanks in advance.

    Hi,
    You have to use Layout and Output data in your OO ALV. The below code is using FM you can replicate it in OO ALV
    types: begin of t_data,
             flg(3) type c,
             sty    type lvc_t_styl,
             col    type lvc_t_scol,
           end of t_data,
           t_tdata type table of t_data.
    constants: c_red type i value '255',
              c_g   type i value '1'.
    DATA: i_fcat type LVC_T_FCAT,
          s_fcat type lvc_s_fcat,
          s_lay  type lvc_s_layo,
          s_sty  type lvc_s_styl,
          s_col  type lvc_s_scol,
          i_data type t_tdata,
          s_data type t_data.
    s_lay-stylefname = 'STY'.
    s_lay-CTAB_FNAME = 'COL'.
    s_fcat-FIELDNAME = 'FLG'.
    APPEND s_fcat to i_fcat.
    CLEAR: s_data.
    s_data-flg = 'Yes'.
    s_sty-FIELDNAME = 'FLG'.
    s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT.
    insert s_sty into TABLE s_data-sty.
    s_col-fname = 'FLG'.
    s_col-color-col = 6.
    s_col-color-inv = 1.
    insert s_col into table s_data-col.
    APPEND s_data to i_data.
    CLEAR: s_data.
    s_data-flg = 'No'.
    s_sty-FIELDNAME = 'FLG'.
    s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT_NO.
    insert s_sty into TABLE s_data-sty.
    APPEND s_data to i_data.
    CLEAR: s_data.
    s_data-flg = 'No'.
    s_sty-FIELDNAME = 'FLG'.
    s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT_NO.
    s_col-fname = 'FLG'.
    s_col-color-col = 6.
    insert s_col into table s_data-col.
    insert s_sty into TABLE s_data-sty.
    APPEND s_data to i_data.
    CLEAR: s_data.
    s_data-flg = 'Yes'.
    s_sty-FIELDNAME = 'FLG'.
    s_sty-style = CL_GUI_ALV_GRID=>MC_STYLE_HOTSPOT.
    insert s_sty into TABLE s_data-sty.
    APPEND s_data to i_data.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
    EXPORTING
       IS_LAYOUT_LVC                     = s_lay
       IT_FIELDCAT_LVC                   = i_fcat
      TABLES
        T_OUTTAB                          = i_data
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    IF SY-SUBRC <> 0.
    ENDIF.
    Thanks,
    Kiruba

  • Issues with file sharing after changing password

    Last night I changed my system password on my MacBook Pro and for some reason it caused some issues with my file sharing with my windows PC.
    I was able to finally get the notebook to connect again to the XP PC shared documents by going through finder to go to network and then connected. But the PC would not see the notebook. Everything was communicating fine when I first got the system two weeks ago.
    Tech support did what they could tonight and I finally just decided to set up a connection to my notebook by entering the notebooks ip address on the pc.
    It's alte and sorry for the rambling, but does anyone know why the pc (as well as others in the house) no longer see the notebook?
    Jim

    No, There isn't a bug with file sharing between Mac and Pc client.
    2941640 Desktop sharing session stops in Lync 2013 when all screen data is updated
    Also you can check below links
    http://support.microsoft.com/kb/2952672/en-us
    http://support.microsoft.com/kb/2880474/en-gb
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical | Twitter:
    Mai Ali

  • Prompt constrain - prompt values are not refreshed after change in calendar

    Hello,
    I have prompt with Date, OrgUnit and Employee field in OBIEE 10g.
    Date - calendar component "date between"
    OrgUnit - multi-choice
    Employee - multi-choice
    I have checked "Constrain" checkbox on Employee field, because I want to show only employees from selected OrgUnit and also I have checked constrain on Date field.
    After first selection everything works fine. I select some dates (I have calendar component - date between), some OrgUnit and I can see list of employees constrained by selected OrgUnit and Dates
    - physical select is executed to get list of employees to multi-choice component
    After that I change date interval, open employees multi-choice component but no physical query is executed and I will get back some cached result from previous request.
    It seems that change in calendar component does not force refresh of data in other constrained components.
    If I select some other OrgUnit, Employees are refreshed.
    I tried to change component for Date from calendar to multi-choice. After some change of dates in multi-choice component. OrgUnit and also Employees are refreshed.
    I also tried some different combinations of constrain checkboxes but with no success
    So my question is: How can I force refresh (force execution of sql query) data in constrained fields after some change in calendar component?
    Thank you

    In my case It doesn´t refresh after change in calendar component. It does refresh after change in multi-select promot, or dropdown component, but doesn't refresh after change in calednar component.
    BI server cache is not enabled.
    If I open employee multi-choice component for the first time, physical query is executed. I change date to some other, open employee component for second time and no query is executed and I will get old values from previous action...

  • Calendar object for the next week day

    I have a calendar object,
    How can I get the calendar object the comes on the next Tuesday or for that matter any week day.
    For example I have the calendar object for today ie. Monday, 7th Aug 2006. How can I get the calendar object for the first saturday after today.

    What you do is calculate how many days ahead it is.
    This would be the target day, less today's day
    reduced to modulo 7. Add 7 to guarantee the %
    operator works correctly e.g.
    cal.add(Calendar.DAY_OF_YEAR,(7 + Calendar.SATURDAY -
    cal.get(DAY_OF_WEEK)) % 7);
    Requires that the numeric values associated with the days of the week are ordered and one apart. Even thought this is the case, the API does not say this is the case so it should not be assumed.

  • Satellite Pro L40 wont boot after changing BIOS settings

    Alright changed a few settings in the bios last night and now when I boot I get a black screen lights flash and that hard drive light comes on but nothing on screen.
    There was no password on bios,... how would I reset BIOS to normal?
    I put a windows disk on I can hear the disk spinning but nothing on the screen
    (I think I have come to the right place on the forum)
    Its a Toshiba Satellite Pro L40 model psl4be.
    Thanks

    >There was no password on bios,... how would I reset BIOS to normal?
    You can set the BIOS to default ONLY inside the BIOS so you have to access the BIOS pressing F2 or at the beginning of the booting order
    But I doubt that this problem is related to the BIOS.
    Maybe its just a simple bad luck that this issue happened just exactly after changing something in BIOS.
    Try to connect an external monitor and check if you can see something on 2nd display.

  • Issue with Info Object Transport after changing Data Type

    Hi Experts,
    We have a DSO which is running past 5 years. And recently(3 days back) we added new fields into that DSO. Delta loaded for last three days and new info object (Say XXX) data populated into DSO.
    Now the problem is, We identified that, info object data type is not correct. We used data type NUMC  instead of CHAR.So Character information is missing for that field.
    Example:
    Data from ECC: ABC123
    Data Loaded to DSO: 123 (Missed character ABC)
    So we deleted data from DSO and changed the info object data type in Development system.
    And also I have deleted only last three days delta records from DSO and transported my info object to Production. But its giving error as: Info object contains data in DSO".
    But that info object field is empty in DSO. I have already deleted last three days delta.
    Do I need to Delete all 5 years data from DSO to change the data type of recently added new info object ?
    Please give me your solutions and ideas to solve this issue.
    Thank you,
    Best Regards,
    Santhosh

    Hi Raman,
    Thank you for your answer.
    When I changed the data type of info object in Dev, I deleted the content of DSO. And same thing transported to QA as well. Before importing changed info object, I just deleted the content of DSO from QA. So transport done successfully QA.
    But in Production we have a history of past 5 years. So I cant delete all contents of DSO.
    So just deleted only the delta request's which contains data for that info object(3 days back, we moved that info object(NUMC data type) to production,So last 3 days delta only loaded for that info object). And tried to transport it. But it was failed. I am sure we need to drop all data from DSO, if I am interested to go with same info object.
    I have some comments on your first approach,
    1. If we delete info objects from Dev DSO and transport to Production will give transport failure, Why because, my previous transports errors clearly saying that info object contains data in DSO . So it wont allow to remove that info object from DSO.
    2.We are using same info object technical name in BO Data federator also. So if we change add new info objects again we need to make changes with BO as well. I am thinking this point as my last option if i cant find any other solution.
    Thank you.
    Best Regards.

  • Changing TimeZone for Calendar object doesnt change its time

    Hy, I have a Calendar object with I have set with a Date but I I want from this calendar with the Date set, set other timezone for this calendar and get the corresponding time(always gettting the correct time if is in daylightsavings) but I get the same time.
    Calendar calendario = Calendar.getInstance
    calendario.setTime(new Date());
    System.out.println(calendario.getTime()); *// for example I get the 14:12:25 hours for GMT+01:00*
    calendario.setTimeZone(TimeZone.getTimeZone("GMT+02:00")); *//change time zone using GMT*
    System.out.println(calendario.getTime()); *// I get the same hour: 14:12:25*
    Why? How to do it using GMT format?
    Thanks
    Edited by: user13162080 on 13-sep-2011 14:31
    Edited by: user13162080 on 13-sep-2011 14:48

    user13162080 wrote:
    Ok, thanks. The last question, this changing of timezone and the hour I am getting, is respecting the timezone daylight saving?, I mean if the TimeZone I set is in daylight savings, I will get the correct hour according to this?What DrClap said.
    However, I think you still may be under some misapprehension about time zones:
    1. A Date does NOT have a timezone, even though it stores a date/time value.
    2. Setting a Calendar's timezone does NOT change the time stored in the Calendar. You may even need to run its complete() or computeFields() method to have the timezone change reflected in all its fields (not sure).
    3. As DrClap said, if you are using a DateFormat to display the Calendar, you need to set its* timezone in order to see what you want (for reason 2 above).
    It's amazing to me that after 10 years this API still gives so many problems (and believe me, you're not the only one).
    One thing you might also want to do is have a look at [url http://joda-time.sourceforge.net/]Joda Time. It's been around for a long time now, and so is quite mature; and is fully interchangeable with standard Java date/time classes. In fact, many of its ideas were under consideration for Java Version 7 as JSR-310, but were decided against (still not quite sure why, as in my view the current API is very poor).
    Winston

  • Calendar display issue after iOS5 update

    Everything went well with my first-gen iPad's iOS5 update. However, the issue I'm seeing now is that, sporadically, I will tap on the Calendar icon and there are no events displayed (the calendar always comes up in "Month" view). However, if I "turn the page" to the next or previous month and then come back to the current month, the events are all back. I turned iCloud off, thinking this was, perhaps, the culprit but this behavior still occurs. Again, this only happens maybe once out of every four or five launches of the calendar app but is still annoying nevertheless.iOS5 on my iPhone 4 is not doing this (not yet, at least...).
    I'd be interested in knowing if anyone else is experiencing a similar thing and if so, is there something I'm missing to resolve it?

    I just created a new thread about this. This has occurred twice now since iOS 5 on my original iPad. My default view is Month and when I launched the app on these occasions it opened to all dates blank. Frightened me at first thinking iCloud had wiped all my events out of my calendars however I discovered that if I changed the view to year, week or whatever the events were all there and remained when I switched back to month. So far this has only happened on my iPad and not on our iPhones all running iOS 5 or on our computers syncing through iCloud.
    We need to leave feedback about this. Seems to be an iPad only issue.

  • Master-detail: detail field not displayed after changed by master field

    I want to use the Depends on item with Clear/refresh value functionality in a master detail situation. Within the same group it is no problem to use the setter method of a field to change a second field and then displaying this new value. But in the detail group, I can not select items from the master group as a depends on item.
    In the setter of the master field, the value in a field for each row in the detail (table layout) is updated. The only problem is that this updated value is not displayed, the old value doesn't change. When saving the changes, the displayed value is committed to the database. When de updated field is not displayed at all, the correct value is saved, so I know the detail field is updated.
    How can I make sure the displayed value in the detail is displayed after changeing a master field? I already gave the detail field the correct partial trigger.

    Wouter,
    I guese you don;t see the changed value when you display the detail item because after the depends on item update changed the detail item, JSF procesing continues and the detail table changes are sent to the server which will override again the detail item attriibute, resetting it to the old, still displayed value.
    So, the trick is to get PPR working. Make sure the partialTYriggers property of the detail item is set to the value of the id property of the master item. If it still doesn't work, try setting the partial triggers property on the table, instead of the individual item.
    Steven Davelaar,
    JHeadstart team

  • Issue with bringing up Weblogic 10.3 after changing username passcode

    I am facing Issue with bringing up Weblogic 10.3 after changing username passcode in security realm Madhok, basically i have removed the default weblogic user and defined m,y own custome user and provide the credentials in the server start tab. When i try and bring up the admin server it comes up fine but the managed servers fail to start from admin console and i can see security credentials authentication error in logs? Why would that be considering the admin server is able to come up with the same credentials.
    -Priya Madhok
    Systems Architect
    InterAlliance Group Services
    http://www.interalliancegroup.com

    We had similar problem in the past, our problem was:
    Problem:
    We deleted weblogic default user from security realm and create new user when node manager and the managed servers were down. When we tries to bring up the managed servers after starting node manager we kept getting authentication denied errors.
    Solution:
    Recreate weblogic user and now try and bring up managed servers from command line using weblogic user. Once they are up shut them down and bring them up again with the new user you have created and it will work
    Reason:
    The managed servers in 10.3 seems to be storing the authentication details in there local managed servers ldap or cache. When you start the managed servers the don't know the new credentials and are authenticating against older values of stored credentials, hence they fail. Once they are started with the old credentials they communicate with admin servers to sync there cache with admin servers and the new credentials gets updated and from then on you can restart the managed servers with new credentials.
    Note: Sometimes after restart you may face the problem as the sync process with admin server is asynchornous, weblogic prints a line saying something like Performing async operation with server address null. If the line gets printed sync has happened and you are good. In case you don't see the line restart again and you will see the line after which you can restart with new credentials.

  • Acrobat 9 Pro: fields deleted after changing compatibility of Acrobat for 4.0

    I have pdf's with many of fields in which I need to change compatibility on Adobe 4.0.
    When I try to do this (Save as optimized pdf with the option selected "make compatible with" on "Adobe 4.0 or later") program delete all of fields.
    This problem appears after changing OS from Win XP on Win 7 Enterprise 64-bit.
    Earlier I didn't have that problem.
    I will be grateful for any help, reinstalling Adobe has not helped and I did not find any clues on the internet.

    Unfortunately I can not share this documents.
    However, I noticed that only some of them have above problem. Now I have only to find its cause - changing the OS wasn't the cause of this problem.
    Thank you for your interest.

  • Issue with printing production order after changes through CO02

    Hi,
    Currently I have one issue with printing production order changes through CO02. If I go for print, all the operations are captured in printout. But after the print, if I add any new operations to this production order, and then go for print, its not capturing the newly added operations. Also, there is information popup coming "Copies will be printed for order. Original list already printed". This message effectively means, even after changes, when I go for print functionality, its just going for printing copies of original printed list.
    Can anyone help me out to get the newly added operations reflected in the print through CO02 ?
    Regards,
    Shiva

    Hi Shiva,
    Refer SAP note 28887.
    Source: http://www.sapfans.com/forums/viewtopic.php?f=9&t=308577
    Please search /google before posting queries.
    Regards,
    SuryaD.

Maybe you are looking for