diff --git a/lib/meilisearch.dart b/lib/meilisearch.dart index 3f07dca..05fc054 100644 --- a/lib/meilisearch.dart +++ b/lib/meilisearch.dart @@ -350,6 +350,7 @@ Future 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 updateNote(Note note) async { 'id': note.id, 'content': trimmedContent, 'date': note.epochTime, + 'dateISO': + DateTime.fromMillisecondsSinceEpoch( + note.epochTime, + ).toUtc().toIso8601String(), 'topLetter': mostFrequentLetter, 'topLetterFrequency': mostFrequentLetterRatio, };