Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iktakahiro/dart_iso_calendar
Dart package for calculating the year and week number based on ISO-8601.
https://github.com/iktakahiro/dart_iso_calendar
dart flutter flutter-package
Last synced: 11 days ago
JSON representation
Dart package for calculating the year and week number based on ISO-8601.
- Host: GitHub
- URL: https://github.com/iktakahiro/dart_iso_calendar
- Owner: iktakahiro
- License: bsd-3-clause
- Created: 2021-01-28T14:13:57.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-19T03:40:38.000Z (over 3 years ago)
- Last Synced: 2024-08-23T22:59:01.759Z (2 months ago)
- Topics: dart, flutter, flutter-package
- Language: Dart
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# iso_calendar
![Run flutter test](https://github.com/iktakahiro/dart_iso_calendar/workflows/Run%20flutter%20test/badge.svg?branch=main)
Dart package for calculating the year and week number based on ISO-8601.
## Getting Started
Add a dependency in your pubspec.yaml:
```yaml
dependencies:
iso_calendar: ^1.0.0
```Create an instance of IsoCalendar using `.fromDateTime()`:
```dart
import 'package:iso_calendar/iso_calendar.dart';void main() {
final isoCalendar = IsoCalendar.fromDateTime(DateTime(2021, 1, 1));
print(isoCalendar.year); // 2020
print(isoCalendar.weekNumber); // 52
}
```