/*
   Given a numerical date string like '-12345/5/20', this function
   returns the full formal date string like 'BC 12345-May-20-Sat',
   which also includes the day of the week according to the
   (JorG) calendar mode.

   ERRORS:
   Return FALSE on invalid date error.

   DEPENDENCIES:
   Is_Valid_Date()
   JD_Num()
   Inv_JD_Num()
*/
   function Num_Date_to_Full_Date ($sYmmdd, $JorG='G')
{
// Error if invalid date.
   if (!Is_Valid_Date($sYmmdd, $JorG))  {return FALSE;}

// Return the full formal date string corresponding
// to the given numerical date string argument.
   $JDNum = JD_Num($sYmmdd, $JorG);

// Return date string according to return mode.
   return Inv_JD_Num($JDNum, $JorG, 2);

}