skylib_fluffos_v3/
skylib_fluffos_v3/bin/
skylib_fluffos_v3/bin/db/
skylib_fluffos_v3/fluffos-2.9-ds2.04/
skylib_fluffos_v3/fluffos-2.9-ds2.04/ChangeLog.old/
skylib_fluffos_v3/fluffos-2.9-ds2.04/Win32/
skylib_fluffos_v3/fluffos-2.9-ds2.04/compat/
skylib_fluffos_v3/fluffos-2.9-ds2.04/compat/simuls/
skylib_fluffos_v3/fluffos-2.9-ds2.04/include/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/clone/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/command/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/data/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/etc/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/include/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/inherit/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/inherit/master/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/log/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/tests/compiler/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/tests/efuns/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/single/tests/operators/
skylib_fluffos_v3/fluffos-2.9-ds2.04/testsuite/u/
skylib_fluffos_v3/fluffos-2.9-ds2.04/tmp/
skylib_fluffos_v3/fluffos-2.9-ds2.04/windows/
skylib_fluffos_v3/mudlib/
skylib_fluffos_v3/mudlib/cmds/
skylib_fluffos_v3/mudlib/cmds/admin/
skylib_fluffos_v3/mudlib/cmds/guild-race/
skylib_fluffos_v3/mudlib/cmds/living/broken/
skylib_fluffos_v3/mudlib/cmds/player/group_cmds/
skylib_fluffos_v3/mudlib/cmds/playtester/
skylib_fluffos_v3/mudlib/d/admin/
skylib_fluffos_v3/mudlib/d/admin/room/
skylib_fluffos_v3/mudlib/d/admin/room/we_care/
skylib_fluffos_v3/mudlib/d/admin/save/
skylib_fluffos_v3/mudlib/d/admin/text/
skylib_fluffos_v3/mudlib/d/learning/TinyTown/buildings/
skylib_fluffos_v3/mudlib/d/learning/TinyTown/map/
skylib_fluffos_v3/mudlib/d/learning/TinyTown/roads/
skylib_fluffos_v3/mudlib/d/learning/chars/
skylib_fluffos_v3/mudlib/d/learning/functions/
skylib_fluffos_v3/mudlib/d/learning/handlers/
skylib_fluffos_v3/mudlib/d/learning/help_topics/
skylib_fluffos_v3/mudlib/d/learning/help_topics/npcs/
skylib_fluffos_v3/mudlib/d/learning/help_topics/objects/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rcs_demo/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rcs_demo/RCS/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rooms/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rooms/crowd/
skylib_fluffos_v3/mudlib/d/learning/help_topics/rooms/situations/
skylib_fluffos_v3/mudlib/d/learning/save/
skylib_fluffos_v3/mudlib/d/learning/school/
skylib_fluffos_v3/mudlib/d/learning/school/add_sc/
skylib_fluffos_v3/mudlib/d/learning/school/characters/
skylib_fluffos_v3/mudlib/d/learning/school/general/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/basic_commands/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/edtutor/
skylib_fluffos_v3/mudlib/d/learning/school/getting-started/unix_tutor/
skylib_fluffos_v3/mudlib/d/learning/school/items/
skylib_fluffos_v3/mudlib/d/learning/school/npc_school/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/room_basic/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/situations/
skylib_fluffos_v3/mudlib/d/learning/school/room_school/terrain_tutor/
skylib_fluffos_v3/mudlib/d/learning/text/
skylib_fluffos_v3/mudlib/d/liaison/
skylib_fluffos_v3/mudlib/d/mudlib/
skylib_fluffos_v3/mudlib/d/mudlib/changes/
skylib_fluffos_v3/mudlib/d/playtesters/
skylib_fluffos_v3/mudlib/d/playtesters/effects/
skylib_fluffos_v3/mudlib/d/playtesters/handlers/
skylib_fluffos_v3/mudlib/d/playtesters/items/
skylib_fluffos_v3/mudlib/d/sage/
skylib_fluffos_v3/mudlib/doc/
skylib_fluffos_v3/mudlib/doc/creator/
skylib_fluffos_v3/mudlib/doc/driver/
skylib_fluffos_v3/mudlib/doc/driver/efuns/arrays/
skylib_fluffos_v3/mudlib/doc/driver/efuns/buffers/
skylib_fluffos_v3/mudlib/doc/driver/efuns/calls/
skylib_fluffos_v3/mudlib/doc/driver/efuns/compile/
skylib_fluffos_v3/mudlib/doc/driver/efuns/filesystem/
skylib_fluffos_v3/mudlib/doc/driver/efuns/floats/
skylib_fluffos_v3/mudlib/doc/driver/efuns/functions/
skylib_fluffos_v3/mudlib/doc/driver/efuns/general/
skylib_fluffos_v3/mudlib/doc/driver/efuns/mappings/
skylib_fluffos_v3/mudlib/doc/driver/efuns/mixed/
skylib_fluffos_v3/mudlib/doc/driver/efuns/mudlib/
skylib_fluffos_v3/mudlib/doc/driver/efuns/numbers/
skylib_fluffos_v3/mudlib/doc/driver/efuns/parsing/
skylib_fluffos_v3/mudlib/doc/login/
skylib_fluffos_v3/mudlib/doc/lpc/basic_manual/
skylib_fluffos_v3/mudlib/doc/lpc/intermediate/
skylib_fluffos_v3/mudlib/doc/new/add_command/
skylib_fluffos_v3/mudlib/doc/new/events/
skylib_fluffos_v3/mudlib/doc/new/handlers/
skylib_fluffos_v3/mudlib/doc/new/living/race/
skylib_fluffos_v3/mudlib/doc/new/living/spells/
skylib_fluffos_v3/mudlib/doc/new/object/
skylib_fluffos_v3/mudlib/doc/new/player/
skylib_fluffos_v3/mudlib/doc/new/room/guild/
skylib_fluffos_v3/mudlib/doc/new/room/outside/
skylib_fluffos_v3/mudlib/doc/new/room/storeroom/
skylib_fluffos_v3/mudlib/doc/object/
skylib_fluffos_v3/mudlib/doc/playtesters/
skylib_fluffos_v3/mudlib/doc/policy/
skylib_fluffos_v3/mudlib/doc/weapons/
skylib_fluffos_v3/mudlib/global/
skylib_fluffos_v3/mudlib/global/creator/
skylib_fluffos_v3/mudlib/handlers/
skylib_fluffos_v3/mudlib/include/casino/
skylib_fluffos_v3/mudlib/include/cmds/
skylib_fluffos_v3/mudlib/include/effects/
skylib_fluffos_v3/mudlib/include/npc/
skylib_fluffos_v3/mudlib/include/room/
skylib_fluffos_v3/mudlib/include/shops/
skylib_fluffos_v3/mudlib/net/daemon/
skylib_fluffos_v3/mudlib/net/daemon/chars/
skylib_fluffos_v3/mudlib/net/inherit/
skylib_fluffos_v3/mudlib/net/obj/
skylib_fluffos_v3/mudlib/net/obj/BACKUPS/
skylib_fluffos_v3/mudlib/obj/amulets/
skylib_fluffos_v3/mudlib/obj/armours/plate/
skylib_fluffos_v3/mudlib/obj/b_day/
skylib_fluffos_v3/mudlib/obj/clothes/transport/horse/
skylib_fluffos_v3/mudlib/obj/faith/symbols/
skylib_fluffos_v3/mudlib/obj/fungi/
skylib_fluffos_v3/mudlib/obj/gatherables/
skylib_fluffos_v3/mudlib/obj/instruments/
skylib_fluffos_v3/mudlib/obj/media/
skylib_fluffos_v3/mudlib/obj/misc/player_shop/
skylib_fluffos_v3/mudlib/obj/monster/godmother/
skylib_fluffos_v3/mudlib/obj/monster/transport/
skylib_fluffos_v3/mudlib/obj/rings/
skylib_fluffos_v3/mudlib/obj/scabbards/
skylib_fluffos_v3/mudlib/obj/spells/
skylib_fluffos_v3/mudlib/obj/stationery/
skylib_fluffos_v3/mudlib/obj/stationery/envelopes/
skylib_fluffos_v3/mudlib/obj/toys/
skylib_fluffos_v3/mudlib/obj/vessels/
skylib_fluffos_v3/mudlib/obj/weapons/axes/
skylib_fluffos_v3/mudlib/obj/weapons/chains/
skylib_fluffos_v3/mudlib/obj/weapons/maces/BACKUPS/
skylib_fluffos_v3/mudlib/save/autodoc/
skylib_fluffos_v3/mudlib/save/book_handler/
skylib_fluffos_v3/mudlib/save/books/history/calarien/
skylib_fluffos_v3/mudlib/save/mail/
skylib_fluffos_v3/mudlib/save/new_soul/data/
skylib_fluffos_v3/mudlib/save/parcels/
skylib_fluffos_v3/mudlib/save/playerinfo/
skylib_fluffos_v3/mudlib/save/players/d/
skylib_fluffos_v3/mudlib/save/players/s/
skylib_fluffos_v3/mudlib/save/random_names/
skylib_fluffos_v3/mudlib/save/random_names/data/
skylib_fluffos_v3/mudlib/save/terrains/
skylib_fluffos_v3/mudlib/save/terrains/tutorial_desert/
skylib_fluffos_v3/mudlib/save/terrains/tutorial_grassy_field/
skylib_fluffos_v3/mudlib/save/terrains/tutorial_mountain/
skylib_fluffos_v3/mudlib/save/todo_lists/
skylib_fluffos_v3/mudlib/secure/
skylib_fluffos_v3/mudlib/secure/cmds/admin/
skylib_fluffos_v3/mudlib/secure/cmds/lord/
skylib_fluffos_v3/mudlib/secure/config/
skylib_fluffos_v3/mudlib/secure/handlers/autodoc/
skylib_fluffos_v3/mudlib/secure/handlers/intermud/
skylib_fluffos_v3/mudlib/secure/include/global/
skylib_fluffos_v3/mudlib/secure/save/
skylib_fluffos_v3/mudlib/secure/save/handlers/
skylib_fluffos_v3/mudlib/secure/std/
skylib_fluffos_v3/mudlib/secure/std/classes/
skylib_fluffos_v3/mudlib/secure/std/modules/
skylib_fluffos_v3/mudlib/std/creator/
skylib_fluffos_v3/mudlib/std/dom/
skylib_fluffos_v3/mudlib/std/effects/
skylib_fluffos_v3/mudlib/std/effects/external/
skylib_fluffos_v3/mudlib/std/effects/fighting/
skylib_fluffos_v3/mudlib/std/effects/magic/
skylib_fluffos_v3/mudlib/std/effects/magic/BACKUPS/
skylib_fluffos_v3/mudlib/std/effects/other/BACKUPS/
skylib_fluffos_v3/mudlib/std/effects/priest/
skylib_fluffos_v3/mudlib/std/effects/room/
skylib_fluffos_v3/mudlib/std/environ/
skylib_fluffos_v3/mudlib/std/guilds/
skylib_fluffos_v3/mudlib/std/guilds/old/
skylib_fluffos_v3/mudlib/std/languages/
skylib_fluffos_v3/mudlib/std/liquids/
skylib_fluffos_v3/mudlib/std/npc/
skylib_fluffos_v3/mudlib/std/npc/goals/
skylib_fluffos_v3/mudlib/std/npc/goals/basic/
skylib_fluffos_v3/mudlib/std/npc/goals/misc/
skylib_fluffos_v3/mudlib/std/npc/plans/
skylib_fluffos_v3/mudlib/std/npc/plans/basic/
skylib_fluffos_v3/mudlib/std/npc/types/
skylib_fluffos_v3/mudlib/std/npc/types/helper/
skylib_fluffos_v3/mudlib/std/npcs/
skylib_fluffos_v3/mudlib/std/outsides/
skylib_fluffos_v3/mudlib/std/races/shadows/
skylib_fluffos_v3/mudlib/std/room/basic/BACKUPS/
skylib_fluffos_v3/mudlib/std/room/basic/topography/
skylib_fluffos_v3/mudlib/std/room/controller/
skylib_fluffos_v3/mudlib/std/room/inherit/topography/
skylib_fluffos_v3/mudlib/std/room/topography/area/
skylib_fluffos_v3/mudlib/std/room/topography/iroom/
skylib_fluffos_v3/mudlib/std/room/topography/milestone/
skylib_fluffos_v3/mudlib/std/shadows/curses/
skylib_fluffos_v3/mudlib/std/shadows/disease/
skylib_fluffos_v3/mudlib/std/shadows/fighting/
skylib_fluffos_v3/mudlib/std/shadows/healing/
skylib_fluffos_v3/mudlib/std/shadows/magic/
skylib_fluffos_v3/mudlib/std/shadows/poison/
skylib_fluffos_v3/mudlib/std/shadows/room/
skylib_fluffos_v3/mudlib/std/shops/controllers/
skylib_fluffos_v3/mudlib/std/shops/objs/
skylib_fluffos_v3/mudlib/std/shops/player_shop/
skylib_fluffos_v3/mudlib/std/socket/
skylib_fluffos_v3/mudlib/std/soul/d/
skylib_fluffos_v3/mudlib/std/soul/e/
skylib_fluffos_v3/mudlib/std/soul/i/
skylib_fluffos_v3/mudlib/std/soul/j/
skylib_fluffos_v3/mudlib/std/soul/k/
skylib_fluffos_v3/mudlib/std/soul/l/
skylib_fluffos_v3/mudlib/std/soul/n/
skylib_fluffos_v3/mudlib/std/soul/o/
skylib_fluffos_v3/mudlib/std/soul/q/
skylib_fluffos_v3/mudlib/std/soul/r/
skylib_fluffos_v3/mudlib/std/soul/u/
skylib_fluffos_v3/mudlib/std/soul/v/
skylib_fluffos_v3/mudlib/std/soul/y/
skylib_fluffos_v3/mudlib/std/soul/z/
skylib_fluffos_v3/mudlib/std/stationery/
skylib_fluffos_v3/mudlib/w/
skylib_fluffos_v3/mudlib/w/default/
skylib_fluffos_v3/mudlib/w/default/armour/
skylib_fluffos_v3/mudlib/w/default/clothes/
skylib_fluffos_v3/mudlib/w/default/item/
skylib_fluffos_v3/mudlib/w/default/npc/
skylib_fluffos_v3/mudlib/w/default/room/
skylib_fluffos_v3/mudlib/w/default/weapon/
skylib_fluffos_v3/mudlib/www/
skylib_fluffos_v3/mudlib/www/java/
skylib_fluffos_v3/mudlib/www/secure/
skylib_fluffos_v3/mudlib/www/secure/lpc/advanced/
skylib_fluffos_v3/mudlib/www/secure/lpc/intermediate/
skylib_fluffos_v3/win32/
/**
 * This handler contains all the stuff needed to handle and deal with
 * mud times.  It contains functions to get names for all the months
 * from indexes and to return a nice string from an input array of
 * values.
 * <p>
 * Some of this code is from Deutha's original amtime() simul_efun and
 * some from the am_time_array() efun which Macchirton wrote, although the
 * latter has mostly been rewritten.
 * @author Pinkfish
 * @changed Dediscified, Sandoz, 2002.
 */

#include <time.h>

int *query_time_array(int number);
string query_hour_minute(int hour, int minute);
string query_day_of_week(int day_of_week);
string query_special_day(int month, int day_of_month);
string query_month(int month);
int query_hour(int time);
int query_minute(int time);

/**
 * This method takes an array generated from time_array() as an input
 * to create the return string.
 * @param arr the array to turn into a string
 * @param flag if the flag is set to 1, then the year will be returned as well,
 * if 2 then hours and minutes will be ignored, in addition to returning the year
 * @return the nice time string
 */
string query_time_from_array( int *arr, int flag ) {
   string special, ret;

   special = query_special_day( arr[TIME_MONTH], arr[TIME_DAY_OF_MONTH] );

   if( flag != 2 )
       ret = query_hour_minute( arr[TIME_HOUR], arr[TIME_MINUTE]) + ", ";
   else
       ret = "";

   ret += ( special ? special : query_day_of_week(arr[TIME_DAY_OF_WEEK])+" "+
                                ordinal(arr[TIME_DAY_OF_MONTH])+" "+
                                query_month(arr[TIME_MONTH]) );
   if( flag )
       ret += ", "+arr[TIME_YEAR]+"AS";

   return ret;

} /* query_time_from_array() */

/**
 * This method returns the time for the input time number.
 * This function takes the same input as the efun ctime().
 * You pass in the time number and it returns a string
 * detailing the in-mud time.
 * @param number the time number
 * @return a string containing the time
 */
varargs string query_time( int number, int flag ) {
   return query_time_from_array( query_time_array(number), flag );
} /* query_time() */

/**
 * This method returns the hour/minute as a string.  It adds the am/pm
 * bits to the number.
 * @param hour the hour of the day
 * @param minute the minute of the hour
 * @return the hour/minute string
 */
string query_hour_minute(int hour, int minute) {
   int print_hour, half_day;

   half_day = HOURS_PER_DAY / 2;
   print_hour = hour % half_day;

   if( print_hour == 0 )
       print_hour = 12;

   return sprintf("%d:%02d%s", print_hour, minute,
                             ( hour >= half_day ? "PM" : "AM" ) );

} /* query_hour_minute() */

/**
 * This method returns the string of the day of the week.
 * @param day_of_week the day of the week
 */
string query_day_of_week( int day_of_week ) {
   switch( day_of_week ) {
     case TIME_FRIDAY :
       return "Friday";
     case TIME_SATURDAY :
       return "Saturday";
     case TIME_SUNDAY :
       return "Sunday";
     case TIME_MONDAY :
       return "Monday";
     case TIME_TUESDAY :
       return "Tuesday";
     case TIME_WEDNESSDAY :
       return "Wednesday";
     case TIME_THURSDAY :
       return "Thursday";
     default :
       return "Error!  Unknown day of week " + day_of_week;
   }
} /* query_day_of_week() */

/**
 * This method returns the day of month as a string.
 * This uses both the month and the day of the month
 * to get the correct strings for special days.
 * @param month the month to print out
 * @param day_of_month the day in the specific month
 */
string query_special_day(int month, int day_of_month) {

   /* Handle special days */
//   switch (month) {
//     case TIME_JANUARY :
//       switch (day_of_month) {
//         case 1 :  return "Hogswatchday";
//       }
//     break;
//     case TIME_JULY :
//       switch (day_of_month) {
//         case 16 : return "Small Gods Day";
//       }
//     break;
//     case TIME_AUGUST :
//       switch (day_of_month) {
//          case 22 : return "Soul Cake Tuesday";
//       }
//     break;
//     case TIME_OCTOBER :
//       switch (day_of_month) {
//         case 1 : return "Sektober Fools' Day";
//       }
//     break;
//   }

   return 0;

} /* query_day_of_month() */

/**
 * This method returns the month passed in as a string.
 * @param month the month to return
 * @return the month as a string
 */
string query_month( int month ) {
   switch( month ) {
     case TIME_JANUARY :
       return "January";
     case TIME_FEBURARY :
       return "February";
     case TIME_MARCH :
       return "March";
     case TIME_APRIL :
       return "April";
     case TIME_MAY :
       return "May";
     case TIME_JUNE :
       return "June";
     case TIME_JULY :
       return "July";
     case TIME_AUGUST :
       return "August";
     case TIME_SEPTEMBER :
       return "September";
     case TIME_OCTOBER :
       return "October";
     case TIME_NOVEMBER :
       return "November";
     case TIME_DECEMBER :
       return "December";
     default :
       return "Error! Month " + month + " is out of range.";
   }
} /* query_month() */

/**
 * This is a simple way to get a helpful array of values
 * for the time in the mud.  Useful in functions you want
 * to act differently for different days, months, etc.
 * It returns a five element array as described below.
 * The return values are similar to those used with
 * localtime().
 * <p>
 * The input parameter to this function should be the return
 * result from a time() system call.
 * <dl>
 *   <dt>1st element, a number for "year" :
 *   <dt>2nd element, a number for "month" :
 *     <dd> 1 = January
 *     <dd> 2 = February
 *     <dd> 3 = March
 *     <dd> 4 = April
 *     <dd> 5 = May
 *     <dd> 6 = June
 *     <dd> 7 = July (incl. Small gods day)
 *     <dd> 8 = August (incl. Soul cake tuesday)
 *     <dd> 9 = September
 *     <dd>10 = October
 *     <dd>11 = November
 *     <dd>12 = December
 *   <dt>3rd element, Day of month.
 *   <dt>4th element. Day of week.
 *     <dd>1 = Monday
 *     <dd>2 = Tuesday
 *     <dd>3 = Wednesday
 *     <dd>4 = Thursday
 *     <dd>5 = Friday
 *     <dd>6 = Saturday
 *     <dd>7 = Sunday
 *   <dt>5th element, hour, from 0 to 23 (military time).
 *   <dt>6th element, minute,
 *  </dl>
 * ie:
 * <pre> ({ year, month, day_of_month, day_of_week, hour, minute }) </pre><p>
 *  This provides the same information as mudtime() in a manner easier to code from.
 *
 * @param  number the time you want to create the array for
 * @return   returns the 5 element time array
 * @example
 * // Here's an example of part of the code for a
 * // room that looks different on Wednesdays.
 *
 *   inherit ROOM_OBJ;
 *
 *   #include <time.h>
 *
 *   string query_the_long();
 *
 *   void setup(){
 *      ...
 *     // Setup a function pointer for the long description.
 *     // This is so it can change dynamically
 *     set_long( (: query_the_long() :));
 *      ...
 *   } /\* setup() *\/
 *
 *   // This method returns the dynamically changing long
 *   // for the room.  It says something different every
 *   // Wednesday
 *   string query_the_long() {
 *       int *time_array;
 *
 *       time_array = TIME_H->query_time_array(time());
 *       if( time_array[TIME_WEEK_DAY] == TIME_WEDNESSDAY )
 *           return "A festival is in full swing, in honour "
 *                  "of the Great Coder MacChirton here, "
 *                  "with much haggis and bagpipes.\n";
 *
 *       return "This town is rather boring, and the streets "
 *              "are abandoned.\n";
 *   } /\* query_the_long() *\/
 * @see efun::time()
 * @see efun::localtime()
 * @see amtime()
 * @see /include/time.h
 */
int *query_time_array( int number ) {
   int year, month, hour, minute, day_of_week, day_of_year, day_of_month;

   year = number / SECONDS_PER_YEAR + YEAR_OFFSET;
   number %= SECONDS_PER_YEAR;
   day_of_year = number / SECONDS_PER_DAY;
   day_of_month = day_of_year;

   /* Figure out what month we are in */
   for( month = 0; month < DAYS_PER_YEAR / DAYS_PER_MONTH; month++ ) {
      if( day_of_month < DAYS_PER_MONTH )
          break;
      day_of_month -= DAYS_PER_MONTH;
   }

   /* Need to increment the month by one to make it start from 1. */
   month++;
   day_of_month++;

   /*
    * day % DAYS_PER_WEEK is not translated into
    * day of week as one would suspect.
    * when day % DAYS_PER_WEEK = 0,  the day is friday.
    * The +4 is used to correct this, and the +1 is so that
    * the first day (monday) is 1, not 0
    */
   day_of_week = ( ( ( day_of_year + 4 ) % DAYS_PER_WEEK ) + 1 );

   number = number / SECONDS_PER_MINUTE;
   hour = ( ( ( number) % MINUTES_PER_DAY) / MINUTES_PER_HOUR );
   minute = number % MINUTES_PER_HOUR;

   return ({ year, month, day_of_month, day_of_week, hour, minute });

} /* query_time_array() */

/**
 * This method returns the hour of the day in the mud.
 * @param time time to convert ( as would be returned by time() )
 * @return the hour of the day in mud in 24 hour clock
 * @see time
 * @see query_minute
 * @see query_time_array
 */
int query_hour( int time ) {
  return ( time % SECONDS_PER_DAY ) / (SECONDS_PER_MINUTE * MINUTES_PER_HOUR);
} /* query_hour() */

/**
 * This method returns the minute of the day in the mud.
 * @param time time to convert ( as would be returned by time() )
 * @return the minutes passed since midnight in the mud
 * @see time
 * @see query_hour
 * @see query_time_array
 */
int query_minute( int time ) {
  return ( time % SECONDS_PER_DAY ) / SECONDS_PER_MINUTE;
} /* query_minute() */

/**
 * This method returns the year in the mud.
 * @param time time to convert ( as would be returned by time() )
 * @return the year
 * @see time
 * @see query_hour
 * @see query_time_array
 */
int query_year( int time ) {
  return time / SECONDS_PER_YEAR + YEAR_OFFSET;
} /* query_year() */