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

bz-date

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bz-date - npm Package Compare versions

Comparing version 1.2.1 to 1.3.0

2

package.json
{
"name": "bz-date",
"version": "1.2.1",
"version": "1.3.0",
"description": "Date library for btrz",

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

@@ -657,3 +657,3 @@

this.isEqual = function (date) {
if (!(date instanceof BzDate)) {
if (!(isBzDate(date))) {
throw new Error("Invalid argument - date: " + date);

@@ -686,2 +686,6 @@ }

function isBzDate(bzDate) {
return bzDate && bzDate.toLiteral !== undefined;
}
function BzDate(dateOrLiteralOrYear, formatOrOffsetOrMonth, offsetOrDay, hour, min, sec, msec, offset) {

@@ -705,3 +709,3 @@ var _date = new Date();

// A BzDate object
} else if (dateOrLiteralOrYear instanceof BzDate) {
} else if (isBzDate(dateOrLiteralOrYear)) {
_date = new Date(dateOrLiteralOrYear.getTime());

@@ -903,3 +907,3 @@ _timezoneOffset = dateOrLiteralOrYear.getTimezoneOffset();

this.isEqual = function (date) {
if (!(date instanceof BzDate)) {
if (!(isBzDate(date))) {
throw new Error("Invalid argument - date: " + date);

@@ -993,3 +997,3 @@ }

BzDate.applyOffset = function (bzDate, applyOrAddOffset) {
if (bzDate instanceof BzDate) {
if (isBzDate(bzDate)) {
var offset;

@@ -1026,5 +1030,5 @@

BzDate.compare = function (bzDate1, bzDate2, applyOffsets) {
if (!(bzDate1 instanceof BzDate)) {
if (!(isBzDate(bzDate1))) {
throw new Error("Invalid argument - bzDate1: " + bzDate1);
} else if (!(bzDate2 instanceof BzDate)) {
} else if (!(isBzDate(bzDate2))) {
throw new Error("Invalid argument - bzDate2: " + bzDate2);

@@ -1080,2 +1084,4 @@ }

BzDate.isBzDate = isBzDate;
/*

@@ -1139,3 +1145,3 @@ * Date Format 1.2.3

toString: function (date, mask, offsetVisible) {
if (!(date instanceof BzDate)) {
if (!(isBzDate(date))) {
throw new Error("Invalid argument - date: " + date);

@@ -1142,0 +1148,0 @@ } else if (mask && (typeof mask !== "string")) {

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