Skip to content

Commit

Permalink
bumped to version 1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhil-merito committed Jun 18, 2023
1 parent d8181a2 commit f984599
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Changelog

## 1.2.4

- **Change**: Added support for `Persian` (fa) locale.
- **Fix**: All known bugs and issues fixed.

## 1.2.3

- **Change**: `intl` version updated.
- **Change**: Removed unnecessary dependencies.
- **Fix**: All known bugs and issues fixed.

Expand Down
1 change: 0 additions & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ linter:
- prefer_conditional_assignment
- prefer_const_constructors
- prefer_contains
- prefer_equal_for_default_values
- prefer_final_fields
- prefer_generic_function_type_aliases
- prefer_initializing_formals
Expand Down
17 changes: 10 additions & 7 deletions lib/src/_get_time_ago.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ class GetTimeAgo {
static void setDefaultLocale(String locale) {
assert(
_messageMap.containsKey(locale),
'[locale] must be a valid locale',
_messageMap.containsKey(locale),
'[locale] must be a valid locale',
);
_defaultLocale = locale;
}
Expand All @@ -69,8 +69,10 @@ class GetTimeAgo {
/// [Messages] interface with the desired messages
///
static void setCustomLocaleMessages(String customLocale,
Messages customMessages,) {
static void setCustomLocaleMessages(
String customLocale,
Messages customMessages,
) {
_messageMap[customLocale] = customMessages;
}

Expand All @@ -79,7 +81,8 @@ class GetTimeAgo {
/// - If [locale] is passed will look for message for that locale.
/// - If [pattern] is passed will be used as the DateFormat pattern.
static String parse(DateTime dateTime, {
static String parse(
DateTime dateTime, {
String? locale,
String? pattern,
}) {
Expand All @@ -89,8 +92,8 @@ class GetTimeAgo {
final date = DateFormat(_pattern).format(dateTime);
var _currentClock = DateTime.now();
var elapsed =
(_currentClock.millisecondsSinceEpoch - dateTime.millisecondsSinceEpoch)
.abs();
(_currentClock.millisecondsSinceEpoch - dateTime.millisecondsSinceEpoch)
.abs();

var _prefix = _message.prefixAgo();
var _suffix = _message.suffixAgo();
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: get_time_ago
description: A Flutter package to convert and format `DateTime` object into `get_time_ago` format to get String like `10 seconds ago`, `a minute ago`, `7 hours ago`, etc.
version: 1.2.3
version: 1.2.4
homepage: https://github.com/nixrajput
repository: https://github.com/nixrajput/get-time-ago
issue_tracker: https://github.com/nixrajput/get-time-ago/issues
Expand Down

0 comments on commit f984599

Please sign in to comment.