1024 weeks after 1980

I just tried adding 1024 weeks to a calendar instance set to January 6th, 1980, 00:00:00 (0:00 AM).
Calendar c = Calendar.newInstance();
c.set(1980, 01, 06, 00, 00, 00);
c.add(Calendar.WEEK_OF_YEAR, 1024);
System.out.println(c.getTime());The output is: Wed Sep 22 00:00:00 CEST 1999
Time zones is one thing (why is CEST listed and not CET, which will be listed when I add about 1450 weeks or so), but that's not the issue here. The issue is the month. According to my calendars, online calculators etc, 1024 weeks after that date and time should be on August 22nd of 1999.
Could this be a bug? Am I using the Calendar class incorrectly? How do I otherwise get the correct date (and time, if anyone can point me at hints how to consider the various leap-seconds that occur in UTC)?

drvdijk wrote:
I just tried adding 1024 weeks to a calendar instance set to January 6th, 1980, 00:00:00 (0:00 AM).
Calendar c = Calendar.newInstance();
c.set(1980, 01, 06, 00, 00, 00);
c.add(Calendar.WEEK_OF_YEAR, 1024);
System.out.println(c.getTime());The output is: Wed Sep 22 00:00:00 CEST 1999
Time zones is one thing (why is CEST listed and not CET, which will be listed when I add about 1450 weeks or so), but that's not the issue here. The issue is the month. According to my calendars, online calculators etc, 1024 weeks after that date and time should be on August 22nd of 1999.
Could this be a bug? I doubt it.
Am I using the Calendar class incorrectly? I believe so. Check your assumptions.
You entered "01" for the month, expecting that mean "January". I believe you'll get the right answer if you enter Calendar.JANUARY for the month instead.
%

Similar Messages

  • I bought and downloaded iWork when i bought my macbook pro and i used to save my documents on words. then a few weeks ago, i downloaded a free trial of microsoft office but unregistered and deleted it a week after. now i can't save my documents on word.

    i bought and downloaded iWork when i bought my macbook pro and i used to save my documents on words. then a few weeks ago, i downloaded a free trial of microsoft office but unregistered and deleted it a week after. now i can't save my documents on word. It used to ask me if I want to save my documents on word, now it doesn't. And the W icon keeps on appearing on my dock. Can I return my computer to an earlier date? Please help me. Thanks

    No, I don't have a back-up of TIme Machine... to tell you the truth, I have this computer for a few years now and I still don't know how to work all of the apps that are here. Anything else I can do?

  • I updated iOS 7 and my contacts were ok then they suddenly disappeared a few weeks after updating. I have no idea if it has anything to do with iOS 7 but when I email someone the contacts are there. When I open the app they are gone. What happened?

    I updated iOS 7 and my contacts were ok then they suddenly disappeared a few weeks after updating. I have no idea if it has anything to do with iOS 7 but when I email someone the contacts are there. When I open the app they are gone. What happened?

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar                                      

  • My left shift key on Macbook Pro Retina (15") is behaving like the F11 key (show/hide open windows).  The key behaves the same for the laptop keyboard and for an external Apple keyboard?  This just started in last week after 6 months of use

    My left shift key on Macbook Pro Retina (15") is behaving like the F11 key (show/hide open windows). 
    The left shift key behaves the same on the laptop keyboard and on an external Apple keyboard. 
    This just started in last week after 6 months of use.  The right shift key and other keys on the keyboard all appear to work correctly.
    Suggestions greatly appreciated.

    I have a solution to this issue now after a discussion with Apple Support.  Some where in the last few weeks, there was a change in the key that would do a Show Desktop under the Mission Control settings in the System Preferences.  Even though the key sequence that was shown for the Show Desktop setting did not include the Left SHift key, by changing this first to having no key sequence and applying that and then changing it back to the F11 key, the Left SHift key issue that I was having has cleared up.
    A second issue that was uncovered was that the SSD had some issues (uncovered when I ran Disk Utility using the Repair Disk key).  I had to restart and use the Disk Utility through the Command R sequence to get to the stand alone Disk Utility.  The SSD appears to be running better as a result as well.
    Hope that this is of use to someone else in the future.

  • Lost Mode and Play Sound are "Pending."  However, iCloud indicates that it connected and backed up to iCloud at a date that is 1 week after it went missing.  How is this possible without locking (Lost Mode Pending an internet connection)

    Hi,
    My wife lost her iPhone two weeks ago while on vacation in London (cell service inoperative in foreign country).  Using Find My iPhone app on my device, I activated Lost Mode and Play Sound.  However, both are listed as "Pending," since it those actions require the phone to connect to the internet (wifi only due to no cellular data coverage.).
    We recently returned home and purchased a new iPhone.
    However, when looking to restore the apps/settings from her old phone using a previous iCloud backup, iCloud indicates that the old phone connected to iCloud and backed up the original phone at a date that is 1 week after it went missing.  How is this possible without locking (Lost Mode Pending an internet connection)?
    If the phone was activated and connected to the internet via a wifi signal, shouldn't it immedately lock, show up on the map, Play Sound, and send me an email that the phone has been found?
    I also read somewhere that if running iOS 7, the iCloud website interface enables you to track previous locations, for instance if the phone moves from wifi hotspot to hotspot.  Is that true?  If so, how do I do that?
    Thank you for your time, and have a great day!
    Sincerely,
    - Matt

    just giving this a wee bump as time is of the essence here and i need advice/ answers quick!
    apologies if i've broke any rules!
    alex

  • My voice mail messages are not appearing as they are left. Often no voicemails show up until 4 weeks after they have been left

    I am having trouble with my voice mail on the iPhone. The voicemails are not appearing until 3 even 4 weeks after they are left by a caller. Last night 10 voice messages came through all at once, one left before Thanksgiving. Is this an iPhone issue or an issue with the carrier?

    I'm having the same issue. It began three or four days ago. I'd notice that I'd miss a call but the person wouldn't leave a message.
    Two days later, suddenly three or four new voicemails will pop up from the past couple of days. The time stamp on the messages is correct-- it will show that the caller left the vmail a day or two before.
    Also, in what has to be a related problem, some of the voicemails appear to be corrupted and cannot be played.
    I have a 4s and my software is up-to-date. I have made no material changes to my phone, other than automatic software updates to explain this.
    It's enormously frustrating and as a job seeker, I can't afford to miss voicemails. Does anyone know if this is the phone or the carrier (AT&T)?
    Any help and input will be enormously appreciated.

  • IPad Mini keeps randomly rebooting - started last week after downloading 8.3 - Apple logo keeps coming up with the reboot/download line below

    - started last week after downloading 8.3 - Apple logo keeps coming up with the reboot/download line below. Seems to happen after opening a site to view information or pictures or.......

    this is getting more & more ridiculous......and worsening by the hour. Now every click on a Pages file makes it reboot....and just trying to save some files prior to doing a total restore as not sure what gets saved in the "back up" prior to the restore. Am starting to love my 5 year old original IPad as slow as it is, even more....

  • Ical problem already 3 weeks after the update, get the message every time username or password is incorrect as I do with this password and username in mobileme bowl. now get the message The server responded with \ 'HTTP/1.1 409 Conflict \'. can someone he

    Ical problem already 3 weeks after the update, get the message every time username or password is incorrect as I do with this password and username in mobileme bowl. now get the message
    The server responded with \ 'HTTP/1.1 409 Conflict \'.
    can someone help me

    Ical problem already 3 weeks after the update, get the message every time username or password is incorrect as I do with this password and username in mobileme bowl. now get the message
    The server responded with \ 'HTTP/1.1 409 Conflict \'.
    can someone help me

  • I find Mail under Mavericks to be weird. Are others having this same difficulty. "Upgraded" to Mavericks last week, after updating the firmware to my WD external HD.

    I find Mail under Mavericks to be weird. Are others having this same/similar difficulty? "Upgraded" to Mavericks last week, after updating the firmware to my WD external HD.

    "Weird" needs further explanation.
    Google's highly nonstandard IMAP implementation is weird, if you're using Gmail, though Apple bent over backwards to accomodate it. Other than that, what do you mean by "weird"?

  • OSX 10.4.11 Mail - Why does it randomly resend messages approx. 2 week after the original message?

    I am using Tiger (OSX 10.4.11) on a PowerPC G5 and recently my Mail has started randomly resending messages 2-3 weeks after the original message was sent.  Any ideas why and what to do about it?

    Hello, this a new one on me!?
    Do they have anything in common, like are they to the same person, same subject, same time sent originally?
    Have you ever setup iCal to do something at a certain day of the month?

  • IPad (III) dies 4 weeks after Applecare ends. Has anyone experienced this?

    One of my iPad (III)'s "bricked" when I proceeded to update to the latest version of iOS 7. It just displays an iTunes logo and a picture of the adapter plug. Wjen I plugged it to my MBP and iTunes, I got the message that the iPad must be "restored" and there is no S/N displayed.
    It also happens to be about 4 weeks after the Applecare expired.
    Has anyone experienced this behavior?
    Thanks for your help.
    Naresh

    Just an update on my issue with the iPad.
    I observed a problem syncing my other iPad getting some error code -50. After a search on-line and the Apple Support I found a suggestion to change the USB - 30 pin cable then retry.
    With that change, my problem in syncing my other iPad went away.
    So I tried the same with the first iPad. Presto. I was able to restore the iPad with current operating system software then get all the apps etc. back.
    Still no answer why the first iPad went into a "retore" mode after "upgrading" to iOS 7.1.1.
    But lesson learnt, when having a connectivity problem, check cable as one of the items.
    Thanks again.

  • Some colors in the HP tri-color cartridges dry up and stop working only a few weeks after purchase

    HP Deskjet 4180
    Genuine HP Tri-Color #22 ink cartridge and Black #21 ink cartridge
    Windows 7
    Test printing from Photoshop, Windows Picture Viewer and GIMP.
    Some colors in the HP tri-color cartridges dry up and stop working only a few weeks after purchase.
    The experience that I'm having currently contradicts very good, accurate color from HP cartridges in the past from RGB images that I've printed successfully with this printer.  I've previously got excellent color from the true HP ink cartridges on this Deskjet 4180 printer.
    But today it is obvious that the yellow is not flowing from this cartridge that was installed only a few weeks ago.  And my ink levels are at 50 percent, and they were even higher when I started today... see the screenshots below.
    I'm printing from Photoshop, but for some tests I tried printing from two other applications today but I'm always getting these results that indicate that there is no yellow printing... this is much worse than just a bad color profile.  I'm an experienced photo retoucher and I have a long history of dealing with inkjet printing in the work place with all kinds of printers.
    I know that inks can dry up in their cartridges if they don't get printed with every few weeks and if the printer isn't maintained.  I purchased these new cartridges only about three weeks ago and the first test prints and some prints two weeks ago came out perfect.
    But today this is the result I'm getting... screenshots below show the original RGB image and an actual scan of the bad print results I'm getting, indicating that no yellow is flowing from the HP tri-color cartridge.  And a screenshot of the ink level indicator panel is at the bottom.
    Why is the yellow ink drying up and not flowing so quickly?  How can I prevent this besides doing semi-weekly prints to keep the inks from drying up?  I'm in a fairly humid climat, so dry air is not the problem.  The contact points on the cartridge are clean.
    Does HP guarantee their cartridges for this kind of thing?
    Good color - original RGB image...
    Bad color - actual scan of bad print with no yellow, below...
    Ink levels after test printing...
    Thanks for any help.
    digi

    Well, here is the answer I was looking for, only arrived at by way of my own further investigation and experimentation.
    It seems that no matter who I asked about this problem, I always got the same questions and answers.
    For example, the people at the HP 800 number for consumer help, where it seemed I was not talking to someone who was actually familiar with the product, because they came to the conclusion that I need to buy a new HP printer... wow, isn't that a big surprise for an HP employee to say, "Just buy a new one!".
    No one, and I mean no one, would seem to be able to listen to or understand what I wrote in my original question on this thread about how this printer prints fine when I first put in a new ink cartridge, and then just a few weeks later one or two of the colors seem to be dried up and they won't print.
    And it seems that somewhere I read that you need to print a test maintenance print every month or so to keep the inks from drying up... but the inks seem to be drying up in less than three weeks now, even though I used to be able to go for months without doing a print and the inks would still be fine.
    So when I was talking to someone in India, Malaysia or the Philippines at the HP 800 customer phone support number, after going through so much crap about whether this printer was still in warranty just to have a simple question answered you'd think I was trying to launch nuclear missiles and my launch codes weren't current.
    And it was much the same situation to get on HP's "Live Chat" customer service on the net, and then they'd go through the same line of questions and answers as the support people on the HP 800 phone line...
    Q: "Do you have dirty nozzles on your ink cartridges?"
    A: "No, like I said in my original statement, I cleaned those and they weren't dirty to begin with."
    Response: "Because you need to clean those every so often, you know."
    Q: "Did you try cleaning the contacts on the cartridges?"
    A: "Yes, like I said in my original statement, I already did that."
    Response: "Because you need to clean those contacts every so often, you know."
    Q: "Did you try putting in a new cartridge?"
    A: "Yes, like I said in my original statement, this cartridge is nearly new and it shows a 90% ink level."
    Response: "Because you need to put in new cartridges when the ink runs out, you know."
    Q: "Did you do a test print?"
    A: "Yes, like I said in my original statement, I did a test print and that's what is telling me that the yellow and magenta are not printing any longer."
    Response: "Because that's how you can tell if any colors aren't printing, you know."
    So is anyone else seeing a pattern here?  It's not like I'm talking or live chatting with a real human being, but maybe an automated voice prompt system that only has an A, B, C   or   1, 2, 3   type of response system that it's working from. 
    The people hear a answer, and regardless of what that question was in the troubleshooting category that they are in, they just have a stock response that seems to bypass what the customer's answer was, so it's like I'm talking or live chatting with a machine that is uttering its responses in a fixed pattern, regardless of what I'm saying.
    HP customer service is like talking to someone who isn't listening, so often they ask their next question, but I just answered that question with my previous answer.
    Like I said, the way it used to be, HP or even after market ink cartridges could sit for months without doing a maintenance print and I would still get a perfect print every time.  And that's pretty typical for maybe an older person who isn't printing prints that often, but they just want to print one every few months or so, like my mom, with her HP printer, who I've been troubleshooting this problem for.
    Or even with my own large format Epson printer or any of the pro level inkjet printers and even IRIS printers that I've used in the workplace over the course of the last 20 years... you could do a print every two months and there was no problem with dried up inks.
    And I know somewhere in the past  I read that the maintenance print that the instructions was recommending be printed only needed to be done every 4 to 6 weeks to keep the inks from drying up, although when I go through the entire full blown PDF instruction manual now I can't find ANYTHING about how often a maintenance print needs to be done... that's right, nothing!
    But on Christmas eve I once again exchanged my last, dried up HP tri-color ink cartridge at a Walgreens store where my mom had purchased it months prior (and the guy was nice enough to exchange it even after 5 months)  which was yet another HP tri-color ink cartridge that had at least two of it's colors dry up after only a few weeks.  At that Walgreens they had been nice enough to replace three prior HP tri-color ink cartridges with the same problem in the last year, and before that three different after market, off brand tri-color ink cartridges from another store had dried up after only a few weeks.
    So the guy at Walgreens told me that now  with HP cartridges you need to do a maintenance test print EVERY WEEK in order to keep the inks from drying up... THAT'S EVERY WEEK YOU ARE NOW SUPPOSED TO DO A TEST PRINT FOR MAINTENANCE.
    Now, you DO NOT need to do one of the test prints where it prints a photo of a pear, which uses quite a bit of ink, but you can just do one of the self test prints where you hold down on the CANCEL button and then press the COLOR COPY button and it prints a quick test page with just a little color and a lot of B&W text, and that's apparently enough.
    And that seems to be enough to keep the ink cartridges from drying up, the way they seem to be otherwise doing so quickly now, as opposed to how HP and other brand ink cartridges used to.
    And in fact, now after about a month, after doing weekly self test prints, the ink cartridges are still flowing well and they just did some full color prints quite nicely... ALERT THE MEDIA AND ANYONE WHO CONSIDERS THEMSELVES HP PRINTING EXPERTS!
    So the questions I would ask myself are these...
    First, why is it that NO ONE at HP customer service knew this, whether it be on the HP 800 phone support or on the HP "Live Chat" with people in India, Malaysia and the Philippines, or even here on the HP Help Forum with so-called EXPERTS from HP?
    Second, how have the inks changed so that in the past, you didn't need to do maintenance prints every week, but maybe every two months at the most, in order to keep the inks from drying up, but now the inks dry up in a matter of less than two weeks unless a maintenance print is done once a week?
    Have HP and other ink makers changed the formula of their inks so they dry up much faster, forcing people to buy new cartridges when the last ink cartridge is still at a 90% level with dried up ink?
    And as a result, are people on the HP 800 customer phone support line and on HP "Live Chat" telling people that they need to buy a new printer, when in actuallity their ink cartridges are just drying up within a new record short period of time?
    You tell me, HP experts.

  • Birthdays not showing up for birthdays after 1980

    I have came across a little app called 'Dates to iCal', which basically does what Apple seems incapable of - allowing you to set alerts for birthdays.
    Problem is, (whether I use either the Apple way or the 'Dates to iCal) if I try and sync my phone, it only copies over the birthdays of people born after 1980! Would this be a problem with my phone (Nokia 7370), or is it an iCal thing?
    Note I've tried deleting all events from years prior to 2007, doesn't help, the phone still seems concerned with when they were actually born for some reason.
    Thanks for any help.

    This is not an issue with iSync at all, or with your Mac OS X configuration: it is a Symbian issue. It does not affect all Nokia handsets - rather, it affects only those from Nokia—and others—which use the Symbian OS.
    The root of the issue lies with someone at Symbian who realized that a significant amount of space could be saved when storing agenda entries on devices like mobile handsets if an an alternative to the traditional TTime API was available.
    TTime stores values representing dates and times as the number of microseconds since midnight, January 1st, 0 AD on the Gregorian calendar. The alternative TUint16 API imposes a highly restricted date range: only values from January 1, 1980 through December 31, 2100 are stored, where each value is calculated in a similar manner from the start of the range. Great for one-time events within the range, but lousy for birthdays and similar recurring events, many instances of which clearly fall outside of it.
    So, along come those responsible for writing Symbian code for mobile handsets and many of them latch onto TUint16, or use library routines or programming samples created by others who did. Now, recurring or non-recurring events, outside of the January 1, 1980 through December 31, 2100 window cannot be handled properly by many [probably most] Symbian OS-based mobile handsets and smartphones. That's why you see this across a range of handsets from several manufacturers, but not all handsets from any one manufacturer are adversely affected. And, it's why you see some birthdays displayed but not others, because those displayed have a root record date for the recurring entries—or, in this case, a birth date—on or after January 1, 1980. Those not displayed have a first occurrence of the birthday prior to January 1, 1980.
    Because this issue involves the mobile OS and calendaring applications themselves, there is no workaround available to users hoping to display the disallowed dates. Only a rewrite of the calendar code for an affected mobile handset, or shifting to a non-Symbian OS device, would correct the problem.

  • A week after renting a movie, still getting message "An error occurred in downloading this content.  Try again later."  Have tried re-renting it, still the same. What next?

    A week after renting a movie, still getting message "An error occurred in downloading this content.  Try again later. Have tried re-renting. What next?

    Wales793Jul 27, 2014 12:31 PM Re: "An Error occurred while downloading content."
    Re: "An Error occurred while downloading content."in response to augiefritzmom
    I have been trying to fix this for 4 weeks , several visits to the apple store ... all irrelevant suggestions , was even told to buy an Apple TV ten 3 as it was an issue with HD steaming only supported on the new unit ...
    I do not go on these sites , but Apple are losing the plot these days  ...
    Here is what I found that fixed the issue for me ...
    1) go to Gen\network\DNS
    2) It will be set to Auto , for some reason the DNS is being set to you router , not your service provider ...
    3) I am with Charter (do a quick search charter DNS on the Web) , will give you their DNS ,
    Charter DNS Servers
    http://www.charter.com
    Primary DNS: 24.196.64.53
    Secondary DNS:
    View all United States of America DNS Servers
    4) Go to manaul and set the DNS to the service prover
    5) should be good to go ...
    Why we have to go to the level to solve this stuff I have no idea ..... hope it helps ....
    John

  • Hardware problems one week after warranty expires

    So for no identifiable reason, exactly a week after the one year anniversary of getting my iPhone 4 which I have taken very good care of, the home button starts giving problems (needs repeated presses to get it to work). I'm wondering if anyone else is seeing this? Seems very convenient timing for Apple...

    I used my original iphone for three years without issue. 
    Iphone 3gs for two years, now it is being used by my sister-in-law, still no issues ( almost three years from purchase)
    Iphone 4 for a year and a half with no issues.
    Ipod touch for 3 years, no issues.

Maybe you are looking for

  • Can I install Ora 8.0.5 client on a Win2000 workstation ?

    Hi, we have Oracle 8.0.5 installed on a Windows NT server. May I risk to start an Ora 8.0.5 client installation on my Windows 2000 workstation ? I mean is it compatible with win2000 ? If no, what is the solution ? Ora9i ? Thanks: Szilard

  • Best practice for managing recurring orders?

    I am setting up a recurring product for a customer.  I've tested the process through checkout and it initiates the recurring order fine. However, my client wants to have the following self-service features: 1. Notify customer if payment failed on rec

  • Does anyone find the password reset frustrating?

    Does anyone find that the constant update to the security password is not only a hassle but also has a negative impact on its customers. Today I lost my phone, so I went to icloud on my computer, and it said I needed to reset my password. I couldn't

  • Back ground job missing

    Hi Experts, I've scheduled some background jobs and they were running fine from last few months. Suddenly i'm not able to view anything in SM37 under my name. please suggest me Moderator message : Duplicate post locked. Edited by: Vinod Kumar on Nov

  • Change File Format For Existing Library Files? How?

    Lightroom v5.3: I'm a long time DNG file user for Pentax and Nikon cameras. I recently discovered that about 300 of my RAW Nikon files already imported into the Library are NEF files instead of DNG files as my other 5700 files are. I know that I made