Add ISO dates to search so we can query by them
This commit is contained in:
@@ -350,6 +350,7 @@ Future<Note> createNote(String content) async {
|
||||
final document = {
|
||||
'id': generateRandomString(32),
|
||||
'date': DateTime.now().toUtc().millisecondsSinceEpoch,
|
||||
'dateISO': DateTime.now().toUtc().toIso8601String(),
|
||||
'content': content,
|
||||
'topLetter': mostFrequentLetter,
|
||||
'topLetterFrequency': mostFrequentLetterCount,
|
||||
@@ -433,6 +434,10 @@ Future<void> updateNote(Note note) async {
|
||||
'id': note.id,
|
||||
'content': trimmedContent,
|
||||
'date': note.epochTime,
|
||||
'dateISO':
|
||||
DateTime.fromMillisecondsSinceEpoch(
|
||||
note.epochTime,
|
||||
).toUtc().toIso8601String(),
|
||||
'topLetter': mostFrequentLetter,
|
||||
'topLetterFrequency': mostFrequentLetterRatio,
|
||||
};
|
||||
|
Reference in New Issue
Block a user