Generate Bible reading plans by inputting start/end dates and/or chapters/day.
Returns JSON (see ./books.json
)
Returns an array of objects that represent each book.
[
{name: "Genesis", chapters: 50},
...,
{name: "Revelation", chapters: 22}
]
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.
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
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...
]
*/
Takes a start and end date with the books to read and returns a plan in the same structure as above.