DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Calendar help

  1. #1
    Join Date
    Mar 2007
    Posts
    18

    Calendar help

    I am currently trying to do a calendar program that I am having trouble with the algorithm mine is as follows

    day = ((year - 1752) + (year / 4) - (year / 100) + (year / 400)) % 7;

    I have it working with the dates that I have labeled I am just haveing trouble with these last 2 I am supposed to test it with the following

    1. 1753 (Monday) works
    2. 1800 (Wednesday) works
    3. 1801 (Thursday) works
    4. 1852 (Thursday)
    5. 1853 (Saturday) works
    6. 2000 (Saturday)
    7. 2001 (Monday) works
    Last edited by emohs; 09-17-2007 at 10:23 PM.

  2. #2
    Join Date
    Jan 2005
    Location
    UK
    Posts
    604
    DKyb
    -------------------------------
    Life is a short warm moment -
    Death is the long cold rest.
    Pink Floyd
    -------------------------------

Similar Threads

  1. Calendar: Scheduling Meetings DB
    By vik02 in forum Database
    Replies: 0
    Last Post: 05-09-2007, 02:44 PM
  2. convert String to Calendar
    By Force Flow in forum Java
    Replies: 4
    Last Post: 06-29-2006, 01:01 PM
  3. Problems with viewing calendar
    By Torwald in forum Java
    Replies: 2
    Last Post: 03-18-2006, 03:29 PM
  4. Replies: 4
    Last Post: 06-30-2005, 03:43 PM
  5. Hai how to Display text in a Calendar Control
    By itchock in forum VB Classic
    Replies: 0
    Last Post: 06-26-2005, 08:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center