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,
@"IsBlog": note.isBlog, //
// FileDatas: note.FileDatas,
@"Tags[0]": @""
@"Tags[0]": @"",
@"UpdatedTime": [Common dateStr:note.updatedTime]
}];
//
NSArray *tags = [note.tags componentsSeparatedByString:@","];
@@ -245,7 +246,7 @@
[params setObject:eachTag forKey:[NSString stringWithFormat:@"Tags[%d]", i]];
i++;
}
//
if(![Common isNullOrNil:files]) {
int i = 0;
@@ -263,7 +264,6 @@
}
}
if([note.isContentDirty boolValue]) {
params[@"Content"] = content;
}
@@ -310,6 +310,8 @@
// FileDatas: note.FileDatas,
@"Tags[0]": @"",
@"Content": content,
@"CreatedTime": [Common dateStr:note.createdTime],
@"UpdatedTime": [Common dateStr:note.updatedTime]
}];
//
NSArray *tags = [note.tags componentsSeparatedByString:@","];

View File

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

View File

@@ -223,4 +223,15 @@
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