DateTime is string type.
I create datetime like "yyyy.MM.dd h:mm:ss a"
I want to show recent data is first.
When time changed 11pm, ordering didn't change.
Originally created by @oddukgi on GitHub (Aug 25, 2020).
I make variable
```swift
let fetchingItems = [ { (newDate) -> [DataType] in
return try! UserDataManager.dataStack.fetchAll(From<DataType>(UserDataManager.veggieConfiguration)
.where(format: "%K BEGINSWITH[c] %@",#keyPath(DataType.createdDate),newDate).orderBy(.descending(\.createdDate)))
},
{ (newDate) -> [DataType] in
return try! UserDataManager.dataStack.fetchAll(From<DataType>(UserDataManager.fruitsConfiguration)
.where(format: "%K BEGINSWITH[c] %@",#keyPath(DataType.createdDate),newDate).orderBy(.descending(\.createdDate)))
} ]
```
DateTime is string type.
I create datetime like "yyyy.MM.dd h:mm:ss a"
I want to show recent data is first.
When time changed 11pm, ordering didn't change.
I’m not sure if understand your issue, but fetchAll() returns an array, and the ordering would be fixed during fetch time.
If you want a list that changes ordering dynamically, use ListPublishers or ListMonitors
@JohnEstropia commented on GitHub (Aug 25, 2020):
I’m not sure if understand your issue, but `fetchAll()` returns an array, and the ordering would be fixed during fetch time.
If you want a list that changes ordering dynamically, use `ListPublisher`s or `ListMonitor`s
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @oddukgi on GitHub (Aug 25, 2020).
I make variable
DateTime is string type.
I create datetime like "yyyy.MM.dd h:mm:ss a"
I want to show recent data is first.
When time changed 11pm, ordering didn't change.
@JohnEstropia commented on GitHub (Aug 25, 2020):
I’m not sure if understand your issue, but
fetchAll()returns an array, and the ordering would be fixed during fetch time.If you want a list that changes ordering dynamically, use
ListPublishers orListMonitors@oddukgi commented on GitHub (Aug 25, 2020):
Ok. I will check ordering works fine at night time.
If didn't work, follow your advice. 🦊