Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

calendar-month

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calendar-month - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

2

bower.json

@@ -25,3 +25,3 @@ {

],
"version": "0.0.4"
"version": "0.0.5"
}

@@ -25,4 +25,8 @@

}
prevMonthDays = new Date(year, month - 1, 0).getDate() - meta.startDay;
var previousMonth = new Date(year, month - 1, 0),
nextMonth = new Date(year, month + 1, 0);
prevMonthDays = previousMonth.getDate() - meta.startDay;
var count = 0;

@@ -32,9 +36,15 @@ for(var i = 0; i < 42; i++) {

if(i < meta.startDay) {
day.date = (prevMonthDays = prevMonthDays + 1);
day.date = ++prevMonthDays;
day.previous = true;
day.month = previousMonth.getMonth();
day.year = previousMonth.getFullYear();
} else if(i > meta.lastDay + (meta.startDay - 1)) {
day.date = (count = count + 1);
day.date = ++count;
day.next = true;
day.month = nextMonth.getMonth();
day.year = nextMonth.getFullYear();
} else {
day.date = (i - meta.startDay) + 1;
day.month = date.getMonth();
day.year = date.getFullYear();
}

@@ -65,3 +75,3 @@ m.list[m.list.length] = day;

this.month = month;
monthInformation(this.year, this.month, this);
monthInformation(this.year, month + 1, this);
}

@@ -68,0 +78,0 @@

{
"name": "calendar-month",
"version": "0.0.4",
"version": "0.0.5",
"description": "vanillajs month data handler",

@@ -5,0 +5,0 @@ "main": "lib/month.js",

calendar-month
==============
[![](https://img.shields.io/npm/v/calendar-month.svg)](https://www.npmjs.com/package/calendar-month) [![](https://img.shields.io/bower/v/calendar-month.svg)](http://bower.io/search/?q=calendar-month)
> node

@@ -25,3 +25,4 @@

console.log( new Month(2016, 3) );
// months from 0 (january) ... to 11 (december)
new Month(2016, 3);
```

@@ -32,3 +33,3 @@

``` js
{
Month {
year: 2016,

@@ -35,0 +36,0 @@ month: 3,

@@ -6,2 +6,3 @@

console.log( new Month(2016, 3) );
// months from 0 (january) ... to 11 (december)
console.log( new Month(2016, 2) );
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc