root/Trunk/AIUtilities.framework/Versions/A/Headers/AIDateAdditions.h @ 2

Revision 2, 1.6 KB (checked in by jon, 16 years ago)

Initial commit of skeletal project.

Line 
1//
2//  AIDateAdditions.h
3//  AIUtilities.framework
4//
5//  Created by Peter Hosey on 2007-11-12.
6//  Copyright 2007 Adium Team. All rights reserved.
7//
8
9@interface NSDate (AIDateAdditions)
10
11/*!     @brief  Converts an NSTimeInterval, which is a number of seconds, to the largest units possible.
12 *
13 *      @par    If the interval is positive, the result numbers will be positive. If the interval is negative, the result numbers will be negative.
14 *
15 *      @par    The results will be returned by reference. You can pass \c NULL to refuse any result.
16 *
17 *      @param  interval        The number to convert. This must be in seconds.
18 *      @param  outWeeks        If non-\c NULL, the \c int at this address will be set to the number of weeks covered by the interval, rounded down.
19 *      @param  outDays If non-\c NULL, the \c int at this address will be set to the number of days covered by the interval, rounded down.
20 *      @param  outHours        If non-\c NULL, the \c int at this address will be set to the number of hours covered by the interval, rounded down.
21 *      @param  outMinutes      If non-\c NULL, the \c int at this address will be set to the number of minutes covered by the interval, rounded down.
22 *      @param  outSeconds      If non-\c NULL, the \c NSTimeInterval at this address will be set to the number of seconds covered by the interval.
23 */
24+ (void) convertTimeInterval:(NSTimeInterval)interval
25                    toWeeks:(out int *)outWeeks
26                       days:(out int *)outDays
27                      hours:(out int *)outHours
28                    minutes:(out int *)outMinutes
29                    seconds:(out NSTimeInterval *)outSeconds;
30
31@end
Note: See TracBrowser for help on using the browser.