From fae2c5823eaf95a1409f27f188a47e92163abf0b Mon Sep 17 00:00:00 2001 From: Hans Kokx Date: Mon, 7 Oct 2024 13:39:12 +0200 Subject: [PATCH] Updated README Signed-off-by: Hans Kokx --- README.md | 17 +++++++++++++++++ pubspec.yaml | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a160a3..8461253 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,7 @@ These are broken down into the following categories: - Start and end of period calculations - Comparison operations - Period information operations +- "Yesterday" and "tomorrow" getters #### Start and End of Period Calculations @@ -235,6 +236,22 @@ The following operations are now available on a `DateTime` object: final DateTime sunday = today.firstDayOfWeek; // Sunday ``` +#### "Yesterday" and "tomorrow" getters + +- `yesterday`: returns a new `DateTime` object for the previous start of day. + + ```dart + final DateTime now = DateTime.now(); // 2024-10-07 13:37:48.274 + final DateTime yesterday = DateTime(0).yesterday; // 2024-10-06 00:00:00.000 + ``` + +- `tomorrow`: returns a new `DateTime` object for tomorrow's start of day. + + ```dart + final DateTime now = DateTime.now(); // 2024-10-07 13:37:48.274 + final DateTime tomorrow = DateTime(0).tomorrow; // 2024-10-08 00:00:00.000 + ``` + ### JWT Parsing These extensions enhance the `String` class with JWT-specific functionalities, diff --git a/pubspec.yaml b/pubspec.yaml index 59d2dee..7becf5a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: arcane_helper_utils description: Provides a variety of helpful utilities and extensions for Flutter and Dart. -version: 1.0.4 +version: 1.0.4+1 repository: https://github.com/hanskokx/arcane_helper_utils issue_tracker: https://github.com/hanskokx/arcane_helper_utils/issues