Only read if you can convert from ALGEBRA!

Discussion in 'Programming General' started by Uber Panda, Nov 28, 2007.

Only read if you can convert from ALGEBRA!
  1. Unread #1 - Nov 28, 2007 at 12:29 PM
  2. Uber Panda
    Joined:
    Oct 30, 2007
    Posts:
    67
    Referrals:
    0
    Sythe Gold:
    0

    Uber Panda Member

    Only read if you can convert from ALGEBRA!

    I'm trying to use this formula for a calendar application. Can anyone help?


    (date+y+[31m/12]+[y/4]-[y/100]+[y/400])MOD7

    M = Month
    Date = Date (this is obvious)
    Y = Year
    MOD7 = Divide stuff in () by 7 and only pay attention to the remainder.

    eg. 15 MOD2 = 5

    (answer is 7.5 but we only pay attention to the remainder...;) )
     
  3. Unread #2 - Nov 28, 2007 at 1:57 PM
  4. Nullware
    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0

    Nullware Guru

    Only read if you can convert from ALGEBRA!

    Here's what you want but you're going to have to make it more complex to account for months that have 30 days and of course February also which has even less days.
    Code:
    Private Sub Command1_Click()
    m = 11
    d = 28
    y = 2007
    MsgBox ((d + y + (31 * m / 12) + (y / 4) - (y / 100) + (y / 400)) Mod 7)
    End Sub
    
     
< Can someone make me a simple bot to.. | Need help on rs hack n app finder >

Users viewing this thread
1 guest


 
 
Adblock breaks this site