calendar-month
Advanced tools
Comparing version 0.0.9 to 0.1.0
@@ -25,3 +25,3 @@ { | ||
], | ||
"version": "0.0.9" | ||
"version": "0.1.0" | ||
} |
@@ -18,2 +18,5 @@ | ||
meta.startDay = date.getDay() - Month.options.startDay || 0; | ||
if( meta.startDay < 0 ) { | ||
meta.startDay = meta.startDay + 7; | ||
} | ||
@@ -26,2 +29,3 @@ m.list = []; | ||
var prevMonthDays = 0; | ||
prevMonthDays = previousMonth.getDate() - meta.startDay; | ||
@@ -28,0 +32,0 @@ |
{ | ||
"name": "calendar-month", | ||
"version": "0.0.9", | ||
"version": "0.1.0", | ||
"description": "vanillajs month data handler", | ||
@@ -5,0 +5,0 @@ "main": "lib/month.js", |
100
README.md
@@ -23,6 +23,7 @@ | ||
// startDay to set Monday as first week day | ||
Month.config({ startDay: 1 }); | ||
// months from 0 (january) ... to 11 (december) | ||
new Month(2016, 3); | ||
new Month(2016, 2); | ||
``` | ||
@@ -35,54 +36,53 @@ | ||
year: 2016, | ||
month: 3, | ||
meta: { | ||
date: 'Tue Mar 01 2016 00:00:00 GMT+0100 (CET)', | ||
lastDay: 31, | ||
lastWeekDay: 4, | ||
startDay: 1 | ||
}, | ||
month: 2, | ||
meta: | ||
{ date: 'Tue Mar 01 2016 00:00:00 GMT+0100 (CET)', | ||
lastDay: 31, | ||
lastWeekDay: 4, | ||
startDay: 1 }, | ||
list: [ | ||
{ date: 29, previous: true }, | ||
{ date: 1 }, | ||
{ date: 2 }, | ||
{ date: 3 }, | ||
{ date: 4 }, | ||
{ date: 5 }, | ||
{ date: 6 }, | ||
{ date: 7 }, | ||
{ date: 8 }, | ||
{ date: 9 }, | ||
{ date: 10 }, | ||
{ date: 11 }, | ||
{ date: 12 }, | ||
{ date: 13 }, | ||
{ date: 14 }, | ||
{ date: 15 }, | ||
{ date: 16 }, | ||
{ date: 17 }, | ||
{ date: 18 }, | ||
{ date: 19 }, | ||
{ date: 20 }, | ||
{ date: 21 }, | ||
{ date: 22 }, | ||
{ date: 23 }, | ||
{ date: 24 }, | ||
{ date: 25 }, | ||
{ date: 26 }, | ||
{ date: 27 }, | ||
{ date: 28 }, | ||
{ date: 29 }, | ||
{ date: 30 }, | ||
{ date: 31 }, | ||
{ date: 1, next: true }, | ||
{ date: 2, next: true }, | ||
{ date: 3, next: true }, | ||
{ date: 4, next: true }, | ||
{ date: 5, next: true }, | ||
{ date: 6, next: true }, | ||
{ date: 7, next: true }, | ||
{ date: 8, next: true }, | ||
{ date: 9, next: true }, | ||
{ date: 10, next: true } | ||
{ date: 29, previous: true, month: 1, year: 2016 }, | ||
{ date: 1, month: 2, year: 2016 }, | ||
{ date: 2, month: 2, year: 2016 }, | ||
{ date: 3, month: 2, year: 2016 }, | ||
{ date: 4, month: 2, year: 2016 }, | ||
{ date: 5, month: 2, year: 2016 }, | ||
{ date: 6, month: 2, year: 2016 }, | ||
{ date: 7, month: 2, year: 2016 }, | ||
{ date: 8, month: 2, year: 2016 }, | ||
{ date: 9, month: 2, year: 2016 }, | ||
{ date: 10, month: 2, year: 2016 }, | ||
{ date: 11, month: 2, year: 2016 }, | ||
{ date: 12, month: 2, year: 2016 }, | ||
{ date: 13, month: 2, year: 2016 }, | ||
{ date: 14, month: 2, year: 2016 }, | ||
{ date: 15, month: 2, year: 2016 }, | ||
{ date: 16, month: 2, year: 2016 }, | ||
{ date: 17, month: 2, year: 2016 }, | ||
{ date: 18, month: 2, year: 2016 }, | ||
{ date: 19, month: 2, year: 2016 }, | ||
{ date: 20, month: 2, year: 2016 }, | ||
{ date: 21, month: 2, year: 2016 }, | ||
{ date: 22, month: 2, year: 2016 }, | ||
{ date: 23, month: 2, year: 2016 }, | ||
{ date: 24, month: 2, year: 2016 }, | ||
{ date: 25, month: 2, year: 2016 }, | ||
{ date: 26, month: 2, year: 2016 }, | ||
{ date: 27, month: 2, year: 2016 }, | ||
{ date: 28, month: 2, year: 2016 }, | ||
{ date: 29, month: 2, year: 2016 }, | ||
{ date: 30, month: 2, year: 2016 }, | ||
{ date: 31, month: 2, year: 2016 }, | ||
{ date: 1, next: true, month: 3, year: 2016 }, | ||
{ date: 2, next: true, month: 3, year: 2016 }, | ||
{ date: 3, next: true, month: 3, year: 2016 }, | ||
{ date: 4, next: true, month: 3, year: 2016 }, | ||
{ date: 5, next: true, month: 3, year: 2016 }, | ||
{ date: 6, next: true, month: 3, year: 2016 }, | ||
{ date: 7, next: true, month: 3, year: 2016 }, | ||
{ date: 8, next: true, month: 3, year: 2016 }, | ||
{ date: 9, next: true, month: 3, year: 2016 }, | ||
{ date: 10, next: true, month: 3, year: 2016 } | ||
] | ||
} | ||
``` |
@@ -7,5 +7,5 @@ | ||
// months from 0 (january) ... to 11 (december) | ||
var m = new Month(2016, 2); | ||
var m = new Month(2016, 4); | ||
console.log( m ); | ||
// console.log( m.previous() ); | ||
// console.log( m.next() ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7734
141