TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date:
Thu, 22 Mar 2001 18:31:53 -0800
Reply-To:
Tom Moran <[log in to unmask]>
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
7bit
Content-Type:
text/plain; charset=us-ascii
Organization:
Decision Aids
From:
Tom Moran <[log in to unmask]>
Parts/Attachments:
text/plain (13 lines)
A single Time_Image routine that takes a bunch of formatting parameters
is quite nice because you can just declare your own, with your own
preferred parameters, as a renaming.  eg
  function RFC822_Date(Time : Ada.Calendar.Time
                       Date_Format : ... := ...
                       Date_Separator : Character := '/';
                       Day_Of_Week_Format : ... := ...
                       ... ) return String
   renames Time_Image;
and then
  Ada.Text_IO.Put_Line(RFC822_Date(Now));
* See smplsrvr on www.adapower.com for an example

ATOM RSS1 RSS2