Skip to content

Commit

Permalink
Update change log
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Dec 18, 2021
1 parent 62480bc commit 2efff30
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## 5.0.0

### Major Changes

1. Updated `Jiffy.unix()` to be more specific to seconds and milliseconds timestamps

Previously
```dart
// Parsing a timestamp in milliseconds
Jiffy.unix(1318781876406);
// Parsing a timestamp in seconds
Jiffy.unix(1318781876).format(); // 2011-10-16T19:17:56.000
```
Now
```dart
// Parsing a timestamp in milliseconds
Jiffy.unixFromMillisecondsSinceEpoch(1318781876406);
// Parsing a timestamp in seconds
Jiffy.unixFromSecondsSinceEpoch(1318781876).format(); // 2011-10-16T19:17:56.000
```

2. Added Ukranian `uk` locale contributed by [yarmat](https://github.com/yarmat)
3. Added Dutch `nl` locale contributed by [diegonuja](https://github.com/diegonuja)
4. Added Thailand `th` locale contributed by [srithong](https://github.com/srithong)
5. Minor bug fixes from [calvintam236](https://github.com/calvintam236)

## 4.1.0

### Minor Changes
Expand Down
5 changes: 2 additions & 3 deletions lib/src/locale/nlLocale.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ class NlRelativeTime extends RelativeTime {
@override
String prefixAgo() => '';
@override
String prefixFromNow() => '';
String prefixFromNow() => 'over';
@override
String suffixAgo() => 'geleden';
@override
String suffixFromNow() => '';
@override
String lessThanOneMinute(int seconds) =>
seconds > 0 ? 'op dit moment' : 'een ogenblik';
String lessThanOneMinute(int seconds) => 'een paar seconden';
@override
String aboutAMinute(int minutes) => 'een minuut';
@override
Expand Down
4 changes: 2 additions & 2 deletions test/jiffy_relative_locale_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,8 @@ void main() {
'test Jiffy.locale() method with parsing nl locale should return correct date time in nl locale',
() async {
var locale = await Jiffy.locale('nl');
expect(jiffy1.fromNow(), 'een ogenblik geleden');
expect(jiffy2.fromNow(), 'op dit moment');
expect(jiffy1.fromNow(), 'een paar seconden geleden');
expect(jiffy2.fromNow(), 'over een paar seconden');
expect(jiffy3.fromNow(), 'een minuut geleden');
expect(jiffy5.fromNow(), '10 minuten geleden');
expect(jiffy6.fromNow(), 'een uur geleden');
Expand Down

0 comments on commit 2efff30

Please sign in to comment.