mirror of
https://github.com/leanote/leanote-ios.git
synced 2025-10-14 15:11:00 +00:00
dateStr
This commit is contained in:
@@ -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:@","];
|
||||||
|
@@ -35,4 +35,5 @@
|
|||||||
+ (BOOL)isiOSVersionEarlierThan8;
|
+ (BOOL)isiOSVersionEarlierThan8;
|
||||||
|
|
||||||
+ (NSDate *)goDate:(NSString *)dateStr;
|
+ (NSDate *)goDate:(NSString *)dateStr;
|
||||||
|
+ (NSString *)dateStr:(NSDate *)date;
|
||||||
@end
|
@end
|
||||||
|
@@ -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
|
||||||
|
Reference in New Issue
Block a user