[go: up one dir, main page]

File: HourFormatter.m

package info (click to toggle)
agenda.app 0.36-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 504 kB
  • ctags: 53
  • sloc: objc: 4,979; makefile: 57
file content (25 lines) | stat: -rw-r--r-- 629 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* emacs buffer mode hint -*- objc -*- */

#import "HourFormatter.h"

@implementation HourFormatter

- (NSString *)stringForObjectValue:(id)anObject
{
  if (![anObject isKindOfClass:[NSNumber class]])
    return nil;
  int m = ([anObject floatValue] - [anObject intValue]) * 100;
  return [NSString stringWithFormat:@"%dh%02d", [anObject intValue], 60 * m / 100];
}

- (BOOL)getObjectValue:(id *)anObject forString:(NSString *)string errorDescription:(NSString **)error
{
  return NO;
}

- (NSAttributedString *)attributedStringForObjectValue:(id)anObject withDefaultAttributes:(NSDictionary *)attributes
{
  return nil;
}

@end