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

luxon

Package Overview
Dependencies
Maintainers
1
Versions
145
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

luxon - npm Package Compare versions

Comparing version 1.16.1 to 1.17.0

6

changelog.md
# Changelog
## 1.17.0
* DateTime.min and DateTime.max throw if they get the wrong kind of arguments
* Fixed throwOnInvalid logic for Interval
* Added `DATETIME_MED_WITH_WEEKDAY` preset
## 1.16.1

@@ -4,0 +10,0 @@

2

package.json
{
"name": "luxon",
"version": "1.16.1",
"version": "1.17.0",
"description": "Immutable date wrapper",

@@ -5,0 +5,0 @@ "author": "Isaac Cambron",

@@ -214,2 +214,4 @@ import * as Formats from "./formats.js";

return "LLL d, yyyy, h:mm:ss a";
case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):
return "EEE, d LLL yyyy, h:mm a";
case stringify(Formats.DATETIME_FULL_WITH_SECONDS):

@@ -216,0 +218,0 @@ return "LLLL d, yyyy, h:mm:ss a";

@@ -138,2 +138,11 @@ /**

export const DATETIME_MED_WITH_WEEKDAY = {
year: n,
month: s,
day: n,
weekday: s,
hour: n,
minute: d2
};
export const DATETIME_FULL = {

@@ -140,0 +149,0 @@ year: n,

@@ -12,7 +12,7 @@ import DateTime, { friendlyDateTime } from "./datetime.js";

if (!start || !start.isValid) {
return new Invalid("missing or invalid start");
return Interval.invalid("missing or invalid start");
} else if (!end || !end.isValid) {
return new Invalid("missing or invalid end");
return Interval.invalid("missing or invalid end");
} else if (end < start) {
return new Invalid(
return Interval.invalid(
"end before start",

@@ -91,7 +91,12 @@ `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`

return new Interval({
start: builtStart,
end: builtEnd,
invalid: validateStartEnd(builtStart, builtEnd)
});
const validateError = validateStartEnd(builtStart, builtEnd);
if (validateError == null) {
return new Interval({
start: builtStart,
end: builtEnd
});
} else {
return validateError;
}
}

@@ -98,0 +103,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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