# Bear - Full Date Class

**URL:** <https://forum.kirupa.com/t/bear-full-date-class/181866>\
**Category:** Uncategorized\
**Created:** [March 13, 2006, 8:22pm UTC](https://forum.kirupa.com/t/bear-full-date-class/181866 "2006-03-13T20:22:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bear](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@bear](https://forum.kirupa.com/u/bear)\
**Post date:** [March 13, 2006, 8:22pm UTC](https://forum.kirupa.com/t/bear-full-date-class/181866/1 "2006-03-13T20:22:51Z")

</div>

Just something I’ll add on to.

It gives out the full date and the day of the week by name.

Michael, my script is up.

---

<div class="post-metadata">

**Author:** ![MichaelxxOA](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@MichaelxxOA](https://forum.kirupa.com/u/MichaelxxOA)\
**Post date:** [March 27, 2006, 12:07am UTC](https://forum.kirupa.com/t/bear-full-date-class/181866/2 "2006-03-27T00:07:22Z")

</div>

Added this method to the class…

```auto

 /**
     * Override of the getDate() method. Here we allow for you to specify whether to include the prefix.
     *
     * @usage
     * <code>
     * import createage.date.DateTime;
     * var date = new DateTime();
     * trace( date.getDate() ); // the date no suffix
     * trace( date.getDate(false) ); // the date no suffix
     * trace( date.getDate(true) ); // the date with it's proper suffix
     * </code>
     * @param Whether or not to return the date with it's suffix, eg: 1st, 2nd, 21st, 25th.
     * @return The day of the month for this DateTime object.
     */
    public function getDate( suffix:Boolean ) : Object
    {
       var date : Number = super.getDate();

       if (!suffix || suffix == undefined) return date;

       var suf : String = ""; 
       
       var sig_num : Number = ( (date/10) % 1 ) * 10;

       if ((sig_num >= 4 && sig_num <= 9) || sig_num == 0 || (date < 20 && date > 9))
       {
          suf = "th";
       } else if (sig_num == 1)
       {
          suf = "st";
       } else if (sig_num == 2)
       {
          suf = "nd";
       } else if (sig_num == 3)
       {
          suf = "rd";
       }

       return date+suf;
    }

```

Take Care.  
\_Michael

---

<div class="post-metadata">

**Author:** ![nathan99](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nathan99](https://forum.kirupa.com/u/nathan99)\
**Post date:** [March 27, 2006, 7:41am UTC](https://forum.kirupa.com/t/bear-full-date-class/181866/3 "2006-03-27T07:41:53Z")

</div>

I don’t get it. I see nothing Code wise or swf…?
