

function today_string() {
	// dependant on date functions defined in mi-utilities.js
	var today = new Date();
	return today.getDayString()+', '+today.getMonthString()+' '+today.getDate()+', '+today.getFullYear();
}



// date functions **************************************************************

Date.prototype.getDayString = function(){
  var day = '';
  switch (this.getDay()) {
    case 0:
      return 'Sunday';
    case 1:
      return 'Monday';
    case 2:
      return 'Tuesday';
    case 3:
      return 'Wednesday';
    case 4:
      return 'Thursday';
    case 5:
      return 'Friday';
    case 6:
      return 'Saturday';
  }
}
Date.prototype.getMonthString = function(full){
  var day = '';
  switch (this.getMonth()) {
    case 0:
      return (full)?'January':'January';
    case 1:
      return (full)?'February':'February';
    case 2:
      return (full)?'March':'March';
    case 3:
      return (full)?'April':'April';
    case 4:
      return 'May';
    case 5:
      return (full)?'June':'June';
    case 6:
      return (full)?'July':'July';
    case 7:
      return (full)?'August':'August';
    case 8:
      return (full)?'September':'September';
    case 9:
      return (full)?'October':'October';
    case 10:
      return (full)?'November':'November';
    case 11:
      return (full)?'December':'December';
  }
}
Date.prototype.spanishDay = function(){
  var day = '';
  switch (this.getDay()) {
    case 0:
      return 'domingo';
    case 1:
      return 'lunes';
    case 2:
      return 'martes';
    case 3:
      return 'mi&eacute;rcoles';
    case 4:
      return 'jueves';
    case 5:
      return 'viernes';
    case 6:
      return 's&aacute;bado';
  }
}
Date.prototype.spanishMonth = function(full){
  var day = '';
  switch (this.getMonth()) {
    case 0:
      return (full)?'enero':'ene';
    case 1:
      return (full)?'febrero':'feb';
    case 2:
      return (full)?'marzo':'mar';
    case 3:
      return (full)?'abril':'abr';
    case 4:
      return (full)?'mayo':'may';
    case 5:
      return (full)?'junio':'jun';
    case 6:
      return (full)?'julio':'jul';
    case 7:
      return (full)?'augusto':'aug';
    case 8:
      return (full)?'septiembre':'sep';
    case 9:
      return (full)?'octubre':'oct';
    case 10:
      return (full)?'noviembre':'nov';
    case 11:
      return (full)?'deciembre':'dec';
  }
}
// end date functions **********************************************************

