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

@videsk/humanize-date

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@videsk/humanize-date - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Changelog

## v1.1.1
- [FIX] Remove decimals
## v1.1.0

@@ -7,0 +11,0 @@

2

package.json
{
"name": "@videsk/humanize-date",
"version": "1.1.0",
"version": "1.1.1",
"description": "Humanize dates making readable in locale and ultra lightweight",

@@ -5,0 +5,0 @@ "scripts": {

@@ -49,3 +49,3 @@ class HumanizeDate {

if (!(unit in this.units)) throw new Error(`The available units are ${Object.keys(this.units)}`);
return new Intl.RelativeTimeFormat(navigator.language, options).format(this.units[unit](this.from, this.to), (unit !== 'auto') ? unit : this.autoToUnitText(this.from, this.to));
return new Intl.RelativeTimeFormat(navigator.language, options).format(Math.floor(this.units[unit](this.from, this.to)), (unit !== 'auto') ? unit : this.autoToUnitText(this.from, this.to));
}

@@ -61,3 +61,3 @@

if (!(unit in this.units)) throw new Error(`The available units are ${Object.keys(this.units)}`);
return new Intl.RelativeTimeFormat(navigator.language, options).format(this.units[unit](this.from, this.to) * -1, (unit !== 'auto') ? unit : this.autoToUnitText(this.from, this.to));
return new Intl.RelativeTimeFormat(navigator.language, options).format(Math.floor(this.units[unit](this.from, this.to) * -1), (unit !== 'auto') ? unit : this.autoToUnitText(this.from, this.to));
}

@@ -64,0 +64,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