To all

I think some of you might be interested in the following script, which
prints date and time in standard American long format. I would appreciate
comments and suggestions.

Jerry

{ date  returns the current date and time in pretty American format    }
date: function [][t a d m]
[
   t: now/time
   a: t/1
   if a > 12 [t: t - 12:00:00 t: join t " PM"]
   if a = 12 [t: join t " PM"]
   if a = 0  [t: t + 12:00:00 t: join t " AM"]
   d: join pick ['Monday 'Tuesday 'Wednesday 'Thursday 'Friday
                 'Saturday 'Sunday] now/weekday ","
   m: pick ['January 'February 'March 'April 'May 'June 'July 'August
            'September 'October 'November 'December] now/month
   Print [d m join now/day "," join now/year "," t]
   exit
]

Reply via email to