do_time fix

From: nate (wintersn.geo@yahoo.com)
Date: 10/26/00


Okay, so maybe I have too much time on my hands, but I found the following
typo one day when I looked at the mud's time:

The 13rd Day of the Month of the Dark Shades, Year 300.

So I go check out the function do_time in act.informative.c:

  if ((day % 10) == 1)
    suf = "st";
  else if ((day % 10) == 2)
    suf = "nd";
  else if ((day % 10) == 3)
    suf = "rd";
  else
    suf = "th";

and changed it to:

  if ( (day == 1) || (day == 21) || (day == 31) )
    suf = "st";
  else if ( (day == 2) || (day == 22) || (day == 32) )
    suf = "nd";
  else if ( (day == 3) || (day == 23) || (day == 33) )
    suf = "rd";
  else
    suf = "th";

or:

  switch (day)
    {
    case 1:
    case 21:
    case 31:
      suf = "st";
      break;
    case 2:
    case 22:
    case 32:
      suf = "nd";
      break;
    case 3:
    case 23:
    case 33:
      suf = "rd";
      break;
    default:
      suf = "th";
    return;
    }

depending on your personal preference.


Rumble

Builders Academy of Cruel World
cruelworld.dune.net  Port: 9091

By the way the Builder's Academy is off to a great start and anyone
interested in learning (or have imm's who need to learn) OLC 2.0 w/dg
scripts please stop by.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT