luxon
Version:
Immutable date wrapper
1,591 lines (1,590 loc) • 2.49 MB
JSON
{
"type": "File",
"start": 0,
"end": 18880,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 618,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
"end": 18880,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 618,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 35,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 35
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 9,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 13
}
},
"imported": {
"type": "Identifier",
"start": 9,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 13
},
"identifierName": "Util"
},
"name": "Util"
},
"local": {
"type": "Identifier",
"start": 9,
"end": 13,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 13
},
"identifierName": "Util"
},
"name": "Util"
}
}
],
"source": {
"type": "StringLiteral",
"start": 21,
"end": 34,
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 34
}
},
"extra": {
"rawValue": "./impl/util",
"raw": "'./impl/util'"
},
"value": "./impl/util"
}
},
{
"type": "ImportDeclaration",
"start": 36,
"end": 75,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 39
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 45,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 15
}
},
"imported": {
"type": "Identifier",
"start": 45,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 15
},
"identifierName": "Locale"
},
"name": "Locale"
},
"local": {
"type": "Identifier",
"start": 45,
"end": 51,
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 15
},
"identifierName": "Locale"
},
"name": "Locale"
}
}
],
"source": {
"type": "StringLiteral",
"start": 59,
"end": 74,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 38
}
},
"extra": {
"rawValue": "./impl/locale",
"raw": "'./impl/locale'"
},
"value": "./impl/locale"
}
},
{
"type": "ImportDeclaration",
"start": 76,
"end": 121,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 45
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 85,
"end": 94,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 18
}
},
"imported": {
"type": "Identifier",
"start": 85,
"end": 94,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 18
},
"identifierName": "Formatter"
},
"name": "Formatter"
},
"local": {
"type": "Identifier",
"start": 85,
"end": 94,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 18
},
"identifierName": "Formatter"
},
"name": "Formatter"
}
}
],
"source": {
"type": "StringLiteral",
"start": 102,
"end": 120,
"loc": {
"start": {
"line": 3,
"column": 26
},
"end": {
"line": 3,
"column": 44
}
},
"extra": {
"rawValue": "./impl/formatter",
"raw": "'./impl/formatter'"
},
"value": "./impl/formatter"
}
},
{
"type": "ImportDeclaration",
"start": 122,
"end": 171,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 49
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 131,
"end": 142,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 20
}
},
"imported": {
"type": "Identifier",
"start": 131,
"end": 142,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 20
},
"identifierName": "RegexParser"
},
"name": "RegexParser"
},
"local": {
"type": "Identifier",
"start": 131,
"end": 142,
"loc": {
"start": {
"line": 4,
"column": 9
},
"end": {
"line": 4,
"column": 20
},
"identifierName": "RegexParser"
},
"name": "RegexParser"
}
}
],
"source": {
"type": "StringLiteral",
"start": 150,
"end": 170,
"loc": {
"start": {
"line": 4,
"column": 28
},
"end": {
"line": 4,
"column": 48
}
},
"extra": {
"rawValue": "./impl/regexParser",
"raw": "'./impl/regexParser'"
},
"value": "./impl/regexParser"
}
},
{
"type": "ImportDeclaration",
"start": 172,
"end": 210,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 38
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 181,
"end": 189,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 17
}
},
"imported": {
"type": "Identifier",
"start": 181,
"end": 189,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 17
},
"identifierName": "Settings"
},
"name": "Settings"
},
"local": {
"type": "Identifier",
"start": 181,
"end": 189,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 17
},
"identifierName": "Settings"
},
"name": "Settings"
}
}
],
"source": {
"type": "StringLiteral",
"start": 197,
"end": 209,
"loc": {
"start": {
"line": 5,
"column": 25
},
"end": {
"line": 5,
"column": 37
}
},
"extra": {
"rawValue": "./settings",
"raw": "'./settings'"
},
"value": "./settings"
}
},
{
"type": "ImportDeclaration",
"start": 211,
"end": 299,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 88
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 220,
"end": 240,
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 29
}
},
"imported": {
"type": "Identifier",
"start": 220,
"end": 240,
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 29
},
"identifierName": "InvalidArgumentError"
},
"name": "InvalidArgumentError"
},
"local": {
"type": "Identifier",
"start": 220,
"end": 240,
"loc": {
"start": {
"line": 6,
"column": 9
},
"end": {
"line": 6,
"column": 29
},
"identifierName": "InvalidArgumentError"
},
"name": "InvalidArgumentError"
}
},
{
"type": "ImportSpecifier",
"start": 242,
"end": 262,
"loc": {
"start": {
"line": 6,
"column": 31
},
"end": {
"line": 6,
"column": 51
}
},
"imported": {
"type": "Identifier",
"start": 242,
"end": 262,
"loc": {
"start": {
"line": 6,
"column": 31
},
"end": {
"line": 6,
"column": 51
},
"identifierName": "InvalidDurationError"
},
"name": "InvalidDurationError"
},
"local": {
"type": "Identifier",
"start": 242,
"end": 262,
"loc": {
"start": {
"line": 6,
"column": 31
},
"end": {
"line": 6,
"column": 51
},
"identifierName": "InvalidDurationError"
},
"name": "InvalidDurationError"
}
},
{
"type": "ImportSpecifier",
"start": 264,
"end": 280,
"loc": {
"start": {
"line": 6,
"column": 53
},
"end": {
"line": 6,
"column": 69
}
},
"imported": {
"type": "Identifier",
"start": 264,
"end": 280,
"loc": {
"start": {
"line": 6,
"column": 53
},
"end": {
"line": 6,
"column": 69
},
"identifierName": "InvalidUnitError"
},
"name": "InvalidUnitError"
},
"local": {
"type": "Identifier",
"start": 264,
"end": 280,
"loc": {
"start": {
"line": 6,
"column": 53
},
"end": {
"line": 6,
"column": 69
},
"identifierName": "InvalidUnitError"
},
"name": "InvalidUnitError"
}
}
],
"source": {
"type": "StringLiteral",
"start": 288,
"end": 298,
"loc": {
"start": {
"line": 6,
"column": 77
},
"end": {
"line": 6,
"column": 87
}
},
"extra": {
"rawValue": "./errors",
"raw": "'./errors'"
},
"value": "./errors"
}
},
{
"type": "VariableDeclaration",
"start": 301,
"end": 336,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 35
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 307,
"end": 335,
"loc": {
"start": {
"line": 8,
"column": 6
},
"end": {
"line": 8,
"column": 34
}
},
"id": {
"type": "Identifier",
"start": 307,
"end": 314,
"loc": {
"start": {
"line": 8,
"column": 6
},
"end": {
"line": 8,
"column": 13
},
"identifierName": "INVALID"
},
"name": "INVALID"
},
"init": {
"type": "StringLiteral",
"start": 317,
"end": 335,
"loc": {
"start": {
"line": 8,
"column": 16
},
"end": {
"line": 8,
"column": 34
}
},
"extra": {
"rawValue": "Invalid Duration",
"raw": "'Invalid Duration'"
},
"value": "Invalid Duration"
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 338,
"end": 2086,
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 73,
"column": 4
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 344,
"end": 823,
"loc": {
"start": {
"line": 10,
"column": 6
},
"end": {
"line": 27,
"column": 3
}
},
"id": {
"type": "Identifier",
"start": 344,
"end": 358,
"loc": {
"start": {
"line": 10,
"column": 6
},
"end": {
"line": 10,
"column": 20
},
"identifierName": "lowOrderMatrix"
},
"name": "lowOrderMatrix"
},
"init": {
"type": "ObjectExpression",
"start": 361,
"end": 823,
"loc": {
"start": {
"line": 10,
"column": 23
},
"end": {
"line": 27,
"column": 3
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 367,
"end": 522,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 17,
"column": 5
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 367,
"end": 372,
"loc": {
"start": {
"line": 11,
"column": 4
},
"end": {
"line": 11,
"column": 9
},
"identifierName": "weeks"
},
"name": "weeks"
},
"value": {
"type": "ObjectExpression",
"start": 374,
"end": 522,
"loc": {
"start": {
"line": 11,
"column": 11
},
"end": {
"line": 17,
"column": 5
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 382,
"end": 389,
"loc": {
"start": {
"line": 12,
"column": 6
},
"end": {
"line": 12,
"column": 13
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 382,
"end": 386,
"loc": {
"start": {
"line": 12,
"column": 6
},
"end": {
"line": 12,
"column": 10
},
"identifierName": "days"
},
"name": "days"
},
"value": {
"type": "NumericLiteral",
"start": 388,
"end": 389,
"loc": {
"start": {
"line": 12,
"column": 12
},
"end": {
"line": 12,
"column": 13
}
},
"extra": {
"rawValue": 7,
"raw": "7"
},
"value": 7
}
},
{
"type": "ObjectProperty",
"start": 397,
"end": 410,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 19
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 397,
"end": 402,
"loc": {
"start": {
"line": 13,
"column": 6
},
"end": {
"line": 13,
"column": 11
},
"identifierName": "hours"
},
"name": "hours"
},
"value": {
"type": "BinaryExpression",
"start": 404,
"end": 410,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 19
}
},
"left": {
"type": "NumericLiteral",
"start": 404,
"end": 405,
"loc": {
"start": {
"line": 13,
"column": 13
},
"end": {
"line": 13,
"column": 14
}
},
"extra": {
"rawValue": 7,
"raw": "7"
},
"value": 7
},
"operator": "*",
"right": {
"type": "NumericLiteral",
"start": 408,
"end": 410,
"loc": {
"start": {
"line": 13,
"column": 17
},
"end": {
"line": 13,
"column": 19
}
},
"extra": {
"rawValue": 24,
"raw": "24"
},
"value": 24
}
}
},
{
"type": "ObjectProperty",
"start": 418,
"end": 438,
"loc": {
"start": {
"line": 14,
"column": 6
},
"end": {
"line": 14,
"column": 26
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 418,
"end": 425,
"loc": {
"start": {
"line": 14,
"column": 6
},
"end": {
"line": 14,
"column": 13
},
"identifierName": "minutes"
},
"name": "minutes"
},
"value": {
"type": "BinaryExpression",
"start": 427,
"end": 438,
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 26
}
},
"left": {
"type": "BinaryExpression",
"start": 427,
"end": 433,
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 21
}
},
"left": {
"type": "NumericLiteral",
"start": 427,
"end": 428,
"loc": {
"start": {
"line": 14,
"column": 15
},
"end": {
"line": 14,
"column": 16
}
},
"extra": {
"rawValue": 7,
"raw": "7"
},
"value": 7
},
"operator": "*",
"right": {
"type": "NumericLiteral",
"start": 431,
"end": 433,
"loc": {
"start": {
"line": 14,
"column": 19
},
"end": {
"line": 14,
"column": 21
}
},
"extra": {
"rawValue": 24,
"raw": "24"
},
"value": 24
}
},
"operator": "*",
"right": {
"type": "NumericLiteral",
"start": 436,
"end": 438,
"loc": {
"start": {
"line": 14,
"column": 24
},
"end": {
"line": 14,
"column": 26
}
},
"extra": {
"rawValue": 60,
"raw": "60"
},
"value": 60
}
}
},
{
"type": "ObjectProperty",
"start": 446,
"end": 471,
"loc": {
"start": {
"line": 15,
"column": 6
},
"end": {
"line": 15,
"column": 31
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 446,
"end": 453,
"loc": {
"start": {
"line": 15,
"column": 6
},
"end": {
"line": 15,
"column": 13
},
"identifierName": "seconds"
},
"name": "seconds"
},
"value": {
"type": "BinaryExpression",
"start": 455,
"end": 471,
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 31
}
},
"left": {
"type": "BinaryExpression",
"start": 455,
"end": 466,
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 26
}
},
"left": {
"type": "BinaryExpression",
"start": 455,
"end": 461,
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 21
}
},
"left": {
"type": "NumericLiteral",
"start": 455,
"end": 456,
"loc": {
"start": {
"line": 15,
"column": 15
},
"end": {
"line": 15,
"column": 16
}
},
"extra": {
"rawValue": 7,
"raw": "7"
},
"value": 7
},
"operator": "*",
"right": {
"type": "NumericLiteral",
"start": 459,
"end": 461,
"loc": {
"start": {
"line": 15,
"column": 19
},
"end": {
"line": 15,
"column": 21
}
},
"extra": {
"rawValue": 24,
"raw": "24"
},
"value": 24
}
},
"operator": "*",
"right": {
"type": "NumericLiteral",
"start": 464,
"end": 466,
"loc": {
"start": {
"line": 15,
"column": 24
},
"end": {
"line": 15,
"column": 26
}
},
"extra": {
"rawValue": 60,
"raw": "60"
},
"value": 60
}
},
"operator": "*",
"right": {
"type": "NumericLiteral",
"start": 469,
"end": 471,
"loc": {
"start": {
"line": 15,
"column": 29
},
"end": {
"line": 15,
"column": 31
}
},
"extra": {
"rawValue": 60,
"raw": "60"
},
"value": 60
}
}
},
{
"type": "ObjectProperty",
"start": 479,
"end": 516,
"loc": {
"start": {
"line": 16,
"column": 6
},
"end": {
"line": 16,
"column": 43
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 479,
"end": 491,
"loc": {
"start": {
"line": 16,
"column": 6
},
"end": {
"line": 16,
"column": 18
},
"identifierName": "milliseconds"
},
"name": "milliseconds"
},
"value": {
"type": "BinaryExpression",
"start": 493,
"end": 516,
"loc": {
"start": {
"line": 16,
"column": 20
},
"end": {
"line": 16,
"column": 43
}
},
"left": {
"type": "BinaryExpression",
"start": 493,
"end": 509,
"loc": {
"start": {
"line": 16,
"column": 20
},
"end": {
"line": 16,
"column": 36
}
},
"left": {
"type": "BinaryExpression",
"start": 493,
"end": 504,
"loc": {
"start": {
"line": 16,
"column": 20
},
"end": {
"line": 16,
"column": 31
}
},
"left": {
"type": "BinaryExpression",
"start": 493,
"end": 499,
"loc": {
"start": {
"line": 16,
"column": 20
},
"end": {
"line": 16,
"column": 26
}
},
"left": {
"type": "NumericLiteral",
"start": 493,
"end": 494,
"loc": {
"start": {
"line": 16,
"column": 20
},
"end": {
"line": 16,
"column": 21
}
},
"extra": {
"rawValue": 7,
"raw": "7"
},
"value": 7
},
"operator": "*",
"right": {
"type": "NumericLiteral",
"start": 497,
"end": 499,
"loc": {
"start": {
"line": 16,
"column": 24
},
"end": {
"line": 16,
"column": 26
}
},
"extra": {
"rawValue": 24,
"raw": "24"
},
"value": 24
}
},
"operator": "*",
"right": {
"type": "NumericLiteral",
"start": 502,
"end": 504,
"loc": {
"start": {
"line": 16,
"column": 29
},
"end": {
"line": 16,
"column": 31
}
},
"extra": {
"rawValue": 60,
"raw": "60"
},
"value": 60
}
},
"operator": "*",
"right": {
"type": "NumericLiteral",
"start": 507,
"end": 509,
"loc": {
"start": {
"line": 16,
"column": 34
},
"end": {
"line": 16,
"column": 36
}
},
"extra": {
"rawValue": 60,
"raw": "60"
},
"value": 60
}
},
"operator": "*",
"right": {
"type": "NumericLiteral",
"start": 512,
"end": 516,
"loc": {
"start": {
"line": 16,
"column": 39
},
"end": {
"line": 16,
"column": 43
}
},
"extra": {
"rawValue": 1000,
"raw": "1000"
},
"value": 1000
}
}
}
]
}
},
{
"type": "ObjectProperty",
"start": 528,
"end": 651,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 23,
"column": 5
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 528,
"end": 532,
"loc": {
"start": {
"line": 18,
"column": 4
},
"end": {
"line": 18,
"column": 8
},
"identifierName": "days"
},
"name": "days"
},
"value": {
"type": "ObjectExpression",
"start": 534,
"end": 651,
"loc": {
"start": {
"line": 18,
"column": 10
},
"end": {
"line": 23,
"column": 5
}
},
"properties": [
{
"type": "ObjectProperty",
"start": 542,
"end": 551,
"loc": {
"start": {
"line": 19,
"column": 6
},
"end": {
"line": 19,
"column": 15
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 542,
"end": 547,
"loc": {
"start": {
"line": 19,
"column": 6
},
"end": {
"line": 19,
"column": 11
},
"identifierName": "hours"
},
"name": "hours"
},
"value": {
"type": "NumericLiteral",
"start": 549,
"end": 551,
"loc": {
"start": {
"line": 19,
"column": 13
},
"end": {
"line": 19,
"column": 15
}
},
"extra": {
"rawValue": 24,
"raw": "24"
},
"value": 24
}
},
{
"type": "ObjectProperty",
"start": 559,
"end": 575,
"loc": {
"start": {
"line": 20,
"column": 6
},
"end": {
"line": 20,
"column": 22
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 559,
"end": 566,
"loc": {
"start": {
"line": 20,