1.3.0 • Published 8 years ago

bible_reading v1.3.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

bible_reading.js

Generate Bible reading plans by inputting start/end dates and/or chapters/day.

Properties

.bible

Returns JSON (see ./books.json)

.all_books

Returns an array of objects that represent each book.

[
  {name: "Genesis", chapters: 50},
  ...,
  {name: "Revelation", chapters: 22}
]

Methods

.get_book([string])

If no argument is present then a random book will be returned.

If a book name is passed as the first argument then it will return that book as an object.

.plan_by_days(start_date, chapters_per_day, books)

start_date can be a valid Javascript date object or a string/number that can be converted using Javascript's date constructor.

ex: "1/11/2016" | 123123891789 | "October 23, 2016"

chapters_per_day is a number representing how many chapters to read each day starting from start_date.

books is an array of book objects just like the return value of .all_books

Example
var bible_reading = require('bible_reading');

var start_date = "1/1/2016";
var chp_per_day = 4;
var books = [
  {name: "Genesis" chapters: 50},
  {name: "Matthew" chapters: 28},
  {name: "Romans" chapters: 16}
]

var my_plan = bible_reading.plan_by_days(start_date, 4, books);

console.log(my_plan);

/*
=>  [
      {
        date: "1/1/2016",
        reading: [
          "Genesis 1",
          "Genesis 2",
          "Genesis 3",
          "Genesis 4"
        ]
      },
      and so on...
    ]
*/

.plan_by_date(start_date, end_date, books)

Takes a start and end date with the books to read and returns a plan in the same structure as above.

1.3.0

8 years ago

1.2.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago