easter 1.0.0+2

  • Readme
  • Changelog
  • Example
  • Installing
  • 70

Build Status

easter #

Small Dart package that calculates the date of Easter from 1583 to 4099.

Usage #

Calling the getEaster() method with a year as parameter returns a DateTime object with year, month and day properties set for Easter Sunday of the specified year. The time part of the DateTime object is not set.

import 'package:easter/easter.dart';

var easter = getEaster(2019);
print(easter); // 2019-04-21 00:00:00.000

v1.0.0+2

  • Added error handling.

v1.0.0

  • Initial release.

example/easter_example.dart

import 'package:easter/easter.dart';

void main() {
  var easter = getEaster(2019);
  print(easter);
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  easter: ^1.0.0+2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:easter/easter.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
39
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
70
Learn more about scoring.

We analyzed this package on Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:easter/easter.dart.

Health suggestions

Format lib/easter.dart.

Run dartfmt to format lib/easter.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
test >=1.6.1 <2.0.0