Skip to content

Commit

Permalink
added migration guide file
Browse files Browse the repository at this point in the history
  • Loading branch information
z3bi committed May 2, 2019
1 parent e60b6ba commit 6533f55
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
19 changes: 19 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Upgrading from 1.0.1 to 2.0.0
Upgrading to 2.0.0 introduces breaking API changes.

JavaScript `Date` and `Number` prototypes are no longer patched by this library.
The library should now be pure without any side effects.

This means you can no longer depend on methods like `formattedTime` being directly accessible on the Date instance. For example,

**Before**:

```js
prayerTimes.fajr.formattedTime(); // no longer works
```

**After**:

```js
adhan.Date.formattedTime(prayerTimes.fajr); // works
```
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ and then require the module
var adhan = require('adhan')
```

Read [migration guide from version 1.x](MIGRATION.md)


## Usage

Migrating from version 1.x? Read the [migration guide](MIGRATION.md)

To get prayer times initialize a new `PrayerTimes` object passing in coordinates,
date, and calculation parameters.

Expand Down

0 comments on commit 6533f55

Please sign in to comment.