home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / LOCFMT.CPP < prev    next >
Text File  |  1997-07-05  |  518b  |  28 lines

  1. // +++Date last modified: 05-Jul-1997
  2.  
  3. //
  4. // locfmt.cpp
  5. // Date/time (combined) format
  6. //
  7. // written by David Nugent
  8. //
  9. // This code is public domain. Use for any purpose is unrestricted.
  10. //
  11.  
  12. # include "loctm.h"
  13. # include STRSTREAM_H
  14.  
  15. ostream &
  16. loc_tm::print (ostream & os, int df, int tf) const
  17. {
  18.     ostrstream pTmp;
  19.     printDate (pTmp, df);
  20.     pTmp << ' ';
  21.     printTime (pTmp, tf);
  22.     pTmp << ends;
  23.  
  24.     char const * p = pTmp.str();
  25.     pTmp.rdbuf()->freeze(0);
  26.     return os << p;
  27. }
  28.