home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Source / MiscMergeKit / _MiscMergeDateCommand.m < prev    next >
Encoding:
Text File  |  1995-07-08  |  1.3 KB  |  46 lines

  1. //
  2. //    _MiscMergeDateCommand.m -- "date" merge command implementation
  3. //        Written by Don Yacktman Copyright (c) 1995 by Don Yacktman.
  4. //                Version 1.0.  All rights reserved.
  5. //        This notice may not be removed from this source code.
  6. //
  7. //    This object is included in the MiscKit by permission from the author
  8. //    and its use is governed by the MiscKit license, found in the file
  9. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  10. //    for a list of all applicable permissions and restrictions.
  11. //    
  12.  
  13. #import <misckit/miscmerge.h>
  14. #import "_MiscMergeDateCommand.h"
  15.  
  16. @implementation _MiscMergeDateCommand
  17.  
  18. // ***** This should be localized
  19. static char *monthString[12] = {
  20.         "January", "February", "March",
  21.         "April", "May", "June",
  22.         "July", "August", "September",
  23.         "October", "November", "December" };
  24.  
  25. - parseFromString:(MiscString *)aString
  26. {
  27.     return self;
  28. }
  29.  
  30.  
  31. - executeForMerge:(MiscMergeEngine *)aMerger
  32. { // ***** need to deal with other format strings
  33.     MiscString *tempString = [MiscString new];
  34.     MiscTime *theTime = [[MiscTime alloc] initWithCurrentTime];
  35.     [tempString setFromFormat:"%s %d, %d", monthString[[theTime month]],
  36.             ([theTime day] + 1), [theTime year]];
  37.     [aMerger appendToOutput:tempString];
  38.     [tempString free];
  39.     [theTime free];
  40.     return self;
  41. }
  42.  
  43. @end
  44.  
  45.  
  46.