ObjFW  Diff

Differences From Artifact [39d0390269]:

To Artifact [39834a73b3]:


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@class OFConstantString;

/**
 * \brief A class for storing, accessing and comparing dates.
 */
@interface OFDate: OFObject <OFCopying, OFComparing, OFSerialization>
{
	int64_t seconds;
	uint32_t microseconds;
}

/**
 * \brief Creates a new OFDate with the current date and time.
 *
 * \return A new, autoreleased OFDate with the current date and time
 */
+ date;

/**
 * \brief Creates a new OFDate with the specified date and time since
 *	  1970-01-01T00:00:00Z.
 *
 * \param seconds The seconds since 1970-01-01T00:00:00Z
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithTimeIntervalSince1970: (int64_t)seconds;

/**
 * \brief Creates a new OFDate with the specified date and time since
 *	  1970-01-01T00:00:00Z.
 *
 * \param seconds The seconds since 1970-01-01T00:00:00Z
 * \param microseconds The microsecond part of the time
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithTimeIntervalSince1970: (int64_t)seconds
		   microseconds: (uint32_t)microseconds;

/**
 * \brief Creates a new OFDate with the specified date and time since now.
 *
 * \param seconds The seconds since now
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithTimeIntervalSinceNow: (int64_t)seconds;

/**
 * \brief Creates a new OFDate with the specified date and time since now.
 *
 * \param seconds The seconds since now
 * \param microseconds The microsecond part of the time
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithTimeIntervalSinceNow: (int64_t)seconds
		  microseconds: (uint32_t)microseconds;

/**
 * \brief Creates a new OFDate with the specified string in the specified
 *	  format.
 *
 * The time zone used is UTC. If a time zone is specified anyway, an
 * OFInvalidFormatException is thrown. See +[dateWithLocalDateString:format:]







|
<
















|
<
<
<
<
<
<
<
<
<
<
<







|
<
<
<
<
<
<
<
<
<
<







21
22
23
24
25
26
27
28

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45











46
47
48
49
50
51
52
53










54
55
56
57
58
59
60
@class OFConstantString;

/**
 * \brief A class for storing, accessing and comparing dates.
 */
@interface OFDate: OFObject <OFCopying, OFComparing, OFSerialization>
{
	double seconds;

}

/**
 * \brief Creates a new OFDate with the current date and time.
 *
 * \return A new, autoreleased OFDate with the current date and time
 */
+ date;

/**
 * \brief Creates a new OFDate with the specified date and time since
 *	  1970-01-01T00:00:00Z.
 *
 * \param seconds The seconds since 1970-01-01T00:00:00Z
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithTimeIntervalSince1970: (double)seconds;












/**
 * \brief Creates a new OFDate with the specified date and time since now.
 *
 * \param seconds The seconds since now
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithTimeIntervalSinceNow: (double)seconds;











/**
 * \brief Creates a new OFDate with the specified string in the specified
 *	  format.
 *
 * The time zone used is UTC. If a time zone is specified anyway, an
 * OFInvalidFormatException is thrown. See +[dateWithLocalDateString:format:]
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
/**
 * \brief Initializes an already allocated OFDate with the specified date and
 *	  time since 1970-01-01T00:00:00Z.
 *
 * \param seconds The seconds since 1970-01-01T00:00:00Z
 * \return An initialized OFDate with the specified date and time
 */
- initWithTimeIntervalSince1970: (int64_t)seconds;

/**
 * \brief Initializes an already allocated OFDate with the specified date and
 *	  time since 1970-01-01T00:00:00Z.
 *
 * \param seconds The seconds since 1970-01-01T00:00:00Z
 * \param microseconds The microsecond part of the time
 * \return An initialized OFDate with the specified date and time
 */
- initWithTimeIntervalSince1970: (int64_t)seconds
		   microseconds: (uint32_t)microseconds;

/**
 * \brief Initializes an already allocated OFDate with the specified date and
 *	  time since now.
 *
 * \param seconds The seconds since now
 * \return An initialized OFDate with the specified date and time
 */
- initWithTimeIntervalSinceNow: (int64_t)seconds;

/**
 * \brief Initializes an already allocated OFDate with the specified date and
 *	  time since now.
 *
 * \param seconds The seconds since now
 * \param microseconds The microsecond part of the time
 * \return An initialized OFDate with the specified date and time
 */
- initWithTimeIntervalSinceNow: (int64_t)seconds
		  microseconds: (uint32_t)microseconds;

/**
 * \brief Initializes an already allocated OFDate with the specified string in
 *	  the specified format.
 *
 * The time zone used is UTC. If a time zone is specified anyway, an
 * OFInvalidFormatException is thrown. See -[initWithLocalDateString:format:]







|
<
<
<
<
<
<
<
<
<
<
<








|
<
<
<
<
<
<
<
<
<
<
<







105
106
107
108
109
110
111
112











113
114
115
116
117
118
119
120
121











122
123
124
125
126
127
128
/**
 * \brief Initializes an already allocated OFDate with the specified date and
 *	  time since 1970-01-01T00:00:00Z.
 *
 * \param seconds The seconds since 1970-01-01T00:00:00Z
 * \return An initialized OFDate with the specified date and time
 */
- initWithTimeIntervalSince1970: (double)seconds;












/**
 * \brief Initializes an already allocated OFDate with the specified date and
 *	  time since now.
 *
 * \param seconds The seconds since now
 * \return An initialized OFDate with the specified date and time
 */
- initWithTimeIntervalSinceNow: (double)seconds;












/**
 * \brief Initializes an already allocated OFDate with the specified string in
 *	  the specified format.
 *
 * The time zone used is UTC. If a time zone is specified anyway, an
 * OFInvalidFormatException is thrown. See -[initWithLocalDateString:format:]
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357

358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
- (OFDate*)laterDate: (OFDate*)otherDate;

/**
 * \brief Returns the seconds since 1970-01-01T00:00:00Z.
 *
 * \return The seconds since 1970-01-01T00:00:00Z
 */
- (int64_t)timeIntervalSince1970;

/**
 * \brief Returns the microseconds part of the seconds since
 *	  1970-01-01T00:00:00Z.
 *
 * \return The microseconds part of the seconds since 1970-01-01T00:00:00Z
 */
- (uint32_t)microsecondsOfTimeIntervalSince1970;

/**
 * \brief Returns the seconds the receiver is after the date.
 *

 * \return The seconds the receiver is after the date.
 */
- (int64_t)timeIntervalSinceDate: (OFDate*)otherDate;

/**
 * \brief Returns the microseconds part of the seconds the receiver is after the
 *	  date.
 *
 * \return The microseconds part of the seconds the receiver is after the date
 */
- (uint32_t)microsecondsOfTimeIntervalSinceDate: (OFDate*)otherDate;

/**
 * \brief Creates a new date with the specified time interval added.
 *
 * \param seconds The seconds after the date
 * \return A new, autoreleased OFDate
 */
- (OFDate*)dateByAddingTimeInterval: (int64_t)seconds;

/**
 * \brief Creates a new date with the specified time interval added.
 *
 * \param seconds The seconds after the date
 * \param microseconds The microseconds after the date
 * \return A new, autoreleased OFDate
 */
- (OFDate*)dateByAddingTimeInterval: (int64_t)seconds
		   withMicroseconds: (uint32_t)microseconds;
@end







|
<
<
<
<
<
<
<
<




>


|


|
<

|

|







|
<
<
<
<
<
<
<
<
<
<

294
295
296
297
298
299
300
301








302
303
304
305
306
307
308
309
310
311
312

313
314
315
316
317
318
319
320
321
322
323
324










325
- (OFDate*)laterDate: (OFDate*)otherDate;

/**
 * \brief Returns the seconds since 1970-01-01T00:00:00Z.
 *
 * \return The seconds since 1970-01-01T00:00:00Z
 */
- (double)timeIntervalSince1970;









/**
 * \brief Returns the seconds the receiver is after the date.
 *
 * \param date Date date to generate the difference with receiver
 * \return The seconds the receiver is after the date.
 */
- (double)timeIntervalSinceDate: (OFDate*)otherDate;

/**
 * \brief Returns the seconds the receiver is in the future.

 *
 * \return The seconds the receiver is in the future
 */
- (double)timeIntervalSinceNow;

/**
 * \brief Creates a new date with the specified time interval added.
 *
 * \param seconds The seconds after the date
 * \return A new, autoreleased OFDate
 */
- (OFDate*)dateByAddingTimeInterval: (double)seconds;










@end