~ubuntu-branches/ubuntu/karmic/gnustep-base/karmic

« back to all changes in this revision

Viewing changes to Source/NSDateFormatter.m

  • Committer: Bazaar Package Importer
  • Author(s): Eric Heintzmann
  • Date: 2005-04-17 00:14:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050417001438-enf0y07c9tku85z1
Tags: 1.10.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
22
22
 
23
23
   <title>NSDateFormatter class reference</title>
24
 
   $Date: 2001/12/18 16:54:14 $ $Revision: 1.8 $
 
24
   $Date: 2004/09/14 03:34:37 $ $Revision: 1.10 $
25
25
   */
26
26
 
27
 
#include <config.h>
28
 
#include <Foundation/NSDate.h>
29
 
#include <Foundation/NSCalendarDate.h>
30
 
#include <Foundation/NSTimeZone.h>
31
 
#include <Foundation/NSFormatter.h>
32
 
#include <Foundation/NSDateFormatter.h>
33
 
#include <Foundation/NSString.h>
34
 
#include <Foundation/NSCoder.h>
 
27
#include "config.h"
 
28
#include "Foundation/NSDate.h"
 
29
#include "Foundation/NSCalendarDate.h"
 
30
#include "Foundation/NSTimeZone.h"
 
31
#include "Foundation/NSFormatter.h"
 
32
#include "Foundation/NSDateFormatter.h"
 
33
#include "Foundation/NSString.h"
 
34
#include "Foundation/NSCoder.h"
35
35
 
36
36
@implementation NSDateFormatter
37
37
 
90
90
        }
91
91
      if (d == nil)
92
92
        {
93
 
          *error = @"Couldn't convert to date";
 
93
          if (error)
 
94
            {
 
95
              *error = @"Couldn't convert to date";
 
96
            }
94
97
          return NO;
95
98
        }
96
99
    }
97
 
  *anObject = d;
 
100
  if (anObject)
 
101
    {
 
102
      *anObject = d;
 
103
    }
98
104
  return YES;
99
105
}
100
106
 
116
122
             newEditingString: (NSString**)newString
117
123
             errorDescription: (NSString**)error
118
124
{
119
 
  *newString = nil;
120
 
  *error = nil;
 
125
  if (newString)
 
126
    {
 
127
      *newString = nil;
 
128
    }
 
129
  if (error)
 
130
    {
 
131
      *error = nil;
 
132
    }
121
133
  return YES;
122
134
}
123
135