Skip to content

Commit

Permalink
Update readme & publish 3.0.0+1
Browse files Browse the repository at this point in the history
  • Loading branch information
Pante committed May 15, 2023
1 parent 69f48d9 commit 93506ef
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
4 changes: 4 additions & 0 deletions sugar/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.0.0+1 (15/05/2023)

Update `README.md`

## 3.0.0 (14/05/2023)

This release is a complete rework of the library, capitalizing on the real-life experiences gained over the past 2 years.
Expand Down
17 changes: 12 additions & 5 deletions sugar/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ It consolidates several micro-packages that provide bits and pieces of date-time

## Why Sugar's date-time API over other packages?

* Sugar is able to detect the platform's timezone, `ZonedDateTime.now()`. Other packages such as `timezone` or even Dart's standard library don't. [`DateTime.timeZoneName`](https://api.dart.dev/stable/dart-core/DateTime/timeZoneName.html) returns an ambigious abbrevation that can refer to multiple timezones. See [List of timezone abbreviations](https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations).
* Sugar is able to detect the platform's timezone, `ZonedDateTime.now()`. Other packages such as `timezone` or even Dart's standard library don't.
[`DateTime.timeZoneName`](https://api.dart.dev/stable/dart-core/DateTime/timeZoneName.html) returns an ambiguous abbreviation that can refer to multiple timezones.
We provide a TZ database timezone identifier such as `Asia/Singapore`.
See [List of timezone abbreviations](https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations).

* Sugar is less hassle to set-up. You don't need to fiddle with assets or asynchronously initialize the package. Simply create a [`ZonedDateTime`](https://pub.dev/documentation/sugar/latest/sugar.time/sugar.time-library.html).
* Sugar is less hassle to set up. You don't need to fiddle with assets or asynchronously initialize the package.
Simply create a [`ZonedDateTime`](https://pub.dev/documentation/sugar/latest/sugar.time/sugar.time-library.html).

* Sugar has (in theory) zero initialization cost & a better memory footprint. Other packages often parse the timezone information from binary files at runtime. We rely on code generation to eliminate IO completely. Other packages often load the entire TZ database into memory. We rely on lazy initialization to load only timezones you use, reducing memory footprint.
* Sugar has (in theory) zero initialization cost & a better memory footprint. Other packages often parse the timezone information from binary files at runtime.
We rely on code generation to eliminate IO completely. Other packages often load the entire TZ database into memory.
We rely on lazy initialization to load only timezones you use, reducing memory footprint.

* Sugar handles DST transitions similary to other packages such as Java, Python & C#. Other packages such as `timezone` don't. This can be an issue when interacting between a back-end written in one of those languages and a front-end written in Dart.
* Sugar handles DST transitions similar to other packages such as Java, Python & C#. Other packages such as `timezone` don't.
This can be an issue when interacting between a back-end written in one of those languages and a front-end written in Dart.

* Sugar offers more than just `ZonedDateTime`. It offers classes such as `LocalTime` & `Period`, and utilities such as retrieving the ordinal week of the year.

Expand All @@ -37,7 +44,7 @@ dart pub add sugar
Alternatively, add Sugar as a dependency in your pubspec:
```yaml
dependencies:
sugar: ^ 3.0.0
sugar: ^3.0.0
```

Import the library:
Expand Down
2 changes: 1 addition & 1 deletion sugar/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: sugar
description: Forus Labs' standard library extension. Utilities for date-times, timezones, collections, monads & more.

version: 3.0.0
version: 3.0.0+1
homepage: https://github.com/forus-labs/cauldron
repository: https://github.com/forus-labs/cauldron
issue_tracker: https://github.com/forus-labs/cauldron/issues
Expand Down

0 comments on commit 93506ef

Please sign in to comment.