li6185377 / LKDBHelper-SQLite-ORM

全自动的插入,查询,更新,删除, an automatic database operation thread-safe and not afraid of recursive deadlock
MIT License
1.21k stars 288 forks source link

Update LKDBUtils.m #148

Closed WeMadeCode closed 4 years ago

WeMadeCode commented 4 years ago

This property is YES if the formatter generates the deprecated NSCalendarDate type, and is NO otherwise. You should use NSDate and NSCalendar rather than NSCalendarDate.

https://developer.apple.com/documentation/foundation/nsdateformatter/1411107-generatescalendardates?language=objc

WeMadeCode commented 4 years ago

大佬,帮忙看下这次提交,需要这次代码解决问题 @li6185377

li6185377 commented 4 years ago

可以用 自定义序列化的 方案

/** simple set a column as "LKSQL_Mapping_UserCalculate" column name /

/***

/***

li6185377 commented 4 years ago

我看下 加个变量,支持全局设置

WeMadeCode commented 4 years ago

为何 还在用 NSCalendarDate?,这不是被废弃了么? NSCalendarDate有个严重问题,转NSString会变成空字符。

li6185377 commented 4 years ago

没经过测试,不能直接改的,之前的所有项目都没发现问题

li6185377 commented 4 years ago

为何 还在用 NSCalendarDate?,这不是被废弃了么? NSCalendarDate有个严重问题,转NSString会变成空字符。

有相关代码可以发上来,我验证下

li6185377 commented 4 years ago

你可以用最新 2.5.5 的代码,修改对应属性

自己建个分类,实现对应API
// LKDateFormatter 创建完毕, 可以修改对应属性
+ (void)onCreateWithDateFormatter:(NSDateFormatter *)dateFormatter;
WeMadeCode commented 4 years ago

没经过测试,不能直接改的,之前的所有项目都没发现问题

能不能改?能先看下官方文档????