diff --git a/CHANGELOG.md b/CHANGELOG.md index 33d975a..b96a5a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/src/locale/nlLocale.dart b/lib/src/locale/nlLocale.dart index 12a7d7f..afe68a6 100644 --- a/lib/src/locale/nlLocale.dart +++ b/lib/src/locale/nlLocale.dart @@ -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 diff --git a/test/jiffy_relative_locale_test.dart b/test/jiffy_relative_locale_test.dart index af9cfc5..91fbd9a 100644 --- a/test/jiffy_relative_locale_test.dart +++ b/test/jiffy_relative_locale_test.dart @@ -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');