@@ -21,46 +21,46 @@ /** * \brief A class for storing, accessing and comparing dates. */ @interface OFDate: OFObject { - int64_t sec; - uint32_t usec; + int64_t seconds; + uint32_t microseconds; } /** * \return A new, autoreleased OFDate with the current date and time */ + date; /** - * \param sec The seconds since 1970-01-01T00:00:00Z - * \return A new, autoreleased OFDate with the specified date and time - */ -+ dateWithTimeIntervalSince1970: (int64_t)sec; - -/** - * \param sec The seconds since 1970-01-01T00:00:00Z - * \param usec The microsecond part of the time - * \return A new, autoreleased OFDate with the specified date and time - */ -+ dateWithTimeIntervalSince1970: (int64_t)sec - microseconds: (uint32_t)usec; - -/** - * \param sec The seconds since now - * \return A new, autoreleased OFDate with the specified date and time - */ -+ dateWithTimeIntervalSinceNow: (int64_t)sec; - -/** - * \param sec The seconds since now - * \param usec The microsecond part of the time - * \return A new, autoreleased OFDate with the specified date and time - */ -+ dateWithTimeIntervalSinceNow: (int64_t)sec - microseconds: (uint32_t)usec; + * \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; + +/** + * \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; + +/** + * \param seconds The seconds since now + * \return A new, autoreleased OFDate with the specified date and time + */ ++ dateWithTimeIntervalSinceNow: (int64_t)seconds; + +/** + * \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; /** * Returns a date in the distant future. The date is system-dependant. * * \return A date in the distant future @@ -75,51 +75,50 @@ + distantPast; /** * Initializes an already allocated OFDate with the specified date and time. * - * \param sec The seconds since 1970-01-01T00:00:00Z - * \return An initialized OFDate with the specified date and time - */ -- initWithTimeIntervalSince1970: (int64_t)sec; - -/** - * Initializes an already allocated OFDate with the specified date and time. - * - * \param sec The seconds since 1970-01-01T00:00:00Z - * \param usec The microsecond part of the time - * \return An initialized OFDate with the specified date and time - */ -- initWithTimeIntervalSince1970: (int64_t)sec - microseconds: (uint32_t)usec; - -/** - * Initializes an already allocated OFDate with the specified date and time. - * - * \param sec The seconds since now - * \param usec The microsecond part of the time - * \return A new, autoreleased OFDate with the specified date and time - */ -- initWithTimeIntervalSinceNow: (int64_t)sec; - -/** - * Initializes an already allocated OFDate with the specified date and time. - * - * \param sec The seconds since now - * \param usec The microsecond part of the time - * \return A new, autoreleased OFDate with the specified date and time - */ -- initWithTimeIntervalSinceNow: (int64_t)sec - microseconds: (uint32_t)usec; + * \param seconds The seconds since 1970-01-01T00:00:00Z + * \return An initialized OFDate with the specified date and time + */ +- initWithTimeIntervalSince1970: (int64_t)seconds; + +/** + * Initializes an already allocated OFDate with the specified date and time. + * + * \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; + +/** + * Initializes an already allocated OFDate with the specified date and time. + * + * \param seconds The seconds since now + * \return A new, autoreleased OFDate with the specified date and time + */ +- initWithTimeIntervalSinceNow: (int64_t)seconds; + +/** + * Initializes an already allocated OFDate with the specified date and time. + * + * \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 + */ +- initWithTimeIntervalSinceNow: (int64_t)seconds + microseconds: (uint32_t)microseconds; /** * \return The microsecond of the date */ - (uint32_t)microsecond; /** - * \return The seconds of the date + * \return The second of the date */ - (uint8_t)second; /** * \return The minute of the date @@ -203,17 +202,17 @@ /** * \param date Another date * \return The earlier date of the two dates */ -- (OFDate*)earlierDate: (OFDate*)date; +- (OFDate*)earlierDate: (OFDate*)otherDate; /** * \param date Another date * \return The later date of the two dates */ -- (OFDate*)laterDate: (OFDate*)date; +- (OFDate*)laterDate: (OFDate*)otherDate; /** * \return The seconds since 1970-01-01T00:00:00Z */ - (int64_t)timeIntervalSince1970; @@ -224,30 +223,30 @@ - (uint32_t)microsecondsOfTimeIntervalSince1970; /** * \return The seconds the receiver is after the date. */ -- (int64_t)timeIntervalSinceDate: (OFDate*)date; +- (int64_t)timeIntervalSinceDate: (OFDate*)otherDate; /** * \return The microseconds part of the seconds the receiver is after the date */ -- (uint32_t)microsecondsOfTimeIntervalSinceDate: (OFDate*)date; +- (uint32_t)microsecondsOfTimeIntervalSinceDate: (OFDate*)otherDate; /** * Returns a new date with the specified time interval added. * - * \param sec The seconds after the date + * \param seconds The seconds after the date * \return A new, autoreleased OFDate */ -- (OFDate*)dateByAddingTimeInterval: (int64_t)sec; +- (OFDate*)dateByAddingTimeInterval: (int64_t)seconds; /** * Returns a new date with the specified time interval added. * - * \param sec The seconds after the date - * \param usec The microseconds after the date + * \param seconds The seconds after the date + * \param microseconds The microseconds after the date * \return A new, autoreleased OFDate */ -- (OFDate*)dateByAddingTimeInterval: (int64_t)sec - withMicroseconds: (uint32_t)usec; +- (OFDate*)dateByAddingTimeInterval: (int64_t)seconds + withMicroseconds: (uint32_t)microseconds; @end