This commit is contained in:
life
2015-11-28 21:37:12 +08:00
parent 7db67107e4
commit 81ae6a4752
3 changed files with 17 additions and 3 deletions

View File

@@ -233,7 +233,8 @@
@"IsTrash": note.isTrash, @"IsTrash": note.isTrash,
@"IsBlog": note.isBlog, // @"IsBlog": note.isBlog, //
// FileDatas: note.FileDatas, // FileDatas: note.FileDatas,
@"Tags[0]": @"" @"Tags[0]": @"",
@"UpdatedTime": [Common dateStr:note.updatedTime]
}]; }];
// //
NSArray *tags = [note.tags componentsSeparatedByString:@","]; NSArray *tags = [note.tags componentsSeparatedByString:@","];
@@ -263,7 +264,6 @@
} }
} }
if([note.isContentDirty boolValue]) { if([note.isContentDirty boolValue]) {
params[@"Content"] = content; params[@"Content"] = content;
} }
@@ -310,6 +310,8 @@
// FileDatas: note.FileDatas, // FileDatas: note.FileDatas,
@"Tags[0]": @"", @"Tags[0]": @"",
@"Content": content, @"Content": content,
@"CreatedTime": [Common dateStr:note.createdTime],
@"UpdatedTime": [Common dateStr:note.updatedTime]
}]; }];
// //
NSArray *tags = [note.tags componentsSeparatedByString:@","]; NSArray *tags = [note.tags componentsSeparatedByString:@","];

View File

@@ -35,4 +35,5 @@
+ (BOOL)isiOSVersionEarlierThan8; + (BOOL)isiOSVersionEarlierThan8;
+ (NSDate *)goDate:(NSString *)dateStr; + (NSDate *)goDate:(NSString *)dateStr;
+ (NSString *)dateStr:(NSDate *)date;
@end @end

View File

@@ -223,4 +223,15 @@
return date; return date;
} }
// 2012-12-32 12:03:30
+ (NSString *)dateStr:(NSDate *)date
{
if ([self isNullOrNil:date]) {
date =[NSDate date];
}
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
return [dateFormatter stringFromDate:date];
}
@end @end