Socket
Socket
Sign inDemoInstall

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 0.2.3 to 0.2.4

6

changelog.md
# Changelog
## 0.2.4
* Fix `toHTTP` to use 24-hour hours
* Tighten up regular expressions
* Various documentation fixes
## 0.2.3

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

2

package.json
{
"name": "luxon",
"version": "0.2.3",
"version": "0.2.4",
"description": "Immutable date wrapper",

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

@@ -18,3 +18,3 @@ # Luxon

[Download/install instructions](https://moment.github.io/luxon/docs/manual/design/install.html)
[Download/install instructions](https://moment.github.io/luxon/docs/manual/install.html)

@@ -21,0 +21,0 @@ ## Documentation

@@ -10,2 +10,3 @@ import { Util } from './impl/util';

// unit conversion constants
const lowOrderMatrix = {

@@ -76,2 +77,3 @@ weeks: {

// units ordered by size
const orderedUnits = [

@@ -88,2 +90,3 @@ 'years',

// clone really means "create another instance just like this one, but with these changes"
function clone(dur, alts, clear = false) {

@@ -99,2 +102,4 @@ // deep merge for vals

// some functions really care about the absolute value of a duration, so combined with
// normalize() this tells us whether this duration is positive or negative
function isHighOrderNegative(obj) {

@@ -113,3 +118,3 @@ // only rule is that the highest-order part must be non-negative

*
* * **Creation** To create a Duration, use {@link fromMillis}, {@link fromObject}, or {@link fromISO}.
* * **Creation** To create a Duration, use {@link Duration#fromMillis}, {@link Duration#fromObject}, or {@link Duration#fromISO}.
* * **Unit values** See the {@link years}, {@link months}, {@link weeks}, {@link days}, {@link hours}, {@link minutes}, {@link seconds}, {@link milliseconds} accessors.

@@ -116,0 +121,0 @@ * * **Configuration** See {@link locale} and {@link numberingSystem} accessors.

@@ -72,3 +72,3 @@ import { Util } from './util';

sqlTimeRegex = RegExp(
`${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|([a-zA-Z_]+/[a-zA-Z_]+))?`
`${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|([a-zA-Z_]{1,256}/[a-zA-Z_]{1,256}))?`
),

@@ -112,3 +112,3 @@ sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);

const isoDuration = /^P(?:(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?|(\d+)W)$/;
const isoDuration = /^P(?:(?:(\d{1,9})Y)?(?:(\d{1,9})M)?(?:(\d{1,9})D)?(?:T(?:(\d{1,9})H)?(?:(\d{1,9})M)?(?:(\d{1,9})S)?)?|(\d{1,9})W)$/;

@@ -115,0 +115,0 @@ function extractISODuration(match) {

@@ -155,3 +155,3 @@ import { Util } from './util';

case 'z':
return simple(/[A-Za-z_]+\/[A-Za-z_]+/);
return simple(/[A-Za-z_]{1,256}\/[A-Za-z_]{1,256}/);
default:

@@ -158,0 +158,0 @@ return literal(t);

@@ -9,2 +9,3 @@ import { Util } from './impl/util';

// checks if the start is equal to or before the end
function validateStartEnd(start, end) {

@@ -11,0 +12,0 @@ return !!start && !!end && start.isValid && end.isValid && start <= end;

@@ -49,3 +49,3 @@ import { Util } from '../impl/util';

static isValidSpecier(s) {
return s && s.match(/[a-z_]+\/[a-z_]+/i);
return s && s.match(/[a-z_]{1,256}\/[a-z_]{1,256}/i);
}

@@ -52,0 +52,0 @@

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

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

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