javascript/akan.js
// formula for determining which day of the week you were born
formula for determining which day of the week you were born
formula for determining which day of the week you were born
function calculateDayValue(){
  year = document.getElementById("year").value;
  CC = parseInt(year.substring(0,2));
  YY = parseInt(year.substring(2,4));
  MM = parseInt(document.getElementById("month").value);
  DD = parseInt(document.getElementById("date").value);
  d = ( ( (CC/4) -2*CC-1) + ( (5*YY/4) ) + ((26*(MM+1)/10) ) + DD)%7;
  console.log(d);
  return (Math.floor(d));
}
function calculateDayValue ( ) { year = document . getElementById ( "year" ) . value ; CC = parseInt ( year . substring ( 0 , 2 ) ) ; YY = parseInt ( year . substring ( 2 , 4 ) ) ; MM = parseInt ( document . getElementById ( "month" ) . value ) ; DD = parseInt ( document . getElementById ( "date" ) . value ) ; d = ( ( ( CC / 4 ) - 2 * CC - 1 ) + ( ( 5 * YY / 4 ) ) + ( ( 26 * ( MM + 1 ) / 10 ) ) + DD ) % 7 ; console . log ( d ) ; return ( Math . floor ( d ) ) ; }
formula for determining which day of the week you were born
formula for determining which day of the week you were born