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

@brightspace-ui/intl

Package Overview
Dependencies
Maintainers
3
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brightspace-ui/intl - npm Package Compare versions

Comparing version 3.13.0 to 3.13.1

31

lib/dateTime.js

@@ -1201,17 +1201,2 @@ import { getDocumentLocaleSettings, getLanguage, merge } from './common.js';

if (unit === 'day' || unit === 'hour' && Math.round(Math.abs(value)) >= 6) {
const fullDay = 24 * 60 * 60 * 1000;
const today = new Date(now.toDateString()).getTime();
const yesterday = thenTS < today && thenTS > (today - fullDay);
const tomorrow = thenTS >= today + fullDay && thenTS < (today + fullDay * 2);
if (yesterday || tomorrow) {
numeric = 'auto';
unit = 'day';
value = Math.sign(value);
}
}
if (unit === 'week' || unit === 'day' && Math.round(Math.abs(value)) >= 4) {

@@ -1226,3 +1211,3 @@

const lastWeek = thenTS < thisWeek && thenTS > (thisWeek - fullWeek);
const lastWeek = thenTS < thisWeek && thenTS >= (thisWeek - fullWeek);
const nextWeek = thenTS >= thisWeek + fullWeek && thenTS < (thisWeek + fullWeek * 2);

@@ -1236,3 +1221,17 @@

}
else if (unit === 'day' || unit === 'hour' && Math.round(Math.abs(value)) >= 6) {
const fullDay = 24 * 60 * 60 * 1000;
const today = new Date(now.toDateString()).getTime();
const yesterday = thenTS < today && thenTS >= (today - fullDay);
const tomorrow = thenTS >= today + fullDay && thenTS < (today + fullDay * 2);
if (yesterday || tomorrow) {
numeric = 'auto';
unit = 'day';
value = Math.sign(value);
}
}
const rtf = new Intl.RelativeTimeFormat(getLanguage(), {

@@ -1239,0 +1238,0 @@ localeMatcher: 'best fit',

{
"name": "@brightspace-ui/intl",
"version": "3.13.0",
"version": "3.13.1",
"description": "Internationalization APIs for number, date, time and file size formatting and parsing in D2L Brightspace.",

@@ -5,0 +5,0 @@ "main": "lib/number.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