

/* This file defines functions for converting
   monthly incomes to weekly and vice versa.
*/


var WEEKS_IN_MONTH = 4.3452380952380949;
// Used by the monthly/weekly 
// conversion functions below. The number is
// 365/(7*12).


/* Argument: real.
   Result:   real.
   This function converts its argument,
   assumed to be a monthly income, to
   a weekly one (smaller).
*/ 
function monthlyToWeekly( m )
{
  return m / WEEKS_IN_MONTH;
}


/* Argument: real.
   Result:   real.
   This function converts its argument,
   assumed to be a weekly income, to
   a monthly one (bigger).
*/ 
function weeklyToMonthly( w )
{
  return w * WEEKS_IN_MONTH;
}
