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

calendar-month-array

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calendar-month-array - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

.drone.yml

5

index.js

@@ -43,4 +43,5 @@ /**

var formatSiblingMonthDate = opts.formatSiblingMonthDate || formatDate
var day = 1 - (7 + first.getDay() - weekStartDay) % 7
var weeks = Math.ceil((last.getDate() - day) / 7)
var firstDaysToComplete = (7 + first.getDay() - weekStartDay) % 7
var day = 1 - firstDaysToComplete
var weeks = Math.ceil((last.getDate() + firstDaysToComplete) / 7)
var lines = []

@@ -47,0 +48,0 @@ var headers = []

2

package.json
{
"name": "calendar-month-array",
"version": "2.0.2",
"version": "2.0.3",
"description": "Generates a calendar array with the days of a single month organized by week",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -21,3 +21,3 @@ var calendar = require('../')

var expectedCell = 0
var expectedRow = 1 // as there is a day before, it comes in second row
var expectedRow = 1 // as there is a day before, it comes in second row
var cal = calendar(calendarDate, { weekStartDay: startDay })

@@ -30,2 +30,10 @@ t.equal(cal[0][0].getDay(), startDay)

test('calendar take into account weekStartDay for weeks row', function (t) {
var startDay = 1
var expectedRows = 6
var cal = calendar(new Date(2017, 9), { weekStartDay: startDay })
t.equal(cal.length, expectedRows)
t.end()
})
test('calendar last cell contains next month (sometimes)', function (t) {

@@ -32,0 +40,0 @@ var expectedDay = new Date('1995-02-04 00:00:00')

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