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

bikram-sambat

Package Overview
Dependencies
Maintainers
9
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bikram-sambat - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

8

package.json
{
"name": "bikram-sambat",
"version": "1.5.0",
"version": "1.5.1",
"description": "JS utilities for converting between the Nepali Bikram Sambat (Vikram Samvat) and Gregorian (standard European) calendars.",

@@ -23,3 +23,3 @@ "main": "src/index.js",

"author": "alxndrsn",
"license": "ISC",
"license": "Apache-2.0",
"bugs": {

@@ -33,4 +33,4 @@ "url": "https://github.com/alxndrsn/bikram-sambat.js/issues"

"jshint": "^2.9.5",
"lodash": "^4.17.4",
"mocha": "^3.2.0"
"lodash": "^4.17.11",
"mocha": "^5.2.0"
},

@@ -37,0 +37,0 @@ "dependencies": {

@@ -25,4 +25,3 @@ var toDevanagari = require('eurodigit/src/to_non_euro').devanagari;

function daysInMonth(year, month) {
// TODO why does this accept 0?
if(month < 0 || month > 12) throw new Error('Invalid month value ' + month);
if(month < 1 || month > 12) throw new Error('Invalid month value ' + month);
var delta = ENCODED_MONTH_LENGTHS[year - 2000];

@@ -74,9 +73,6 @@ if(typeof delta === 'undefined') throw new Error('No data for year: ' + year + ' BS');

var timestamp = BS_EPOCH_TS;
while(year >= BS_YEAR_ZERO) {
while(month >= 1) {
while(--day >= 0) {
timestamp += MS_PER_DAY;
}
day = daysInMonth(year, --month);
}
do while(day--) timestamp += MS_PER_DAY;
while(--month && (day = daysInMonth(year, month)));
day = daysInMonth(--year, month = 12);

@@ -83,0 +79,0 @@ }

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