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

timexe

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timexe - npm Package Compare versions

Comparing version 0.9.6 to 0.9.7

4

package.json
{
"name": "timexe",
"version": "0.9.6",
"version": "0.9.7",
"description": "Yet another cron clone – but this one is better :o) - new improved syntax – milliseconds resolution – both for node JS and browser",

@@ -11,3 +11,3 @@ "main": "timexe.js",

"type": "git",
"url": "git+https://github.com/paragi/timexe.git"
"url": "https://github.com/paragi/timexe.git"
},

@@ -14,0 +14,0 @@ "keywords": [

@@ -76,7 +76,7 @@ /*============================================================================*\

var testCase=[
["2015 2 1 21 13 21 123",1400000000,1422825201.123,"Simple",false]
["2015 2 1 21 13 21 123",1400000000,1422821601.123,"Simple",false]
,["2013 2 1 21 13 21 123",1400000000,0,"Passed date",false]
,["* !/2 -4 12-16",1400000000,1403784000,"Mutually exclusive flags",false]
,["* * * * * 0",1420066799,1420070400,"Cascading carry",false]
,["* * * * ",1400000000,1400007600,"Only Wildcards = every hour,",false]
,["* !/2 -4 12-16",1400000000,1403776800 ,"Mutually exclusive flags",false]
,["* * * * * 0",1420066799,1420063200,"Cascading carry",false]
,["* * * * ",1400000000,1399996800,"Only Wildcards = every hour,",false]
,["* * * * 12",1400000000,1400008320,"Wildcards with one fixed value",false]

@@ -149,5 +149,4 @@ ,["**1 12",1400000000,1401624000,"Wildcards with two fixed value",false]

,["* * * * * /5",1433103355,1433103360,"Every 5 seconds",false]
,["* !1-12",1400000000,0,"Every 1 sec = *",false]
,["* * w1,7 1 0",1447400000,1447549200,"Every 1 sec = *",false]
,["* * w1,7 1 0",1447640000,1448154000,"Every 1 sec = *",false]
,["* !1-12",1400000000,0,"All months exclusive",false]
,["* * w1,7 1 0",1447575482,1447632000,"Pascal's Late sunday error",false]

@@ -162,2 +161,4 @@ ];

var jt;
// Set other then system timezone
// process.env.TZ='America/New_York'

@@ -199,2 +200,3 @@ // For browser

var result=timexe.nextTime(testCase[i][0],testCase[i][4],testCase[i][1]+of);
jt=( new Date(result.time*1000));
console.log(

@@ -204,3 +206,5 @@ i

,(new Date(result.time*1000)).toLocaleString() + '.' + ("00" + Math.round(result.time%1*1000)).slice(-3)
,(result.time==testCase[i][2]?'Ok':"Failed:("+result.time+")"+result.error+")")
,(result.time==testCase[i][2]
|| result.time==jt.getTimezoneOffset()*60+testCase[i][2])
?'Ok':"Failed:("+result.time+")"+result.error+")"
,testCase[i][3]

@@ -207,0 +211,0 @@ );

@@ -378,2 +378,5 @@ /*============================================================================*\

This code is optimised for performance rather then readability.
Please make good test cases that coveres all changes made here.
\*============================================================================*/

@@ -526,4 +529,6 @@ timexe.nextTime = function(tex,strict,startfromTime){

lastdom=new Date(date.getFullYear(),date.getMonth()+1,0).getDate();
// Get week day of current next time
nt[10]=((date.getDay()+7)%8+1);
// Get week day of current next time
// convert week day 0-6: sunday - saturday to 1-7: monday - sunday
nt[10]=(((date.getDay()+6)%7)+1);
//nt[10]=((date.getDay()+7)%8+1);

@@ -530,0 +535,0 @@ // Day of year

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