New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

arlib

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arlib - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

30

lib/phpdate.js

@@ -12,2 +12,4 @@ /**

var util = require('util');
var _tzCache = new TzCache(); // cached tzInfo() data and whether typesetting as GMT

@@ -28,19 +30,22 @@

// Date is magic, and cannot inherit its prototype methods... so decorate it
function GmtDate( dt ) {
this.dt = dt;
}
GmtDate.prototype.getTime = function GmtDate_getTime() { return this.dt.getTime(); };
GmtDate.prototype.getFullYear = function GmtDate_getFullYear() { return this.dt.getUTCFullYear(); };
GmtDate.prototype.getMonth = function GmtDate_getMonth() { return this.dt.getUTCMonth(); };
GmtDate.prototype.getDay = function GmtDate_getDay() { return this.dt.getUTCDay(); };
GmtDate.prototype.getDate = function GmtDate_getDate() { return this.dt.getUTCDate(); };
GmtDate.prototype.getHours = function GmtDate_getHours() { return this.dt.getUTCHours(); };
GmtDate.prototype.getMinutes = function GmtDate_getMinutes() { return this.dt.getUTCMinutes(); };
GmtDate.prototype.getSeconds = function GmtDate_getSeconds() { return this.dt.getUTCSeconds(); };
function gmdate( format, timestamp ) {
var dt = _timestampToDt(timestamp);
// do not alter the provided Date object, use a copy instead
if (typeof timestamp === 'object') dt = new Date(dt.getTime());
dt.getFullYear = dt.getUTCFullYear;
dt.getMonth = dt.getUTCMonth;
dt.getDay = dt.getUTCDay;
dt.getDate = dt.getUTCDate;
dt.getHours = dt.getUTCHours;
dt.getMinutes = dt.getUTCMinutes;
dt.getSeconds = dt.getUTCSeconds;
var currentlyGmt = _tzCache.isGmt();
_tzCache.forceGmt(true);
var ret = phpdate(format, dt);
var ret = phpdate(format, new GmtDate(dt));
_tzCache.forceGmt(currentlyGmt);

@@ -53,2 +58,3 @@

return (typeof timestamp === 'number') ? new Date(timestamp) : timestamp ? timestamp : new Date();
// TODO: use process.hrtime() to capture microsecond timestamp, for 'u' format
}

@@ -55,0 +61,0 @@

2

package.json
{
"name": "arlib",
"version": "0.1.3",
"version": "0.1.4",
"description": "Andras' Utility Functions",

@@ -5,0 +5,0 @@ "license": "Apache-2.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