Adblock breaks this site

Only read if you can convert from ALGEBRA!

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

  1. Uber Panda

    Uber Panda Member

    Joined:
    Oct 30, 2007
    Posts:
    67
    Referrals:
    0
    Sythe Gold:
    0
    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...;) )
     
  2. Nullware

    Nullware Guru

    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0
    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 >


 
 
Adblock breaks this site