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

nv-facutil-clock

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nv-facutil-clock - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

42

index.js

@@ -223,9 +223,20 @@

next_m(n=1) {
////
let r = n%12;
let q = (n-r) / 12;
////
let d = this.dict();
if(d.m === 12) {
d.y = d.y+1;
d.m = 1;
////
d.y = d.y + q;
if(r===0) {
} else {
d.m = d.m+1;
let m = d.m + r;
if(m<=12) {
d.m=m
} else {
d.m = m -12
d.y = d.y + 1
}
}
////
let s = _dict_to_str(d);

@@ -237,9 +248,20 @@ let dt = new Date(s);

prev_m(n=1) {
////
let r = n%12;
let q = (n-r) / 12;
////
let d = this.dict();
if(d.m === 1) {
d.y = d.y-1;
d.m = 12;
if(r===0) {
} else {
d.m = d.m-1;
let m = d.m - r
if(m>=1) {
d.m = m
} else {
d.y = d.y -1;
m = m +12
d.m = m
}
}
d.y = d.y - q;
////
let s = _dict_to_str(d);

@@ -252,3 +274,3 @@ let dt = new Date(s);

let d = this.dict();
d.y = d.y + 1;
d.y = d.y + n;
let s = _dict_to_str(d);

@@ -261,3 +283,3 @@ let dt = new Date(s);

let d = this.dict();
d.y = d.y - 1;
d.y = d.y - n;
let s = _dict_to_str(d);

@@ -264,0 +286,0 @@ let dt = new Date(s);

{
"name": "nv-facutil-clock",
"version": "1.0.4",
"version": "1.0.5",
"description": "clock,date,generator,stream,cron",

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

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