Contact Details
No response
What happened?
Expected behaviour
When providing a date in the future, there should be an indication, that the date is in the future (e.g. "in 20 seconds")
Actual behaviour
When providing a date in the future, the absolute value of the time difference is used, resulting in an incorrect representation, that always talks about the time being in the past
Steps to reproduce
- Run this code:
DateTime futureTime = DateTime.now().add(const Duration(seconds: 20));
String futureTimeString = GetTimeAgo.parse(futureTime);
print('Future time string: $futureTimeString');
- See the output:
I/flutter (17717): Future time string: 19 seconds ago
Technical Details
- extend
Messages with a prefixFromNow() and `suffixFromNow()
- in
_get_time_ago.dart use either *FromNow() or *Ago() depending on whether dateTime is after now or not.
Version
^2.3.2
What devices are you seeing the problem on?
Android, iPhone, Windows, Mac, Linux
OS
Android 12
Relevant log output
Code of Conduct
Contact Details
No response
What happened?
Expected behaviour
When providing a date in the future, there should be an indication, that the date is in the future (e.g. "in 20 seconds")
Actual behaviour
When providing a date in the future, the absolute value of the time difference is used, resulting in an incorrect representation, that always talks about the time being in the past
Steps to reproduce
I/flutter (17717): Future time string: 19 seconds agoTechnical Details
Messageswith aprefixFromNow()and `suffixFromNow()_get_time_ago.dartuse either*FromNow()or*Ago()depending on whetherdateTimeis after now or not.Version
^2.3.2
What devices are you seeing the problem on?
Android, iPhone, Windows, Mac, Linux
OS
Android 12
Relevant log output
Code of Conduct