ObjFW  Diff

Differences From Artifact [1702b03e5a]:

To Artifact [09915d0305]:


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
83
84
85
86
87
88


89
90
91
92
93
94
95
96
97

98
99
100
101
102
103
104
105
106

107
108
109
110
111
112
113
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
83
84
85
86


87
88
89
90
91
92
93
94
95
96

97
98
99
100
101
102
103
104
105

106
107
108
109
110
111
112
113







-
+








-
+







-
+

















-
-
+
+














-
-
+
+








-
+








-
+







}

/**
 * \brief Creates a new OFDate with the current date and time.
 *
 * \return A new, autoreleased OFDate with the current date and time
 */
+ date;
+ (instancetype)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;
+ (instancetype)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;
+ (instancetype)dateWithTimeIntervalSinceNow: (double)seconds;

/**
 * \brief Creates a new OFDate with the specified string in the specified
 *	  format.
 *
 * The time zone used is UTC. See +[dateWithLocalDateString:format:] if you
 * want local time.
 *
 * See the manpage for strftime for information on the format.
 *
 * \warning The format is currently limited to the following format specifiers:
 *	    %%d, %%e, %%H, %%m, %%M, %%S, %%y, %%Y, %%, %%n and %%t.
 *
 * \param string The string describing the date
 * \param format The format of the string describing the date
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithDateString: (OFString*)string
	      format: (OFString*)format;
+ (instancetype)dateWithDateString: (OFString*)string
			    format: (OFString*)format;

/**
 * \brief Creates a new OFDate with the specified string in the specified
 *	  format.
 *
 * See the manpage for strftime for information on the format.
 *
 * \warning The format is currently limited to the following format specifiers:
 *	    %%d, %%e, %%H, %%m, %%M, %%S, %%y, %%Y, %%, %%n and %%t.
 *
 * \param string The string describing the date
 * \param format The format of the string describing the date
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithLocalDateString: (OFString*)string
		   format: (OFString*)format;
+ (instancetype)dateWithLocalDateString: (OFString*)string
				 format: (OFString*)format;

/**
 * \brief Returns a date in the distant future.
 *
 * The date is system-dependant.
 *
 * \return A date in the distant future
 */
+ distantFuture;
+ (instancetype)distantFuture;

/**
 * \brief Returns a date in the distant past.
 *
 * The date is system-dependant.
 *
 * \return A date in the distant past
 */
+ distantPast;
+ (instancetype)distantPast;

/**
 * \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