Init
This commit is contained in:
107
node_modules/date-and-time/EXTEND.md
generated
vendored
Normal file
107
node_modules/date-and-time/EXTEND.md
generated
vendored
Normal file
@ -0,0 +1,107 @@
|
||||
# Extension
|
||||
|
||||
The easiest way to extend the default formatter and parser is to use plugins, but if the existing plugins do not meet your requirements, you can extend them yourself.
|
||||
|
||||
## Token
|
||||
|
||||
Tokens in this library have the following rules:
|
||||
|
||||
- All of the characters must be the same alphabet (`A-Z, a-z`).
|
||||
|
||||
```javascript
|
||||
'E' // Good
|
||||
'EE' // Good
|
||||
'EEEEEEEEEE' // Good, but why so long!?
|
||||
'EES' // Not good
|
||||
'???' // Not good
|
||||
```
|
||||
|
||||
- It is case sensitive.
|
||||
|
||||
```javascript
|
||||
'eee' // Good
|
||||
'Eee' // Not good
|
||||
```
|
||||
|
||||
- Only tokens consisting of the following alphabets can be added to the parser.
|
||||
|
||||
```javascript
|
||||
'Y' // Year
|
||||
'M' // Month
|
||||
'D' // Day
|
||||
'H' // 24-hour
|
||||
'A' // AM PM
|
||||
'h' // 12-hour
|
||||
's' // Second
|
||||
'S' // Millisecond
|
||||
'Z' // Timezone offset
|
||||
```
|
||||
|
||||
- Existing tokens cannot be overwritten.
|
||||
|
||||
```javascript
|
||||
'YYY' // This is OK because the same token does not exists.
|
||||
'SSS' // This cannot be added because the exact same token exists.
|
||||
'EEE' // This is OK for the formatter, but cannot be added to the parser.
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1
|
||||
|
||||
Add `E` token to the formatter. This new token will output "decade" like this:
|
||||
|
||||
```javascript
|
||||
const d1 = new Date(2020, 0, 1);
|
||||
const d2 = new Date(2019, 0, 1);
|
||||
|
||||
date.format(d1, '[The year] YYYY [is] E[s].'); // => "The year 2020 is 2020s."
|
||||
date.format(d2, '[The year] YYYY [is] E[s].'); // => "The year 2019 is 2010s."
|
||||
```
|
||||
|
||||
Source code example is here:
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
|
||||
date.extend({
|
||||
formatter: {
|
||||
E: function (d) {
|
||||
return (d.getFullYear() / 10 | 0) * 10;
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
### Example 2
|
||||
|
||||
Add `MMMMM` token to the parser. This token ignores case:
|
||||
|
||||
```javascript
|
||||
date.parse('Dec 25 2019', 'MMMMM DD YYYY'); // => December 25, 2019
|
||||
date.parse('dec 25 2019', 'MMMMM DD YYYY'); // => December 25, 2019
|
||||
date.parse('DEC 25 2019', 'MMMMM DD YYYY'); // => December 25, 2019
|
||||
```
|
||||
|
||||
Source code example is here:
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
|
||||
date.extend({
|
||||
parser: {
|
||||
MMMMM: function (str) {
|
||||
const mmm = this.res.MMM.map(m => m.toLowerCase());
|
||||
const result = this.find(mmm, str.toLowerCase());
|
||||
result.value++;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
Extending the parser may be a bit difficult. Refer to the library source code to grasp the default behavior.
|
||||
|
||||
## Caveats
|
||||
|
||||
Note that switching locales or applying plugins after extending the library will be cleared all extensions. In such cases, you need to extend the library again.
|
||||
22
node_modules/date-and-time/LICENSE
generated
vendored
Normal file
22
node_modules/date-and-time/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 KNOWLEDGECODE
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
103
node_modules/date-and-time/LOCALE.md
generated
vendored
Normal file
103
node_modules/date-and-time/LOCALE.md
generated
vendored
Normal file
@ -0,0 +1,103 @@
|
||||
# Locale
|
||||
|
||||
By default, `format()` outputs month, day of week, and meridiem (AM / PM) in English, and functions such as `parse()` assume that a passed date time string is in English. Here it describes how to use other languages in these functions.
|
||||
|
||||
## Usage
|
||||
|
||||
- ES Modules:
|
||||
|
||||
```javascript
|
||||
import date from 'date-and-time';
|
||||
import es from 'date-and-time/locale/es';
|
||||
|
||||
date.locale(es); // Spanish
|
||||
date.format(new Date(), 'dddd D MMMM'); // => 'lunes 11 enero
|
||||
```
|
||||
|
||||
- CommonJS:
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
const fr = require('date-and-time/locale/fr');
|
||||
|
||||
date.locale(fr); // French
|
||||
date.format(new Date(), 'dddd D MMMM'); // => 'lundi 11 janvier'
|
||||
```
|
||||
|
||||
- ES Modules for the browser:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import date from '/path/to/date-and-time.es.min.js';
|
||||
import it from '/path/to/date-and-time/locale/it.es.js';
|
||||
|
||||
date.locale(it); // Italian
|
||||
date.format(new Date(), 'dddd D MMMM'); // => 'Lunedì 11 gennaio'
|
||||
</script>
|
||||
```
|
||||
|
||||
- Older browser:
|
||||
|
||||
```html
|
||||
<script src="/path/to/date-and-time.min.js"></script>
|
||||
<script src="/path/to/locale/zh-cn.js"></script>
|
||||
|
||||
<script>
|
||||
date.locale('zh-cn'); // Chinese
|
||||
date.format(new Date(), 'MMMD日dddd'); // => '1月11日星期一'
|
||||
</script>
|
||||
```
|
||||
|
||||
### NOTE
|
||||
|
||||
- If you want to use ES Modules in Node.js without a transpiler, you need to add `"type": "module"` in your `package.json` or change your file extension from `.js` to `.mjs`.
|
||||
- The locale will be actually switched after executing the `locale()`.
|
||||
- You can also change the locale back to English by importing `en` locale:
|
||||
|
||||
```javascript
|
||||
import en from 'date-and-time/locale/en';
|
||||
|
||||
date.locale(en);
|
||||
```
|
||||
|
||||
## Supported locale List
|
||||
|
||||
At this time, it supports the following locales:
|
||||
|
||||
```text
|
||||
Arabic (ar)
|
||||
Azerbaijani (az)
|
||||
Bengali (bn)
|
||||
Burmese (my)
|
||||
Chinese (zh-cn)
|
||||
Chinese (zh-tw)
|
||||
Czech (cs)
|
||||
Danish (dk)
|
||||
Dutch (nl)
|
||||
English (en)
|
||||
French (fr)
|
||||
German (de)
|
||||
Greek (el)
|
||||
Hindi (hi)
|
||||
Hungarian (hu)
|
||||
Indonesian (id)
|
||||
Italian (it)
|
||||
Japanese (ja)
|
||||
Javanese (jv)
|
||||
Kinyarwanda (rw)
|
||||
Korean (ko)
|
||||
Persian (fa)
|
||||
Polish (pl)
|
||||
Portuguese (pt)
|
||||
Punjabi (pa-in)
|
||||
Romanian (ro)
|
||||
Russian (ru)
|
||||
Serbian (sr)
|
||||
Spanish (es)
|
||||
Swedish (sv)
|
||||
Thai (th)
|
||||
Turkish (tr)
|
||||
Ukrainian (uk)
|
||||
Uzbek (uz)
|
||||
Vietnamese (vi)
|
||||
```
|
||||
488
node_modules/date-and-time/PLUGINS.md
generated
vendored
Normal file
488
node_modules/date-and-time/PLUGINS.md
generated
vendored
Normal file
@ -0,0 +1,488 @@
|
||||
# Plugins
|
||||
|
||||
This library is oriented towards minimalism, so it may seem to some developers to be lacking in features. The plugin is the most realistic solution to such dissatisfaction. By importing plugins, you can extend the functionality of this library, primarily the formatter and parser.
|
||||
|
||||
*The formatter is used in `format()`, etc., the parser is used in `parse()`, `preparse()`, `isValid()`, etc.*
|
||||
|
||||
## Usage
|
||||
|
||||
- ES Modules:
|
||||
|
||||
```javascript
|
||||
import date from 'date-and-time';
|
||||
// Import the plugin named "foobar".
|
||||
import foobar from 'date-and-time/plugin/foobar';
|
||||
|
||||
// Apply the "foobar" to the library.
|
||||
date.plugin(foobar);
|
||||
```
|
||||
|
||||
- CommonJS:
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import the plugin named "foobar".
|
||||
const foobar = require('date-and-time/plugin/foobar');
|
||||
|
||||
// Apply the "foobar" to the library.
|
||||
date.plugin(foobar);
|
||||
```
|
||||
|
||||
- ES Modules for the browser:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import date from '/path/to/date-and-time.es.min.js';
|
||||
// Import the plugin named "foobar".
|
||||
import foobar from '/path/to/date-and-time/plugin/foobar.es.js';
|
||||
|
||||
// Apply the "foobar" to the library.
|
||||
date.plugin(foobar);
|
||||
</script>
|
||||
```
|
||||
|
||||
- Older browser:
|
||||
|
||||
```html
|
||||
<script src="/path/to/date-and-time.min.js"></script>
|
||||
<!-- Import the plugin named "foobar". -->
|
||||
<script src="/path/to/plugin/foobar.js"></script>
|
||||
|
||||
<script>
|
||||
// Apply the "foobar" to the library.
|
||||
date.plugin('foobar');
|
||||
</script>
|
||||
```
|
||||
|
||||
### Note
|
||||
|
||||
- If you want to use ES Modules in Node.js without a transpiler, you need to add `"type": "module"` in your `package.json` or change your file extension from `.js` to `.mjs`.
|
||||
|
||||
## Plugin List
|
||||
|
||||
- [day-of-week](#day-of-week)
|
||||
- It adds *"dummy"* tokens for `day of week` to the parser.
|
||||
|
||||
- [meridiem](#meridiem)
|
||||
- It adds various notations for `AM PM`.
|
||||
|
||||
- [microsecond](#microsecond)
|
||||
- It adds tokens for microsecond to the parser.
|
||||
|
||||
- [ordinal](#ordinal)
|
||||
- It adds ordinal notation of date to the formatter.
|
||||
|
||||
- [timespan](#timespan)
|
||||
- It adds `timeSpan()` function that calculates the difference of two dates to the library.
|
||||
|
||||
- [timezone](#timezone)
|
||||
- It adds `formatTZ()`, `parseTZ()`, `transformTZ()`, `addYearsTZ()`, `addMonthsTZ()` and `addDaysTZ()` that support `IANA time zone names` to the library.
|
||||
|
||||
- [two-digit-year](#two-digit-year)
|
||||
- It adds two-digit year notation to the parser.
|
||||
|
||||
---
|
||||
|
||||
### day-of-week
|
||||
|
||||
It adds tokens for `day of week` to the parser. Although `day of week` is not significant information for the parser to identify a date, these tokens are sometimes useful. For example, when a string to be parsed contains a day of week, and you just want to skip it.
|
||||
|
||||
**formatter:**
|
||||
|
||||
There is no change.
|
||||
|
||||
**parser:**
|
||||
|
||||
| token | meaning | acceptable examples |
|
||||
|:------|:-----------|:--------------------|
|
||||
| dddd | long | Friday, Sunday |
|
||||
| ddd | short | Fri, Sun |
|
||||
| dd | very short | Fr, Su |
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import "day-of-week" plugin as a named "day_of_week".
|
||||
const day_of_week = require('date-and-time/plugin/day-of-week');
|
||||
|
||||
// Apply the "day_of_week" plugin to the library.
|
||||
date.plugin(day_of_week);
|
||||
|
||||
// You can write like this.
|
||||
date.parse('Thursday, March 05, 2020', 'dddd, MMMM, D YYYY');
|
||||
// You can also write like this, but it is not versatile because length of day of week are variant.
|
||||
date.parse('Thursday, March 05, 2020', ' , MMMM, D YYYY');
|
||||
date.parse('Friday, March 06, 2020', ' , MMMM, D YYYY');
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### meridiem
|
||||
|
||||
It adds various notations for AM PM.
|
||||
|
||||
**formatter:**
|
||||
|
||||
| token | meaning | output examples |
|
||||
|:------|:------------------------|:----------------|
|
||||
| AA | uppercase with ellipsis | A.M., P.M. |
|
||||
| a | lowercase | am, pm |
|
||||
| aa | lowercase with ellipsis | a.m., p.m. |
|
||||
|
||||
**parser:**
|
||||
|
||||
| token | meaning | acceptable examples |
|
||||
|:------|:------------------------|:--------------------|
|
||||
| AA | uppercase with ellipsis | A.M., P.M. |
|
||||
| a | lowercase | am, pm |
|
||||
| aa | lowercase with ellipsis | a.m., p.m. |
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import "meridiem" plugin.
|
||||
const meridiem = require('date-and-time/plugin/meridiem');
|
||||
|
||||
// Apply "medidiem" plugin to the library.
|
||||
date.plugin(meridiem);
|
||||
|
||||
// This is default behavior of the formatter.
|
||||
date.format(new Date(), 'hh:mm A'); // => '12:34 PM'
|
||||
|
||||
// These are added tokens to the formatter.
|
||||
date.format(new Date(), 'hh:mm AA'); // => '12:34 P.M.'
|
||||
date.format(new Date(), 'hh:mm a'); // => '12:34 pm'
|
||||
date.format(new Date(), 'hh:mm aa'); // => '12:34 p.m.'
|
||||
|
||||
// This is default behavior of the parser.
|
||||
date.parse('12:34 PM', 'hh:mm A'); // => Jan 1 1970 12:34:00
|
||||
|
||||
// These are added tokens to the parser.
|
||||
date.parse('12:34 P.M.', 'hh:mm AA'); // => Jan 1 1970 12:34:00
|
||||
date.parse('12:34 pm', 'hh:mm a'); // => Jan 1 1970 12:34:00
|
||||
date.parse('12:34 p.m.', 'hh:mm aa'); // => Jan 1 1970 12:34:00
|
||||
```
|
||||
|
||||
This plugin has a **breaking change**. In previous versions, the `A` token for the parser could parse various notations for AM PM, but in the new version, it can only parse `AM` and `PM`. For other notations, a dedicated token is now provided for each.
|
||||
|
||||
---
|
||||
|
||||
### microsecond
|
||||
|
||||
It adds tokens for microsecond to the parser. If a time string to be parsed contains microsecond, these tokens are useful. In JS, however, it is not supported microsecond accuracy, a parsed value is rounded to millisecond accuracy.
|
||||
|
||||
**formatter:**
|
||||
|
||||
There is no change.
|
||||
|
||||
**parser:**
|
||||
|
||||
| token | meaning | acceptable examples |
|
||||
|:-------|:----------------|:--------------------|
|
||||
| SSSSSS | high accuracy | 753123, 022113 |
|
||||
| SSSSS | middle accuracy | 75312, 02211 |
|
||||
| SSSS | low accuracy | 7531, 0221 |
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import "microsecond" plugin.
|
||||
const microsecond = require('date-and-time/plugin/microsecond');
|
||||
|
||||
// Apply "microsecond" plugin to the library.
|
||||
date.plugin(microsecond);
|
||||
|
||||
// A date object in JavaScript supports `millisecond` (ms) like this:
|
||||
date.parse('12:34:56.123', 'HH:mm:ss.SSS');
|
||||
|
||||
// 4 or more digits number sometimes seen is not `millisecond`, probably `microsecond` (μs):
|
||||
date.parse('12:34:56.123456', 'HH:mm:ss.SSSSSS');
|
||||
|
||||
// 123456µs will be rounded to 123ms.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ordinal
|
||||
|
||||
It adds `DDD` token that output ordinal notation of date to the formatter.
|
||||
|
||||
**formatter:**
|
||||
|
||||
| token | meaning | output examples |
|
||||
|:------|:-------------------------|:--------------------|
|
||||
| DDD | ordinal notation of date | 1st, 2nd, 3rd, 31th |
|
||||
|
||||
**parser:**
|
||||
|
||||
There is no change.
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import "ordinal" plugin.
|
||||
const ordinal = require('date-and-time/plugin/ordinal');
|
||||
|
||||
// Apply "ordinal" plugin to the library.
|
||||
date.plugin(ordinal);
|
||||
|
||||
// These are default behavior of the formatter.
|
||||
date.format(new Date(), 'MMM D YYYY'); // => Jan 1 2019
|
||||
date.format(new Date(), 'MMM DD YYYY'); // => Jan 01 2019
|
||||
|
||||
// `DDD` token outputs ordinal number of date.
|
||||
date.format(new Date(), 'MMM DDD YYYY'); // => Jan 1st 2019
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### timespan
|
||||
|
||||
It adds `timeSpan()` function that calculates the difference of two dates to the library. This function is similar to `subtract()`, the difference is that it can format the calculation results.
|
||||
|
||||
#### timeSpan(date1, date2)
|
||||
|
||||
- @param {**Date**} date1 - A Date object
|
||||
- @param {**Date**} date2 - A Date object
|
||||
- @returns {**Object**} The result object of subtracting date2 from date1
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import "timespan" plugin.
|
||||
const timespan = require('date-and-time/plugin/timespan');
|
||||
|
||||
// Apply "timespan" plugin to the library.
|
||||
date.plugin(timespan);
|
||||
|
||||
const now = new Date(2020, 2, 5, 1, 2, 3, 4);
|
||||
const new_years_day = new Date(2020, 0, 1);
|
||||
|
||||
date.timeSpan(now, new_years_day).toDays('D HH:mm:ss.SSS'); // => '64 01:02:03.004'
|
||||
date.timeSpan(now, new_years_day).toHours('H [hours] m [minutes] s [seconds]'); // => '1537 hours 2 minutes 3 seconds'
|
||||
date.timeSpan(now, new_years_day).toMinutes('mmmmmmmmmm [minutes]'); // => '0000092222 minutes'
|
||||
```
|
||||
|
||||
Like `subtract()`, `timeSpan()` returns an object with functions like this:
|
||||
|
||||
| function | description |
|
||||
|:---------------|:------------------------|
|
||||
| toDays | Outputs in dates |
|
||||
| toHours | Outputs in hours |
|
||||
| toMinutes | Outputs in minutes |
|
||||
| toSeconds | Outputs in seconds |
|
||||
| toMilliseconds | Outputs in milliseconds |
|
||||
|
||||
In these functions can be available some tokens to format the calculation result. Here are the tokens and their meanings:
|
||||
|
||||
| function | available tokens |
|
||||
|:---------------|:-----------------|
|
||||
| toDays | D, H, m, s, S |
|
||||
| toHours | H, m, s, S |
|
||||
| toMinutes | m, s, S |
|
||||
| toSeconds | s, S |
|
||||
| toMilliseconds | S |
|
||||
|
||||
| token | meaning |
|
||||
|:------|:------------|
|
||||
| D | date |
|
||||
| H | 24-hour |
|
||||
| m | minute |
|
||||
| s | second |
|
||||
| S | millisecond |
|
||||
|
||||
---
|
||||
|
||||
### timezone
|
||||
|
||||
It adds `formatTZ()`, `parseTZ()`, `transformTZ()`, `addYearsTZ()`, `addMonthsTZ()` and `addDaysTZ()` that support `IANA time zone names` (`America/Los_Angeles`, `Asia/Tokyo`, and so on) to the library.
|
||||
|
||||
#### formatTZ(dateObj, arg[, timeZone])
|
||||
|
||||
- @param {**Date**} dateObj - A Date object
|
||||
- @param {**string|Array.\<string\>**} arg - A format string or its compiled object
|
||||
- @param {**string**} [timeZone] - Output as this time zone
|
||||
- @returns {**string**} A formatted string
|
||||
|
||||
`formatTZ()` is upward compatible with `format()`. Tokens available for `arg` are the same as those for `format()`. If `timeZone` is omitted, this function assumes `timeZone` to be the local time zone and outputs a string. This means that the result is the same as when `format()` is used.
|
||||
|
||||
#### parseTZ(dateString, arg[, timeZone])
|
||||
|
||||
- @param {**string**} dateString - A date and time string
|
||||
- @param {**string|Array.\<string\>**} arg - A format string or its compiled object
|
||||
- @param {**string**} [timeZone] - Input as this time zone
|
||||
- @returns {**Date**} A Date object
|
||||
|
||||
`parseTZ()` is upward compatible with `parse()`. Tokens available for `arg` are the same as those for `parse()`. `timeZone` in this function is used as supplemental information. if `dateString` contains a time zone offset value (i.e. -0800, +0900), `timeZone` is not be used. If `dateString` doesn't contain a time zone offset value and `timeZone` is omitted, this function assumes `timeZone` to be the local time zone. This means that the result is the same as when `parse()` is used.
|
||||
|
||||
#### transformTZ(dateString, arg1, arg2[, timeZone])
|
||||
|
||||
- @param {**string**} dateString - A date and time string
|
||||
- @param {**string|Array.\<string\>**} arg1 - A format string before transformation or its compiled object
|
||||
- @param {**string|Array.\<string\>**} arg2 - A format string after transformation or its compiled object
|
||||
- @param {**string**} [timeZone] - Output as this time zone
|
||||
- @returns {**string**} A formatted string
|
||||
|
||||
`transformTZ()` is upward compatible with `transform()`. `dateString` must itself contain a time zone offset value (i.e. -0800, +0900), otherwise this function assumes it is the local time zone. Tokens available for `arg1` are the same as those for `parse()`, also tokens available for `arg2` are the same as those for `format()`. `timeZone` is a `IANA time zone names`, which is required to output a new formatted string. If it is omitted, this function assumes `timeZone` to be the local time zone. This means that the result is the same as when `transform()` is used.
|
||||
|
||||
#### addYearsTZ(dateObj, years[, timeZone])
|
||||
|
||||
- @param {**Date**} dateObj - A Date object
|
||||
- @param {**number**} years - The number of years to add
|
||||
- @param {**string**} [timeZone] - The time zone to use for the calculation
|
||||
- @returns {**Date**} The Date object after adding the specified number of years
|
||||
|
||||
`addYearsTZ()` can calculate adding years in the specified time zone regardless of the execution environment.
|
||||
|
||||
#### addMonthsTZ(dateObj, months[, timeZone])
|
||||
|
||||
- @param {**Date**} dateObj - A Date object
|
||||
- @param {**number**} months - The number of months to add
|
||||
- @param {**string**} [timeZone] - The time zone to use for the calculation
|
||||
- @returns {**Date**} The Date object after adding the specified number of months
|
||||
|
||||
`addMonthsTZ()` can calculate adding months in the specified time zone regardless of the execution environment.
|
||||
|
||||
#### addDaysTZ(dateObj, days[, timeZone])
|
||||
|
||||
- @param {**Date**} dateObj - A Date object
|
||||
- @param {**number**} days - The number of days to add
|
||||
- @param {**string**} [timeZone] - The time zone to use for the calculation
|
||||
- @returns {**Date**} The Date object after adding the specified number of days
|
||||
|
||||
`addDaysTZ()` can calculate adding days in the specified time zone regardless of the execution environment.
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import "timezone" plugin.
|
||||
const timezone = require('date-and-time/plugin/timezone');
|
||||
|
||||
// Apply "timezone" plugin to the library.
|
||||
date.plugin(timezone);
|
||||
|
||||
const d1 = new Date(Date.UTC(2021, 2, 14, 9, 59, 59, 999)); // 2021-03-14T09:59:59.999Z
|
||||
date.formatTZ(d1, 'MMMM DD YYYY H:mm:ss.SSS [UTC]Z', 'America/Los_Angeles'); // March 14 2021 1:59:59.999 UTC-0800
|
||||
|
||||
const d2 = new Date(Date.UTC(2021, 2, 14, 10, 0, 0, 0)); // 2021-03-14T10:00:00.000Z
|
||||
date.formatTZ(d2, 'MMMM DD YYYY H:mm:ss.SSS [UTC]Z', 'America/Los_Angeles'); // March 14 2021 3:00:00.000 UTC-0700
|
||||
|
||||
// Parses the date string assuming that the time zone is "Pacific/Honolulu" (UTC-1000).
|
||||
date.parseTZ('Sep 25 2021 4:00:00', 'MMM D YYYY H:mm:ss', 'Pacific/Honolulu'); // 2021-09-25T14:00:00.000Z
|
||||
|
||||
// Parses the date string assuming that the time zone is "Europe/London" (UTC+0100).
|
||||
date.parseTZ('Sep 25 2021 4:00:00', 'MMM D YYYY H:mm:ss', 'Europe/London'); // 2021-09-25T03:00:00.000Z
|
||||
|
||||
// Transforms the date string from EST (Eastern Standard Time) to PDT (Pacific Daylight Time).
|
||||
date.transformTZ('2021-11-07T03:59:59 UTC-0500', 'YYYY-MM-DD[T]HH:mm:ss [UTC]Z', 'MMMM D YYYY H:mm:ss UTC[Z]', 'America/Los_Angeles'); // November 7 2021 1:59:59 UTC-0700
|
||||
|
||||
// Transforms the date string from PDT(Pacific Daylight Time) to JST (Japan Standard Time).
|
||||
date.transformTZ('2021-03-14T03:00:00 UTC-0700', 'YYYY-MM-DD[T]HH:mm:ss [UTC]Z', 'MMMM D YYYY H:mm:ss UTC[Z]', 'Asia/Tokyo'); // March 14 2021 19:00:00 UTC+0900
|
||||
```
|
||||
|
||||
#### Caveats
|
||||
|
||||
- This plugin uses the [Intl](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl) object to parse `IANA time zone names`. Note that if you use this plugin in older browsers, this may **NOT** be supported there. At least it does not work in IE.
|
||||
- If you don't need to use `IANA time zone names`, you should not use this plugin for performance reasons. Recommended to use `format()` and `parse()`.
|
||||
|
||||
#### Start of DST (Daylight Saving Time)
|
||||
|
||||
For example, in the US, when local standard time is about to reach `02:00:00` on Sunday, 14 March 2021, the clocks are set `forward` by 1 hour to `03:00:00` local daylight time instead. As a result, the time from `02:00:00` to `02:59:59` on 14 March 2021 does not exist. In such edge cases, `parseTZ()` will handle the case in the following way:
|
||||
|
||||
```javascript
|
||||
date.parseTZ('Mar 14 2021 1:59:59', 'MMM D YYYY H:mm:ss', 'America/Los_Angeles'); // => 2021-03-14T09:59:59Z
|
||||
date.parseTZ('Mar 14 2021 3:00:00', 'MMM D YYYY H:mm:ss', 'America/Los_Angeles'); // => 2021-03-14T10:00:00Z
|
||||
|
||||
// These times don't actually exist, but parseTZ() will handle as follows:
|
||||
date.parseTZ('Mar 14 2021 2:00:00', 'MMM D YYYY H:mm:ss', 'America/Los_Angeles'); // => 2021-03-14T10:00:00Z
|
||||
date.parseTZ('Mar 14 2021 2:59:59', 'MMM D YYYY H:mm:ss', 'America/Los_Angeles'); // => 2021-03-14T10:59:59Z
|
||||
```
|
||||
|
||||
#### End of DST
|
||||
|
||||
Also, when local daylight time is about to reach `02:00:00` on Sunday, 7 November 2021, the clocks are set `back` by 1 hour to `01:00:00` local standard time instead. As a result, the time from `01:00:00` to `01:59:59` on 7 November 2021 occurs twice. Because this time period happens twice, `parseTZ()` assumes that the time is the earlier one (during DST) in order to make the result unique:
|
||||
|
||||
```javascript
|
||||
// This time is DST or PST? The parseTZ() always assumes that it is DST.
|
||||
date.parseTZ('Nov 7 2021 1:59:59', 'MMM D YYYY H:mm:ss', 'America/Los_Angeles'); // => 2021-11-07T08:59:59Z
|
||||
// This time is already PST.
|
||||
date.parseTZ('Nov 7 2021 2:00:00', 'MMM D YYYY H:mm:ss', 'America/Los_Angeles'); // => 2021-11-07T10:00:00Z
|
||||
```
|
||||
|
||||
In the first example above, if you want `parseTZ()` to parse the time as PST, you need to pass a date string containing the time zone offset value. In this case, it is better to use `parse()` instead:
|
||||
|
||||
```javascript
|
||||
date.parse('Nov 7 2021 1:59:59 -0800', 'MMM D YYYY H:mm:ss Z'); // => 2021-11-07T09:59:59Z
|
||||
```
|
||||
|
||||
#### Token Extension
|
||||
|
||||
This plugin also adds tokens for time zone name to the formatter.
|
||||
|
||||
**formatter:**
|
||||
|
||||
| token | meaning | output examples |
|
||||
|:------|:----------------------------|:----------------------|
|
||||
| z | time zone name abbreviation | PST, EST |
|
||||
| zz | time zone name | Pacific Standard Time |
|
||||
|
||||
The `z` and `zz` are lowercase. Also, currently it does not support output other than English.
|
||||
|
||||
**parser:**
|
||||
|
||||
There is no change.
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import "timezone" plugin.
|
||||
const timezone = require('date-and-time/plugin/timezone');
|
||||
|
||||
// Apply "timezone" plugin to the library.
|
||||
date.plugin(timezone);
|
||||
|
||||
const d1 = new Date(Date.UTC(2021, 2, 14, 9, 59, 59, 999));
|
||||
date.format(d1, 'MMMM DD YYYY H:mm:ss.SSS zz');
|
||||
// March 14 2021 1:59:59.999 Pacific Standard Time
|
||||
|
||||
date.format(d1, 'MMMM DD YYYY H:mm:ss.SSS zz', true);
|
||||
// March 14 2021 9:59:59.999 Coordinated Universal Time
|
||||
|
||||
date.formatTZ(d1, 'MMMM DD YYYY H:mm:ss.SSS z', 'Asia/Tokyo');
|
||||
// March 14 2021 18:59:59.999 JST
|
||||
|
||||
// Transforms the date string from EST (Eastern Standard Time) to PDT (Pacific Daylight Time).
|
||||
date.transform('2021-11-07T03:59:59 UTC-0500', 'YYYY-MM-DD[T]HH:mm:ss [UTC]Z', 'MMMM D YYYY H:mm:ss z');
|
||||
// November 7 2021 1:59:59 PDT
|
||||
```
|
||||
---
|
||||
|
||||
### two-digit-year
|
||||
|
||||
It adds `YY` token to the parser. This token will convert the year 69 or earlier to 2000s, the year 70 or later to 1900s. In brief:
|
||||
|
||||
| examples | result |
|
||||
|:------------------------|:-------|
|
||||
| 00, 01, 02, ..., 68, 69 | 2000s |
|
||||
| 70, 71, 72, ..., 98, 99 | 1900s |
|
||||
|
||||
**formatter:**
|
||||
|
||||
There is no change.
|
||||
|
||||
**parser:**
|
||||
|
||||
| token | meaning | acceptable examples |
|
||||
|:------|:---------------|:--------------------|
|
||||
| YY | two-digit year | 90, 00, 08, 19 |
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import "two-digit-year" plugin as a named "two_digit_year".
|
||||
const two_digit_year = require('date-and-time/plugin/two-digit-year');
|
||||
|
||||
// This is the default behavior of the parser.
|
||||
date.parse('Dec 25 69', 'MMM D YY'); // => Invalid Date
|
||||
|
||||
// Apply the "two_digit_year" plugin to the library.
|
||||
date.plugin(two_digit_year);
|
||||
|
||||
// The `YY` token convert the year 69 or earlier to 2000s, the year 70 or later to 1900s.
|
||||
date.parse('Dec 25 69', 'MMM D YY'); // => Dec 25 2069
|
||||
date.parse('Dec 25 70', 'MMM D YY'); // => Dec 25 1970
|
||||
```
|
||||
|
||||
This plugin has a **breaking change**. In previous versions, this plugin overrode the default behavior of the `Y` token, but this has been obsolete.
|
||||
641
node_modules/date-and-time/README.md
generated
vendored
Normal file
641
node_modules/date-and-time/README.md
generated
vendored
Normal file
@ -0,0 +1,641 @@
|
||||
# date-and-time
|
||||
|
||||
[](https://circleci.com/gh/knowledgecode/date-and-time)
|
||||
|
||||
This JS library is just a collection of functions for manipulating date and time. It's small, simple, and easy to learn.
|
||||
|
||||
## Why
|
||||
|
||||
Nowadays, JS modules have become larger, more complex, and dependent on many other modules. It is important to strive for simplicity and smallness, especially for modules that are at the bottom of the dependency chain, such as those that handle date and time.
|
||||
|
||||
## Features
|
||||
|
||||
- Minimalist. Approximately 2k. (minified and gzipped)
|
||||
- Extensible. Plugin system support.
|
||||
- Multi language support.
|
||||
- Universal / Isomorphic. Works anywhere.
|
||||
- TypeScript support.
|
||||
- Older browser support. Even works on IE6. :)
|
||||
|
||||
## Install
|
||||
|
||||
```shell
|
||||
npm i date-and-time
|
||||
```
|
||||
|
||||
## Recent Changes
|
||||
|
||||
- 3.6.0
|
||||
- In `parseTZ()`, enabled parsing of the missing hour during the transition from standard time to daylight saving time into a Date type.
|
||||
- In `format()` with the `z` token, fixed an issue where some short time zone names were incorrect.
|
||||
|
||||
- 3.5.0
|
||||
- Added `addYearsTZ()`, `addMonthsTZ()`, and `addDaysTZ()` to the `timezone` plugin.
|
||||
- Revised the approach to adding time and removed the third parameter from `addHours()`, `addMinutes()`, `addSeconds()`, and `addMilliseconds()`.
|
||||
|
||||
- 3.4.1
|
||||
- Fixed an issue where `formatTZ()` would output 0:00 as 24:00 in 24-hour format in Node.js.
|
||||
|
||||
## Usage
|
||||
|
||||
- ES Modules:
|
||||
|
||||
```javascript
|
||||
import date from 'date-and-time';
|
||||
```
|
||||
|
||||
- CommonJS:
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
```
|
||||
|
||||
- ES Modules for the browser:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import date from '/path/to/date-and-time.es.min.js';
|
||||
</script>
|
||||
```
|
||||
|
||||
- Older browser:
|
||||
|
||||
```html
|
||||
<script src="/path/to/date-and-time.min.js">
|
||||
// You will be able to access the global variable `date`.
|
||||
</script>
|
||||
```
|
||||
|
||||
### Note
|
||||
|
||||
- If you want to use ES Modules in Node.js without the transpiler, you need to add `"type": "module"` in your `package.json` or change your file extension from `.js` to `.mjs`.
|
||||
- If you are using TypeScript and having trouble building, please ensure that the following settings in the `compilerOptions` of your `tsconfig.json` are set to `true`.
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
- [format](#formatdateobj-arg-utc)
|
||||
- Formatting date and time objects (Date -> String)
|
||||
|
||||
- [parse](#parsedatestring-arg-utc)
|
||||
- Parsing date and time strings (String -> Date)
|
||||
|
||||
- [compile](#compileformatstring)
|
||||
- Compiling format strings
|
||||
|
||||
- [preparse](#preparsedatestring-arg)
|
||||
- Pre-parsing date and time strings
|
||||
|
||||
- [isValid](#isvalidarg1-arg2)
|
||||
- Date and time string validation
|
||||
|
||||
- [transform](#transformdatestring-arg1-arg2-utc)
|
||||
- Format transformation of date and time strings (String -> String)
|
||||
|
||||
- [addYears](#addyearsdateobj-years-utc)
|
||||
- Adding years
|
||||
|
||||
- [addMonths](#addmonthsdateobj-months-utc)
|
||||
- Adding months
|
||||
|
||||
- [addDays](#adddaysdateobj-days-utc)
|
||||
- Adding days
|
||||
|
||||
- [addHours](#addhoursdateobj-hours)
|
||||
- Adding hours
|
||||
|
||||
- [addMinutes](#addminutesdateobj-minutes)
|
||||
- Adding minutes
|
||||
|
||||
- [addSeconds](#addsecondsdateobj-seconds)
|
||||
- Adding seconds
|
||||
|
||||
- [addMilliseconds](#addmillisecondsdateobj-milliseconds)
|
||||
- Adding milliseconds
|
||||
|
||||
- [subtract](#subtractdate1-date2)
|
||||
- Subtracting two dates (date1 - date2)
|
||||
|
||||
- [isLeapYear](#isleapyeary)
|
||||
- Whether a year is a leap year
|
||||
|
||||
- [isSameDay](#issamedaydate1-date2)
|
||||
- Comparison of two dates
|
||||
|
||||
- [locale](#localelocale)
|
||||
- Changing locales
|
||||
|
||||
- [extend](#extendextension)
|
||||
- Functional extension
|
||||
|
||||
- [plugin](#pluginplugin)
|
||||
- Importing plugins
|
||||
|
||||
### format(dateObj, arg[, utc])
|
||||
|
||||
- @param {**Date**} dateObj - A Date object
|
||||
- @param {**string|Array.\<string\>**} arg - A format string or its compiled object
|
||||
- @param {**boolean**} [utc] - Output as UTC
|
||||
- @returns {**string**} A formatted string
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
date.format(now, 'YYYY/MM/DD HH:mm:ss'); // => '2015/01/02 23:14:05'
|
||||
date.format(now, 'ddd, MMM DD YYYY'); // => 'Fri, Jan 02 2015'
|
||||
date.format(now, 'hh:mm A [GMT]Z'); // => '11:14 PM GMT-0800'
|
||||
date.format(now, 'hh:mm A [GMT]Z', true); // => '07:14 AM GMT+0000'
|
||||
|
||||
const pattern = date.compile('ddd, MMM DD YYYY');
|
||||
date.format(now, pattern); // => 'Fri, Jan 02 2015'
|
||||
```
|
||||
|
||||
Available tokens and their meanings are as follows:
|
||||
|
||||
| token | meaning | examples of output |
|
||||
|:------|:-------------------------------------|:-------------------|
|
||||
| YYYY | four-digit year | 0999, 2015 |
|
||||
| YY | two-digit year | 99, 01, 15 |
|
||||
| Y | four-digit year without zero-padding | 2, 44, 888, 2015 |
|
||||
| MMMM | month name (long) | January, December |
|
||||
| MMM | month name (short) | Jan, Dec |
|
||||
| MM | month with zero-padding | 01, 12 |
|
||||
| M | month | 1, 12 |
|
||||
| DD | date with zero-padding | 02, 31 |
|
||||
| D | date | 2, 31 |
|
||||
| dddd | day of week (long) | Friday, Sunday |
|
||||
| ddd | day of week (short) | Fri, Sun |
|
||||
| dd | day of week (very short) | Fr, Su |
|
||||
| HH | 24-hour with zero-padding | 23, 08 |
|
||||
| H | 24-hour | 23, 8 |
|
||||
| hh | 12-hour with zero-padding | 11, 08 |
|
||||
| h | 12-hour | 11, 8 |
|
||||
| A | meridiem (uppercase) | AM, PM |
|
||||
| mm | minute with zero-padding | 14, 07 |
|
||||
| m | minute | 14, 7 |
|
||||
| ss | second with zero-padding | 05, 10 |
|
||||
| s | second | 5, 10 |
|
||||
| SSS | millisecond (high accuracy) | 753, 022 |
|
||||
| SS | millisecond (middle accuracy) | 75, 02 |
|
||||
| S | millisecond (low accuracy) | 7, 0 |
|
||||
| Z | time zone offset value | +0100, -0800 |
|
||||
| ZZ | time zone offset value with colon | +01:00, -08:00 |
|
||||
|
||||
You can also use the following tokens by importing plugins. See [PLUGINS.md](./PLUGINS.md) for details.
|
||||
|
||||
| token | meaning | examples of output |
|
||||
|:------|:-------------------------------------|:----------------------|
|
||||
| DDD | ordinal notation of date | 1st, 2nd, 3rd |
|
||||
| AA | meridiem (uppercase with ellipsis) | A.M., P.M. |
|
||||
| a | meridiem (lowercase) | am, pm |
|
||||
| aa | meridiem (lowercase with ellipsis) | a.m., p.m. |
|
||||
| z | time zone name abbreviation | PST, EST |
|
||||
| zz | time zone name | Pacific Standard Time |
|
||||
|
||||
#### Note 1. Comments
|
||||
|
||||
Parts of the given format string enclosed in square brackets are considered comments and are output as is, regardless of whether they are tokens or not.
|
||||
|
||||
```javascript
|
||||
date.format(new Date(), 'DD-[MM]-YYYY'); // => '02-MM-2015'
|
||||
date.format(new Date(), '[DD-[MM]-YYYY]'); // => 'DD-[MM]-YYYY'
|
||||
```
|
||||
|
||||
#### Note 2. Output as UTC
|
||||
|
||||
This function outputs the date and time in the local time zone of the execution environment by default. If you want to output in UTC, set the UTC option (the third argument) to true. To output in any other time zone, you will need [a plugin](./PLUGINS.md).
|
||||
|
||||
```javascript
|
||||
date.format(new Date(), 'hh:mm A [GMT]Z'); // => '11:14 PM GMT-0800'
|
||||
date.format(new Date(), 'hh:mm A [GMT]Z', true); // => '07:14 AM GMT+0000'
|
||||
```
|
||||
|
||||
#### Note 3. More Tokens
|
||||
|
||||
You can also define your own tokens. See [EXTEND.md](./EXTEND.md) for details.
|
||||
|
||||
### parse(dateString, arg[, utc])
|
||||
|
||||
- @param {**string**} dateString - A date and time string
|
||||
- @param {**string|Array.\<string\>**} arg - A format string or its compiled object
|
||||
- @param {**boolean**} [utc] - Input as UTC
|
||||
- @returns {**Date**} A Date object
|
||||
|
||||
```javascript
|
||||
date.parse('2015/01/02 23:14:05', 'YYYY/MM/DD HH:mm:ss'); // => Jan 2 2015 23:14:05 GMT-0800
|
||||
date.parse('02-01-2015', 'DD-MM-YYYY'); // => Jan 2 2015 00:00:00 GMT-0800
|
||||
date.parse('11:14:05 PM', 'hh:mm:ss A'); // => Jan 1 1970 23:14:05 GMT-0800
|
||||
date.parse('11:14:05 PM', 'hh:mm:ss A', true); // => Jan 1 1970 23:14:05 GMT+0000 (Jan 1 1970 15:14:05 GMT-0800)
|
||||
date.parse('23:14:05 GMT+0900', 'HH:mm:ss [GMT]Z'); // => Jan 1 1970 23:14:05 GMT+0900 (Jan 1 1970 06:14:05 GMT-0800)
|
||||
date.parse('Jam 1 2017', 'MMM D YYYY'); // => Invalid Date
|
||||
date.parse('Feb 29 2017', 'MMM D YYYY'); // => Invalid Date
|
||||
```
|
||||
|
||||
Available tokens and their meanings are as follows:
|
||||
|
||||
| token | meaning | examples of acceptable form |
|
||||
|:-------|:-------------------------------------|:----------------------------|
|
||||
| YYYY | four-digit year | 0999, 2015 |
|
||||
| Y | four-digit year without zero-padding | 2, 44, 88, 2015 |
|
||||
| MMMM | month name (long) | January, December |
|
||||
| MMM | month name (short) | Jan, Dec |
|
||||
| MM | month with zero-padding | 01, 12 |
|
||||
| M | month | 1, 12 |
|
||||
| DD | date with zero-padding | 02, 31 |
|
||||
| D | date | 2, 31 |
|
||||
| HH | 24-hour with zero-padding | 23, 08 |
|
||||
| H | 24-hour | 23, 8 |
|
||||
| hh | 12-hour with zero-padding | 11, 08 |
|
||||
| h | 12-hour | 11, 8 |
|
||||
| A | meridiem (uppercase) | AM, PM |
|
||||
| mm | minute with zero-padding | 14, 07 |
|
||||
| m | minute | 14, 7 |
|
||||
| ss | second with zero-padding | 05, 10 |
|
||||
| s | second | 5, 10 |
|
||||
| SSS | millisecond (high accuracy) | 753, 022 |
|
||||
| SS | millisecond (middle accuracy) | 75, 02 |
|
||||
| S | millisecond (low accuracy) | 7, 0 |
|
||||
| Z | time zone offset value | +0100, -0800 |
|
||||
| ZZ | time zone offset value with colon | +01:00, -08:00 |
|
||||
|
||||
You can also use the following tokens by importing plugins. See [PLUGINS.md](./PLUGINS.md) for details.
|
||||
|
||||
| token | meaning | examples of acceptable form |
|
||||
|:-------|:-------------------------------------|:----------------------------|
|
||||
| YY | two-digit year | 90, 00, 08, 19 |
|
||||
| AA | meridiem (uppercase with ellipsis) | A.M., P.M. |
|
||||
| a | meridiem (lowercase) | am, pm |
|
||||
| aa | meridiem (lowercase with ellipsis) | a.m., p.m. |
|
||||
| dddd | day of week (long) | Friday, Sunday |
|
||||
| ddd | day of week (short) | Fri, Sun |
|
||||
| dd | day of week (very short) | Fr, Su |
|
||||
| SSSSSS | microsecond (high accuracy) | 123456, 000001 |
|
||||
| SSSSS | microsecond (middle accuracy) | 12345, 00001 |
|
||||
| SSSS | microsecond (low accuracy) | 1234, 0001 |
|
||||
|
||||
#### Note 1. Invalid Date
|
||||
|
||||
If this function fails to parse, it will return `Invalid Date`. Notice that the `Invalid Date` is a Date object, not `NaN` or `null`. You can tell whether the Date object is invalid as follows:
|
||||
|
||||
```javascript
|
||||
const today = date.parse('Jam 1 2017', 'MMM D YYYY');
|
||||
|
||||
if (isNaN(today.getTime())) {
|
||||
// Failure
|
||||
}
|
||||
```
|
||||
|
||||
#### Note 2. Input as UTC
|
||||
|
||||
This function uses the local time zone offset value of the execution environment by default if the given string does not contain a time zone offset value. To make it use UTC instead, set the UTC option (the third argument) to true. If you want it to use any other time zone, you will need [a plugin](./PLUGINS.md).
|
||||
|
||||
```javascript
|
||||
date.parse('11:14:05 PM', 'hh:mm:ss A'); // => Jan 1 1970 23:14:05 GMT-0800
|
||||
date.parse('11:14:05 PM', 'hh:mm:ss A', true); // => Jan 1 1970 23:14:05 GMT+0000 (Jan 1 1970 15:14:05 GMT-0800)
|
||||
```
|
||||
|
||||
#### Note 3. Default Date Time
|
||||
|
||||
Default date is `January 1, 1970`, time is `00:00:00.000`. Values not passed will be complemented with them:
|
||||
|
||||
```javascript
|
||||
date.parse('11:14:05 PM', 'hh:mm:ss A'); // => Jan 1 1970 23:14:05 GMT-0800
|
||||
date.parse('Feb 2000', 'MMM YYYY'); // => Feb 1 2000 00:00:00 GMT-0800
|
||||
```
|
||||
|
||||
#### Note 4. Max Date / Min Date
|
||||
|
||||
Parsable maximum date is `December 31, 9999`, minimum date is `January 1, 0001`.
|
||||
|
||||
```javascript
|
||||
date.parse('Dec 31 9999', 'MMM D YYYY'); // => Dec 31 9999 00:00:00 GMT-0800
|
||||
date.parse('Dec 31 10000', 'MMM D YYYY'); // => Invalid Date
|
||||
|
||||
date.parse('Jan 1 0001', 'MMM D YYYY'); // => Jan 1 0001 00:00:00 GMT-0800
|
||||
date.parse('Jan 1 0000', 'MMM D YYYY'); // => Invalid Date
|
||||
```
|
||||
|
||||
#### Note 5. 12-hour notation and Meridiem
|
||||
|
||||
If use `hh` or `h` (12-hour) token, use together `A` (meridiem) token to get the right value.
|
||||
|
||||
```javascript
|
||||
date.parse('11:14:05', 'hh:mm:ss'); // => Jan 1 1970 11:14:05 GMT-0800
|
||||
date.parse('11:14:05 PM', 'hh:mm:ss A'); // => Jan 1 1970 23:14:05 GMT-0800
|
||||
```
|
||||
|
||||
#### Note 6. Token invalidation
|
||||
|
||||
Any part of the given format string that you do not want to be recognized as a token should be enclosed in square brackets. They are considered comments and will not be parsed.
|
||||
|
||||
```javascript
|
||||
date.parse('12 hours 34 minutes', 'HH hours mm minutes'); // => Invalid Date
|
||||
date.parse('12 hours 34 minutes', 'HH [hours] mm [minutes]'); // => Jan 1 1970 12:34:00 GMT-0800
|
||||
```
|
||||
|
||||
#### Note 7. Wildcard
|
||||
|
||||
Whitespace acts as a wildcard token. This token will not parse the corresponding parts of the date and time strings. This behavior is similar to enclosing part of a format string in square brackets (Token invalidation), but with the flexibility that the contents do not have to match, as long as the number of characters in the corresponding parts match.
|
||||
|
||||
```javascript
|
||||
// This will be an error.
|
||||
date.parse('2015/01/02 11:14:05', 'YYYY/MM/DD'); // => Invalid Date
|
||||
// Adjust the length of the format string by appending white spaces of the same length as a part to ignore to the end of it.
|
||||
date.parse('2015/01/02 11:14:05', 'YYYY/MM/DD '); // => Jan 2 2015 00:00:00 GMT-0800
|
||||
```
|
||||
|
||||
#### Note 8. Ellipsis
|
||||
|
||||
`...` token ignores subsequent corresponding date and time strings. Use this token only at the end of a format string. The above example can be also written like this:
|
||||
|
||||
```javascript
|
||||
date.parse('2015/01/02 11:14:05', 'YYYY/MM/DD...'); // => Jan 2 2015 00:00:00 GMT-0800
|
||||
```
|
||||
|
||||
### compile(formatString)
|
||||
|
||||
- @param {**string**} formatString - A format string
|
||||
- @returns {**Array.\<string\>**} A compiled object
|
||||
|
||||
If you are going to execute the `format()`, the `parse()` or the `isValid()` so many times with one string format, recommended to precompile and reuse it for performance.
|
||||
|
||||
```javascript
|
||||
const pattern = date.compile('MMM D YYYY h:m:s A');
|
||||
|
||||
date.parse('Mar 22 2019 2:54:21 PM', pattern);
|
||||
date.parse('Jul 27 2019 4:15:24 AM', pattern);
|
||||
date.parse('Dec 25 2019 3:51:11 AM', pattern);
|
||||
|
||||
date.format(new Date(), pattern); // => Mar 16 2020 6:24:56 PM
|
||||
```
|
||||
|
||||
### preparse(dateString, arg)
|
||||
|
||||
- @param {**string**} dateString - A date and time string
|
||||
- @param {**string|Array.\<string\>**} arg - A format string or its compiled object
|
||||
- @returns {**Object**} A pre-parsed result object
|
||||
|
||||
This function takes exactly the same parameters with the `parse()`, but returns a date structure as follows unlike that:
|
||||
|
||||
```javascript
|
||||
date.preparse('Fri Jan 2015 02 23:14:05 GMT-0800', ' MMM YYYY DD HH:mm:ss [GMT]Z');
|
||||
|
||||
{
|
||||
Y: 2015, // Year
|
||||
M: 1, // Month
|
||||
D: 2, // Day
|
||||
H: 23, // 24-hour
|
||||
A: 0, // Meridiem
|
||||
h: 0, // 12-hour
|
||||
m: 14, // Minute
|
||||
s: 5, // Second
|
||||
S: 0, // Millisecond
|
||||
Z: 480, // Timsezone offset
|
||||
_index: 33, // Pointer offset
|
||||
_length: 33, // Length of the date string
|
||||
_match: 7 // Token matching count
|
||||
}
|
||||
```
|
||||
|
||||
This date structure provides a parsing result. You will be able to tell from it how the date string was parsed(, or why the parsing was failed).
|
||||
|
||||
### isValid(arg1[, arg2])
|
||||
|
||||
- @param {**Object|string**} arg1 - A pre-parsed result object or a date and time string
|
||||
- @param {**string|Array.\<string\>**} [arg2] - A format string or its compiled object
|
||||
- @returns {**boolean**} Whether the date and time string is a valid date and time
|
||||
|
||||
This function takes either exactly the same parameters with the `parse()` or a date structure which the `preparse()` returns, evaluates the validity of them.
|
||||
|
||||
```javascript
|
||||
date.isValid('2015/01/02 23:14:05', 'YYYY/MM/DD HH:mm:ss'); // => true
|
||||
date.isValid('29-02-2015', 'DD-MM-YYYY'); // => false
|
||||
```
|
||||
|
||||
```javascript
|
||||
const result = date.preparse('2015/01/02 23:14:05', 'YYYY/MM/DD HH:mm:ss');
|
||||
date.isValid(result); // => true
|
||||
```
|
||||
|
||||
### transform(dateString, arg1, arg2[, utc])
|
||||
|
||||
- @param {**string**} dateString - A date and time string
|
||||
- @param {**string|Array.\<string\>**} arg1 - A format string or its compiled object before transformation
|
||||
- @param {**string|Array.\<string\>**} arg2 - A format string or its compiled object after transformation
|
||||
- @param {**boolean**} [utc] - Output as UTC
|
||||
- @returns {**string**} A formatted string
|
||||
|
||||
This function transforms the format of a date string. The 2nd parameter, `arg1`, is the format string of it. Available token list is equal to the `parse()`'s. The 3rd parameter, `arg2`, is the transformed format string. Available token list is equal to the `format()`'s.
|
||||
|
||||
```javascript
|
||||
// 3/8/2020 => 8/3/2020
|
||||
date.transform('3/8/2020', 'D/M/YYYY', 'M/D/YYYY');
|
||||
|
||||
// 13:05 => 01:05 PM
|
||||
date.transform('13:05', 'HH:mm', 'hh:mm A');
|
||||
```
|
||||
|
||||
### addYears(dateObj, years[, utc])
|
||||
|
||||
- @param {**Date**} dateObj - A Date object
|
||||
- @param {**number**} years - The number of years to add
|
||||
- @param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`
|
||||
- @returns {**Date**} The Date object after adding the specified number of years
|
||||
|
||||
Adds years to a date object. Subtraction is also possible by specifying a negative value. If the third parameter is false or omitted, this function calculates based on the system's default time zone. If you need to obtain calculation results based on a specific time zone regardless of the execution system, consider using the `addYearsTZ()`, which allows you to specify a time zone name as the third parameter. See [PLUGINS.md](./PLUGINS.md) for details.
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const next_year = date.addYears(now, 1);
|
||||
```
|
||||
|
||||
Exceptional behavior of the calculation for the last day of the month:
|
||||
|
||||
```javascript
|
||||
const now = new Date(Date.UTC(2020, 1, 29)); // => Feb 29 2020
|
||||
const next_year = date.addYears(now, 1, true); // => Feb 28 2021
|
||||
const next_next_year = date.addYears(next_year, 1, true); // => Feb 28 2022
|
||||
```
|
||||
|
||||
### addMonths(dateObj, months[, utc])
|
||||
|
||||
- @param {**Date**} dateObj - A Date object
|
||||
- @param {**number**} months - The number of months to add
|
||||
- @param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`
|
||||
- @returns {**Date**} The Date object after adding the specified number of months
|
||||
|
||||
Adds months to a date object. Subtraction is also possible by specifying a negative value. If the third parameter is false or omitted, this function calculates based on the system's default time zone. If you need to obtain calculation results based on a specific time zone regardless of the execution system, consider using the `addMonthsTZ()`, which allows you to specify a time zone name as the third parameter. See [PLUGINS.md](./PLUGINS.md) for details.
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const next_month = date.addMonths(now, 1);
|
||||
```
|
||||
|
||||
Exceptional behavior of the calculation for the last day of the month:
|
||||
|
||||
```javascript
|
||||
const now = new Date(Date.UTC(2023, 0, 31)); // => Jan 31 2023
|
||||
const next_month = date.addMonths(now, 1, true); // => Feb 28 2023
|
||||
const next_next_month = date.addMonths(next_month, 1, true); // => Mar 28 2023
|
||||
```
|
||||
|
||||
### addDays(dateObj, days[, utc])
|
||||
|
||||
- @param {**Date**} dateObj - A Date object
|
||||
- @param {**number**} days - The number of days to add
|
||||
- @param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`
|
||||
- @returns {**Date**} The Date object after adding the specified number of days
|
||||
|
||||
Adds days to a date object. Subtraction is also possible by specifying a negative value. If the third parameter is false or omitted, this function calculates based on the system's default time zone. If you need to obtain calculation results based on a specific time zone regardless of the execution system, consider using the `addDaysTZ()`, which allows you to specify a time zone name as the third parameter. See [PLUGINS.md](./PLUGINS.md) for details.
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const yesterday = date.addDays(now, -1);
|
||||
```
|
||||
|
||||
### addHours(dateObj, hours)
|
||||
|
||||
- @param {**Date**} dateObj - A Date object
|
||||
- @param {**number**} hours - The number of hours to add
|
||||
- ~~@param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`~~ `Removed in: v3.5.0`
|
||||
- @returns {**Date**} The Date object after adding the specified number of hours
|
||||
|
||||
Adds hours to a date object. Subtraction is also possible by specifying a negative value. The third parameter was deprecated in version 3.5.0. Regardless of what is specified for this parameter, the calculation results will not change.
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const an_hour_ago = date.addHours(now, -1);
|
||||
```
|
||||
|
||||
### addMinutes(dateObj, minutes)
|
||||
|
||||
- @param {**Date**} dateObj - A Date object
|
||||
- @param {**number**} minutes - The number of minutes to add
|
||||
- ~~@param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`~~ `Removed in: v3.5.0`
|
||||
- @returns {**Date**} The Date object after adding the specified number of minutes
|
||||
|
||||
Adds minutes to a date object. Subtraction is also possible by specifying a negative value. The third parameter was deprecated in version 3.5.0. Regardless of what is specified for this parameter, the calculation results will not change.
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const two_minutes_later = date.addMinutes(now, 2);
|
||||
```
|
||||
|
||||
### addSeconds(dateObj, seconds)
|
||||
|
||||
- @param {**Date**} dateObj - A Date object
|
||||
- @param {**number**} seconds - The number of seconds to add
|
||||
- ~~@param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`~~ `Removed in: v3.5.0`
|
||||
- @returns {**Date**} The Date object after adding the specified number of seconds
|
||||
|
||||
Adds seconds to a date object. Subtraction is also possible by specifying a negative value. The third parameter was deprecated in version 3.5.0. Regardless of what is specified for this parameter, the calculation results will not change.
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const three_seconds_ago = date.addSeconds(now, -3);
|
||||
```
|
||||
|
||||
### addMilliseconds(dateObj, milliseconds)
|
||||
|
||||
- @param {**Date**} dateObj - A Date object
|
||||
- @param {**number**} milliseconds - The number of milliseconds to add
|
||||
- ~~@param {**boolean**} [utc] - If true, calculates the date in UTC `Added in: v3.0.0`~~ `Removed in: v3.5.0`
|
||||
- @returns {**Date**} The Date object after adding the specified number of milliseconds
|
||||
|
||||
Adds milliseconds to a date object. Subtraction is also possible by specifying a negative value. The third parameter was deprecated in version 3.5.0. Regardless of what is specified for this parameter, the calculation results will not change.
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const a_millisecond_later = date.addMilliseconds(now, 1);
|
||||
```
|
||||
|
||||
### subtract(date1, date2)
|
||||
|
||||
- @param {**Date**} date1 - A Date object
|
||||
- @param {**Date**} date2 - A Date object
|
||||
- @returns {**Object**} The result object of subtracting date2 from date1
|
||||
|
||||
```javascript
|
||||
const today = new Date(2015, 0, 2);
|
||||
const yesterday = new Date(2015, 0, 1);
|
||||
|
||||
date.subtract(today, yesterday).toDays(); // => 1 = today - yesterday
|
||||
date.subtract(today, yesterday).toHours(); // => 24
|
||||
date.subtract(today, yesterday).toMinutes(); // => 1440
|
||||
date.subtract(today, yesterday).toSeconds(); // => 86400
|
||||
date.subtract(today, yesterday).toMilliseconds(); // => 86400000
|
||||
```
|
||||
|
||||
### isLeapYear(y)
|
||||
|
||||
- @param {**number**} y - A year to check
|
||||
- @returns {**boolean**} Whether the year is a leap year
|
||||
|
||||
```javascript
|
||||
date.isLeapYear(2015); // => false
|
||||
date.isLeapYear(2012); // => true
|
||||
```
|
||||
|
||||
### isSameDay(date1, date2)
|
||||
|
||||
- @param {**Date**} date1 - A Date object
|
||||
- @param {**Date**} date2 - A Date object
|
||||
- @returns {**boolean**} Whether the two dates are the same day (time is ignored)
|
||||
|
||||
```javascript
|
||||
const date1 = new Date(2017, 0, 2, 0); // Jan 2 2017 00:00:00
|
||||
const date2 = new Date(2017, 0, 2, 23, 59); // Jan 2 2017 23:59:00
|
||||
const date3 = new Date(2017, 0, 1, 23, 59); // Jan 1 2017 23:59:00
|
||||
date.isSameDay(date1, date2); // => true
|
||||
date.isSameDay(date1, date3); // => false
|
||||
```
|
||||
|
||||
### locale([locale])
|
||||
|
||||
- @param {**Function|string**} [locale] - A locale installer or language code
|
||||
- @returns {**string**} The current language code
|
||||
|
||||
It returns the current language code if called without any parameters.
|
||||
|
||||
```javascript
|
||||
date.locale(); // => "en"
|
||||
```
|
||||
|
||||
To switch to any other language, call it with a locale installer or a language code.
|
||||
|
||||
```javascript
|
||||
import es from 'date-and-time/locale/es';
|
||||
|
||||
date.locale(es); // Switch to Spanish
|
||||
```
|
||||
|
||||
See [LOCALE.md](./LOCALE.md) for details.
|
||||
|
||||
### extend(extension)
|
||||
|
||||
- @param {**Object**} extension - An extension object
|
||||
- @returns {**void**}
|
||||
|
||||
It extends this library. See [EXTEND.md](./EXTEND.md) for details.
|
||||
|
||||
### plugin(plugin)
|
||||
|
||||
- @param {**Function|string**} plugin - A plugin installer or plugin name
|
||||
- @returns {**void**}
|
||||
|
||||
Plugin is a named extension object. By installing predefined plugins, you can easily extend this library. See [PLUGINS.md](./PLUGINS.md) for details.
|
||||
|
||||
## Browser Support
|
||||
|
||||
Chrome, Firefox, Safari, Edge, and Internet Explorer 6+.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
343
node_modules/date-and-time/date-and-time.d.ts
generated
vendored
Normal file
343
node_modules/date-and-time/date-and-time.d.ts
generated
vendored
Normal file
@ -0,0 +1,343 @@
|
||||
/**
|
||||
* Formatting date and time objects (Date -> String)
|
||||
* @param dateObj - A Date object
|
||||
* @param formatString - A format string
|
||||
* @param [utc] - Output as UTC
|
||||
* @returns A formatted string
|
||||
*/
|
||||
export function format(dateObj: Date, formatString: string, utc?: boolean): string;
|
||||
|
||||
/**
|
||||
* Formatting date and time objects (Date -> String)
|
||||
* @param dateObj - A Date object
|
||||
* @param compiledObj - A compiled object of format string
|
||||
* @param [utc] - Output as UTC
|
||||
* @returns A formatted string
|
||||
*/
|
||||
export function format(dateObj: Date, compiledObj: string[], utc?: boolean): string;
|
||||
|
||||
/**
|
||||
* Parsing date and time strings (String -> Date)
|
||||
* @param dateString - A date and time string
|
||||
* @param formatString - A format string
|
||||
* @param [utc] - Input as UTC
|
||||
* @returns A Date object
|
||||
*/
|
||||
export function parse(dateString: string, formatString: string, utc?: boolean): Date;
|
||||
|
||||
/**
|
||||
* Parsing date and time strings (String -> Date)
|
||||
* @param dateString - A date and time string
|
||||
* @param compiledObj - A compiled object of format string
|
||||
* @param [utc] - Input as UTC
|
||||
* @returns A Date object
|
||||
*/
|
||||
export function parse(dateString: string, compiledObj: string[], utc?: boolean): Date;
|
||||
|
||||
/**
|
||||
* Compiling format strings
|
||||
* @param formatString - A format string
|
||||
* @returns A compiled object
|
||||
*/
|
||||
export function compile(formatString: string): string[];
|
||||
|
||||
/** Preparse result object */
|
||||
export type PreparseResult = {
|
||||
/** Year */
|
||||
Y: number;
|
||||
/** Month */
|
||||
M: number;
|
||||
/** Day */
|
||||
D: number;
|
||||
/** 24-hour */
|
||||
H: number;
|
||||
/** Meridiem */
|
||||
A: number;
|
||||
/** 12-hour */
|
||||
h: number;
|
||||
/** Minute */
|
||||
m: number;
|
||||
/** Second */
|
||||
s: number;
|
||||
/** Millisecond */
|
||||
S: number;
|
||||
/** Timezone offset */
|
||||
Z: number;
|
||||
/** Pointer offset */
|
||||
_index: number;
|
||||
/** Length of the date string */
|
||||
_length: number;
|
||||
/** Token matching count */
|
||||
_match: number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Pre-parsing date and time strings
|
||||
* @param dateString - A date and time string
|
||||
* @param formatString - A format string
|
||||
* @returns A pre-parsed result object
|
||||
*/
|
||||
export function preparse(dateString: string, formatString: string): PreparseResult;
|
||||
|
||||
/**
|
||||
* Pre-parsing date and time strings
|
||||
* @param dateString - A date and time string
|
||||
* @param compiledObj - A compiled object of format string
|
||||
* @returns A pre-parsed result object
|
||||
*/
|
||||
export function preparse(dateString: string, compiledObj: string[]): PreparseResult;
|
||||
|
||||
/**
|
||||
* Date and time string validation
|
||||
* @param dateString - A date and time string
|
||||
* @param formatString - A format string
|
||||
* @returns Whether the date and time string is a valid date and time
|
||||
*/
|
||||
export function isValid(dateString: string, formatString: string): boolean;
|
||||
|
||||
/**
|
||||
* Date and time string validation
|
||||
* @param dateString - A date and time string
|
||||
* @param compiledObj - A compiled object of format string
|
||||
* @returns Whether the date and time string is a valid date and time
|
||||
*/
|
||||
export function isValid(dateString: string, compiledObj: string[]): boolean;
|
||||
|
||||
/**
|
||||
* Date and time string validation
|
||||
* @param preparseResult - A pre-parsed result object
|
||||
* @returns Whether the date and time string is a valid date and time
|
||||
*/
|
||||
export function isValid(preparseResult: PreparseResult): boolean;
|
||||
|
||||
/**
|
||||
* Format transformation of date and time strings (String -> String)
|
||||
* @param dateString - A date and time string
|
||||
* @param formatString1 - A format string before transformation
|
||||
* @param formatString2 - A format string after transformation
|
||||
* @param [utc] - Output as UTC
|
||||
* @returns A formatted string
|
||||
*/
|
||||
export function transform(dateString: string, formatString1: string, formatString2: string, utc?: boolean): string;
|
||||
|
||||
/**
|
||||
* Format transformation of date and time strings (String -> String)
|
||||
* @param dateString - A date and time string
|
||||
* @param formatString - A format string before transformation
|
||||
* @param compiledObj - A compiled object of format string after transformation
|
||||
* @param [utc] - Output as UTC
|
||||
* @returns A formatted string
|
||||
*/
|
||||
export function transform(dateString: string, formatString: string, compiledObj: string[], utc?: boolean): string;
|
||||
|
||||
/**
|
||||
* Format transformation of date and time strings (String -> String)
|
||||
* @param dateString - A date and time string
|
||||
* @param compiledObj - A compiled object of format string before transformation
|
||||
* @param formatString - A format string after transformation
|
||||
* @param [utc] - Output as UTC
|
||||
* @returns A formatted string
|
||||
*/
|
||||
export function transform(dateString: string, compiledObj: string[], formatString: string, utc?: boolean): string;
|
||||
|
||||
/**
|
||||
* Format transformation of date and time strings (String -> String)
|
||||
* @param dateString - A date and time string
|
||||
* @param compiledObj1 - A compiled object of format string before transformation
|
||||
* @param compiledObj2 - A compiled object of format string after transformation
|
||||
* @param [utc] - Output as UTC
|
||||
* @returns A formatted string
|
||||
*/
|
||||
export function transform(dateString: string, compiledObj1: string[], compiledObj2: string[], utc?: boolean): string;
|
||||
|
||||
/**
|
||||
* Adding years
|
||||
* @param dateObj - A Date object
|
||||
* @param years - The number of years to add
|
||||
* @param [utc] - If true, calculates the date in UTC
|
||||
* @returns The Date object after adding the specified number of years
|
||||
*/
|
||||
export function addYears(dateObj: Date, years: number, utc?: boolean): Date;
|
||||
|
||||
/**
|
||||
* Adding months
|
||||
* @param dateObj - A Date object
|
||||
* @param months - The number of months to add
|
||||
* @param [utc] - If true, calculates the date in UTC
|
||||
* @returns The Date object after adding the specified number of months
|
||||
*/
|
||||
export function addMonths(dateObj: Date, months: number, utc?: boolean): Date;
|
||||
|
||||
/**
|
||||
* Adding days
|
||||
* @param dateObj - A Date object
|
||||
* @param days - The number of days to add
|
||||
* @param [utc] - If true, calculates the date in UTC
|
||||
* @returns The Date object after adding the specified number of days
|
||||
*/
|
||||
export function addDays(dateObj: Date, days: number, utc?: boolean): Date;
|
||||
|
||||
/**
|
||||
* Adding hours
|
||||
* @param dateObj - A Date object
|
||||
* @param hours - The number of hours to add
|
||||
* @returns The Date object after adding the specified number of hours
|
||||
*/
|
||||
export function addHours(dateObj: Date, hours: number): Date;
|
||||
|
||||
/**
|
||||
* @deprecated The `utc` parameter is ignored. The function always returns the same result regardless of this value.
|
||||
* @param dateObj - A Date object
|
||||
* @param hours - The number of hours to add
|
||||
* @param [utc] - If true, calculates the date in UTC
|
||||
* @returns The Date object after adding the specified number of hours
|
||||
*/
|
||||
export function addHours(dateObj: Date, hours: number, utc?: boolean): Date;
|
||||
|
||||
/**
|
||||
* Adding minutes
|
||||
* @param dateObj - A Date object
|
||||
* @param minutes - The number of minutes to add
|
||||
* @returns The Date object after adding the specified number of minutes
|
||||
*/
|
||||
export function addMinutes(dateObj: Date, minutes: number): Date;
|
||||
|
||||
/**
|
||||
* @deprecated The `utc` parameter is ignored. The function always returns the same result regardless of this value.
|
||||
* @param dateObj - A Date object
|
||||
* @param minutes - The number of minutes to add
|
||||
* @param [utc] - If true, calculates the date in UTC
|
||||
* @returns The Date object after adding the specified number of minutes
|
||||
*/
|
||||
export function addMinutes(dateObj: Date, minutes: number, utc?: boolean): Date;
|
||||
|
||||
/**
|
||||
* Adding seconds
|
||||
* @param dateObj - A Date object
|
||||
* @param seconds - The number of seconds to add
|
||||
* @returns The Date object after adding the specified number of seconds
|
||||
*/
|
||||
export function addSeconds(dateObj: Date, seconds: number): Date;
|
||||
|
||||
/**
|
||||
* @deprecated The `utc` parameter is ignored. The function always returns the same result regardless of this value.
|
||||
* @param dateObj - A Date object
|
||||
* @param seconds - The number of seconds to add
|
||||
* @param [utc] - If true, calculates the date in UTC
|
||||
* @returns The Date object after adding the specified number of seconds
|
||||
*/
|
||||
export function addSeconds(dateObj: Date, seconds: number, utc?: boolean): Date;
|
||||
|
||||
/**
|
||||
* Adding milliseconds
|
||||
* @param dateObj - A Date object
|
||||
* @param milliseconds - The number of milliseconds to add
|
||||
* @returns The Date object after adding the specified number of milliseconds
|
||||
*/
|
||||
export function addMilliseconds(dateObj: Date, milliseconds: number): Date;
|
||||
|
||||
/**
|
||||
* @deprecated The `utc` parameter is ignored. The function always returns the same result regardless of this value.
|
||||
* @param dateObj - A Date object
|
||||
* @param milliseconds - The number of milliseconds to add
|
||||
* @param [utc] - If true, calculates the date in UTC
|
||||
* @returns The Date object after adding the specified number of milliseconds
|
||||
*/
|
||||
export function addMilliseconds(dateObj: Date, milliseconds: number, utc?: boolean): Date;
|
||||
|
||||
/** Subtraction result object */
|
||||
export type SubtractResult = {
|
||||
/** Returns the result value in milliseconds. */
|
||||
toMilliseconds: () => number;
|
||||
/** Returns the result value in seconds. */
|
||||
toSeconds: () => number;
|
||||
/** Returns the result value in minutes. This value might be a real number. */
|
||||
toMinutes: () => number;
|
||||
/** Returns the result value in hours. This value might be a real number. */
|
||||
toHours: () => number;
|
||||
/** Returns the result value in days. This value might be a real number. */
|
||||
toDays: () => number;
|
||||
};
|
||||
|
||||
/**
|
||||
* Subtracting two dates (date1 - date2)
|
||||
* @param date1 - A Date object
|
||||
* @param date2 - A Date object
|
||||
* @returns The result object of subtracting date2 from date1
|
||||
*/
|
||||
export function subtract(date1: Date, date2: Date): SubtractResult;
|
||||
|
||||
/**
|
||||
* Whether a year is a leap year
|
||||
* @param y - A year to check
|
||||
* @returns Whether the year is a leap year
|
||||
*/
|
||||
export function isLeapYear(y: number): boolean;
|
||||
|
||||
/**
|
||||
* Comparison of two dates
|
||||
* @param date1 - A Date object
|
||||
* @param date2 - A Date object
|
||||
* @returns Whether the two dates are the same day (time is ignored)
|
||||
*/
|
||||
export function isSameDay(date1: Date, date2: Date): boolean;
|
||||
|
||||
/** Locale installer */
|
||||
export type Locale = (proto: unknown) => string;
|
||||
|
||||
/**
|
||||
* Changing locales
|
||||
* @param [locale] - A locale installer
|
||||
* @returns The current language code
|
||||
*/
|
||||
export function locale(locale?: Locale): string;
|
||||
|
||||
/**
|
||||
* Changing locales
|
||||
* @param [locale] - A language code
|
||||
* @returns The current language code
|
||||
*/
|
||||
export function locale(locale?: string): string;
|
||||
|
||||
export type Resources = {
|
||||
[key: string]: string[] | string[][]
|
||||
};
|
||||
|
||||
export type Formatter = {
|
||||
};
|
||||
|
||||
export type Parser = {
|
||||
};
|
||||
|
||||
export type Extender = {
|
||||
[key: string]: (...args: any) => any
|
||||
};
|
||||
|
||||
/** Extension object */
|
||||
export type Extension = {
|
||||
res?: Resources,
|
||||
formatter?: Formatter,
|
||||
parser?: Parser,
|
||||
extender?: Extender
|
||||
};
|
||||
|
||||
/**
|
||||
* Functional extension
|
||||
* @param extension - An extension object
|
||||
*/
|
||||
export function extend(extension: Extension): void;
|
||||
|
||||
/** Plugin installer */
|
||||
export type Plugin = (proto: unknown, date?: unknown) => string;
|
||||
|
||||
/**
|
||||
* Importing plugins
|
||||
* @param plugin - A plugin installer
|
||||
*/
|
||||
export function plugin(plugin: Plugin): void;
|
||||
|
||||
/**
|
||||
* Importing plugins
|
||||
* @param plugin - A plugin name
|
||||
*/
|
||||
export function plugin(plugin: string): void;
|
||||
520
node_modules/date-and-time/date-and-time.js
generated
vendored
Normal file
520
node_modules/date-and-time/date-and-time.js
generated
vendored
Normal file
@ -0,0 +1,520 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.date = factory());
|
||||
})(this, (function () { 'use strict';
|
||||
|
||||
/**
|
||||
* @preserve date-and-time (c) KNOWLEDGECODE | MIT
|
||||
*/
|
||||
|
||||
var locales = {},
|
||||
plugins = {},
|
||||
lang = 'en',
|
||||
_res = {
|
||||
MMMM: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
MMM: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
dddd: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
ddd: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
||||
dd: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
||||
A: ['AM', 'PM']
|
||||
},
|
||||
_formatter = {
|
||||
YYYY: function (d/*, formatString*/) { return ('000' + d.getFullYear()).slice(-4); },
|
||||
YY: function (d/*, formatString*/) { return ('0' + d.getFullYear()).slice(-2); },
|
||||
Y: function (d/*, formatString*/) { return '' + d.getFullYear(); },
|
||||
MMMM: function (d/*, formatString*/) { return this.res.MMMM[d.getMonth()]; },
|
||||
MMM: function (d/*, formatString*/) { return this.res.MMM[d.getMonth()]; },
|
||||
MM: function (d/*, formatString*/) { return ('0' + (d.getMonth() + 1)).slice(-2); },
|
||||
M: function (d/*, formatString*/) { return '' + (d.getMonth() + 1); },
|
||||
DD: function (d/*, formatString*/) { return ('0' + d.getDate()).slice(-2); },
|
||||
D: function (d/*, formatString*/) { return '' + d.getDate(); },
|
||||
HH: function (d/*, formatString*/) { return ('0' + d.getHours()).slice(-2); },
|
||||
H: function (d/*, formatString*/) { return '' + d.getHours(); },
|
||||
A: function (d/*, formatString*/) { return this.res.A[d.getHours() > 11 | 0]; },
|
||||
hh: function (d/*, formatString*/) { return ('0' + (d.getHours() % 12 || 12)).slice(-2); },
|
||||
h: function (d/*, formatString*/) { return '' + (d.getHours() % 12 || 12); },
|
||||
mm: function (d/*, formatString*/) { return ('0' + d.getMinutes()).slice(-2); },
|
||||
m: function (d/*, formatString*/) { return '' + d.getMinutes(); },
|
||||
ss: function (d/*, formatString*/) { return ('0' + d.getSeconds()).slice(-2); },
|
||||
s: function (d/*, formatString*/) { return '' + d.getSeconds(); },
|
||||
SSS: function (d/*, formatString*/) { return ('00' + d.getMilliseconds()).slice(-3); },
|
||||
SS: function (d/*, formatString*/) { return ('0' + (d.getMilliseconds() / 10 | 0)).slice(-2); },
|
||||
S: function (d/*, formatString*/) { return '' + (d.getMilliseconds() / 100 | 0); },
|
||||
dddd: function (d/*, formatString*/) { return this.res.dddd[d.getDay()]; },
|
||||
ddd: function (d/*, formatString*/) { return this.res.ddd[d.getDay()]; },
|
||||
dd: function (d/*, formatString*/) { return this.res.dd[d.getDay()]; },
|
||||
Z: function (d/*, formatString*/) {
|
||||
var offset = d.getTimezoneOffset() / 0.6 | 0;
|
||||
return (offset > 0 ? '-' : '+') + ('000' + Math.abs(offset - (offset % 100 * 0.4 | 0))).slice(-4);
|
||||
},
|
||||
ZZ: function (d/*, formatString*/) {
|
||||
var offset = d.getTimezoneOffset();
|
||||
var mod = Math.abs(offset);
|
||||
return (offset > 0 ? '-' : '+') + ('0' + (mod / 60 | 0)).slice(-2) + ':' + ('0' + mod % 60).slice(-2);
|
||||
},
|
||||
post: function (str) { return str; },
|
||||
res: _res
|
||||
},
|
||||
_parser = {
|
||||
YYYY: function (str/*, formatString */) { return this.exec(/^\d{4}/, str); },
|
||||
Y: function (str/*, formatString */) { return this.exec(/^\d{1,4}/, str); },
|
||||
MMMM: function (str/*, formatString */) {
|
||||
var result = this.find(this.res.MMMM, str);
|
||||
result.value++;
|
||||
return result;
|
||||
},
|
||||
MMM: function (str/*, formatString */) {
|
||||
var result = this.find(this.res.MMM, str);
|
||||
result.value++;
|
||||
return result;
|
||||
},
|
||||
MM: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
M: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
DD: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
D: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
HH: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
H: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
A: function (str/*, formatString */) { return this.find(this.res.A, str); },
|
||||
hh: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
h: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
mm: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
m: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
ss: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
s: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
SSS: function (str/*, formatString */) { return this.exec(/^\d{1,3}/, str); },
|
||||
SS: function (str/*, formatString */) {
|
||||
var result = this.exec(/^\d\d?/, str);
|
||||
result.value *= 10;
|
||||
return result;
|
||||
},
|
||||
S: function (str/*, formatString */) {
|
||||
var result = this.exec(/^\d/, str);
|
||||
result.value *= 100;
|
||||
return result;
|
||||
},
|
||||
Z: function (str/*, formatString */) {
|
||||
var result = this.exec(/^[+-]\d{2}[0-5]\d/, str);
|
||||
result.value = (result.value / 100 | 0) * -60 - result.value % 100;
|
||||
return result;
|
||||
},
|
||||
ZZ: function (str/*, formatString */) {
|
||||
var arr = /^([+-])(\d{2}):([0-5]\d)/.exec(str) || ['', '', '', ''];
|
||||
return { value: 0 - ((arr[1] + arr[2] | 0) * 60 + (arr[1] + arr[3] | 0)), length: arr[0].length };
|
||||
},
|
||||
h12: function (h, a) { return (h === 12 ? 0 : h) + a * 12; },
|
||||
exec: function (re, str) {
|
||||
var result = (re.exec(str) || [''])[0];
|
||||
return { value: result | 0, length: result.length };
|
||||
},
|
||||
find: function (array, str) {
|
||||
var index = -1, length = 0;
|
||||
|
||||
for (var i = 0, len = array.length, item; i < len; i++) {
|
||||
item = array[i];
|
||||
if (!str.indexOf(item) && item.length > length) {
|
||||
index = i;
|
||||
length = item.length;
|
||||
}
|
||||
}
|
||||
return { value: index, length: length };
|
||||
},
|
||||
pre: function (str) { return str; },
|
||||
res: _res
|
||||
},
|
||||
extend = function (base, props, override, res) {
|
||||
var obj = {}, key;
|
||||
|
||||
for (key in base) {
|
||||
obj[key] = base[key];
|
||||
}
|
||||
for (key in props || {}) {
|
||||
if (!(!!override ^ !!obj[key])) {
|
||||
obj[key] = props[key];
|
||||
}
|
||||
}
|
||||
if (res) {
|
||||
obj.res = res;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
proto = {
|
||||
_formatter: _formatter,
|
||||
_parser: _parser
|
||||
},
|
||||
date;
|
||||
|
||||
/**
|
||||
* Compiling format strings
|
||||
* @param {string} formatString - A format string
|
||||
* @returns {Array.<string>} A compiled object
|
||||
*/
|
||||
proto.compile = function (formatString) {
|
||||
return [formatString].concat(formatString.match(/\[(?:[^[\]]|\[[^[\]]*])*]|([A-Za-z])\1*|\.{3}|./g) || []);
|
||||
};
|
||||
|
||||
/**
|
||||
* Formatting date and time objects (Date -> String)
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {string|Array.<string>} arg - A format string or its compiled object
|
||||
* @param {boolean} [utc] - Output as UTC
|
||||
* @returns {string} A formatted string
|
||||
*/
|
||||
proto.format = function (dateObj, arg, utc) {
|
||||
var ctx = this || date, pattern = typeof arg === 'string' ? ctx.compile(arg) : arg,
|
||||
formatter = ctx._formatter,
|
||||
d = (function () {
|
||||
if (utc) {
|
||||
var u = new Date(dateObj.getTime());
|
||||
|
||||
u.getFullYear = u.getUTCFullYear;
|
||||
u.getMonth = u.getUTCMonth;
|
||||
u.getDate = u.getUTCDate;
|
||||
u.getHours = u.getUTCHours;
|
||||
u.getMinutes = u.getUTCMinutes;
|
||||
u.getSeconds = u.getUTCSeconds;
|
||||
u.getMilliseconds = u.getUTCMilliseconds;
|
||||
u.getDay = u.getUTCDay;
|
||||
u.getTimezoneOffset = function () { return 0; };
|
||||
u.getTimezoneName = function () { return 'UTC'; };
|
||||
return u;
|
||||
}
|
||||
return dateObj;
|
||||
}()),
|
||||
comment = /^\[(.*)\]$/, str = '';
|
||||
|
||||
for (var i = 1, len = pattern.length, token; i < len; i++) {
|
||||
token = pattern[i];
|
||||
str += formatter[token]
|
||||
? formatter.post(formatter[token](d, pattern[0]))
|
||||
: comment.test(token) ? token.replace(comment, '$1') : token;
|
||||
}
|
||||
return str;
|
||||
};
|
||||
|
||||
/**
|
||||
* Pre-parsing date and time strings
|
||||
* @param {string} dateString - A date and time string
|
||||
* @param {string|Array.<string>} arg - A format string or its compiled object
|
||||
* @param {boolean} [utc] - Input as UTC
|
||||
* @returns {Object} A pre-parsed result object
|
||||
*/
|
||||
proto.preparse = function (dateString, arg) {
|
||||
var ctx = this || date, pattern = typeof arg === 'string' ? ctx.compile(arg) : arg,
|
||||
parser = ctx._parser,
|
||||
dt = { Y: 1970, M: 1, D: 1, H: 0, A: 0, h: 0, m: 0, s: 0, S: 0, Z: 0, _index: 0, _length: 0, _match: 0 },
|
||||
wildcard = ' ', comment = /^\[(.*)\]$/, ellipsis = '...';
|
||||
|
||||
dateString = parser.pre(dateString);
|
||||
for (var i = 1, len = pattern.length, token, str, result; i < len; i++) {
|
||||
token = pattern[i];
|
||||
str = dateString.substring(dt._index);
|
||||
|
||||
if (parser[token]) {
|
||||
result = parser[token](str, pattern[0]);
|
||||
if (!result.length) {
|
||||
break;
|
||||
}
|
||||
dt[result.token || token.charAt(0)] = result.value;
|
||||
dt._index += result.length;
|
||||
dt._match++;
|
||||
} else if (token === str.charAt(0) || token === wildcard) {
|
||||
dt._index++;
|
||||
} else if (comment.test(token) && !str.indexOf(token.replace(comment, '$1'))) {
|
||||
dt._index += token.length - 2;
|
||||
} else if (token === ellipsis) {
|
||||
dt._index = dateString.length;
|
||||
break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
dt.H = dt.H || parser.h12(dt.h, dt.A);
|
||||
dt._length = dateString.length;
|
||||
return dt;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parsing of date and time string (String -> Date)
|
||||
* @param {string} dateString - A date-time string
|
||||
* @param {string|Array.<string>} arg - A format string or its compiled object
|
||||
* @param {boolean} [utc] - Input as UTC
|
||||
* @returns {Date} A Date object
|
||||
*/
|
||||
proto.parse = function (dateString, arg, utc) {
|
||||
var ctx = this || date, pattern = typeof arg === 'string' ? ctx.compile(arg) : arg,
|
||||
dt = ctx.preparse(dateString, pattern);
|
||||
|
||||
if (ctx.isValid(dt)) {
|
||||
dt.M -= dt.Y < 100 ? 22801 : 1; // 22801 = 1900 * 12 + 1
|
||||
if (utc || ~ctx._parser.find(pattern, 'ZZ').value) {
|
||||
return new Date(Date.UTC(dt.Y, dt.M, dt.D, dt.H, dt.m + dt.Z, dt.s, dt.S));
|
||||
}
|
||||
return new Date(dt.Y, dt.M, dt.D, dt.H, dt.m, dt.s, dt.S);
|
||||
}
|
||||
return new Date(NaN);
|
||||
};
|
||||
|
||||
/**
|
||||
* Date and time string validation
|
||||
* @param {Object|string} arg1 - A pre-parsed result object or a date and time string
|
||||
* @param {string|Array.<string>} [arg2] - A format string or its compiled object
|
||||
* @returns {boolean} Whether the date and time string is a valid date and time
|
||||
*/
|
||||
proto.isValid = function (arg1, arg2) {
|
||||
var ctx = this || date, dt = typeof arg1 === 'string' ? ctx.preparse(arg1, arg2) : arg1;
|
||||
|
||||
return !(
|
||||
dt._index < 1 || dt._length < 1 || dt._index - dt._length || dt._match < 1
|
||||
|| dt.Y < 1 || dt.Y > 9999 || dt.M < 1 || dt.M > 12 || dt.D < 1 || dt.D > new Date(dt.Y, dt.M, 0).getDate()
|
||||
|| dt.H < 0 || dt.H > 23 || dt.m < 0 || dt.m > 59 || dt.s < 0 || dt.s > 59 || dt.S < 0 || dt.S > 999
|
||||
|| dt.Z < -840 || dt.Z > 720
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Format transformation of date and time string (String -> String)
|
||||
* @param {string} dateString - A date and time string
|
||||
* @param {string|Array.<string>} arg1 - A format string or its compiled object before transformation
|
||||
* @param {string|Array.<string>} arg2 - A format string or its compiled object after transformation
|
||||
* @param {boolean} [utc] - Output as UTC
|
||||
* @returns {string} A formatted string
|
||||
*/
|
||||
proto.transform = function (dateString, arg1, arg2, utc) {
|
||||
const ctx = this || date;
|
||||
return ctx.format(ctx.parse(dateString, arg1), arg2, utc);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding years
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} years - Number of years to add
|
||||
* @param {boolean} [utc] - Calculates as UTC
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addYears = function (dateObj, years, utc) {
|
||||
return (this || date).addMonths(dateObj, years * 12, utc);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding months
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} months - Number of months to add
|
||||
* @param {boolean} [utc] - Calculates as UTC
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addMonths = function (dateObj, months, utc) {
|
||||
var d = new Date(dateObj.getTime());
|
||||
|
||||
if (utc) {
|
||||
d.setUTCMonth(d.getUTCMonth() + months);
|
||||
if (d.getUTCDate() < dateObj.getUTCDate()) {
|
||||
d.setUTCDate(0);
|
||||
return d;
|
||||
}
|
||||
} else {
|
||||
d.setMonth(d.getMonth() + months);
|
||||
if (d.getDate() < dateObj.getDate()) {
|
||||
d.setDate(0);
|
||||
return d;
|
||||
}
|
||||
}
|
||||
return d;
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding days
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} days - Number of days to add
|
||||
* @param {boolean} [utc] - Calculates as UTC
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addDays = function (dateObj, days, utc) {
|
||||
var d = new Date(dateObj.getTime());
|
||||
|
||||
if (utc) {
|
||||
d.setUTCDate(d.getUTCDate() + days);
|
||||
} else {
|
||||
d.setDate(d.getDate() + days);
|
||||
}
|
||||
return d;
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding hours
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} hours - Number of hours to add
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addHours = function (dateObj, hours) {
|
||||
return new Date(dateObj.getTime() + hours * 60 * 60 * 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding minutes
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} minutes - Number of minutes to add
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addMinutes = function (dateObj, minutes) {
|
||||
return new Date(dateObj.getTime() + minutes * 60 * 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding seconds
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} seconds - Number of seconds to add
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addSeconds = function (dateObj, seconds) {
|
||||
return new Date(dateObj.getTime() + seconds * 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding milliseconds
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} milliseconds - Number of milliseconds to add
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addMilliseconds = function (dateObj, milliseconds) {
|
||||
return new Date(dateObj.getTime() + milliseconds);
|
||||
};
|
||||
|
||||
/**
|
||||
* Subtracting two dates (date1 - date2)
|
||||
* @param {Date} date1 - A Date object
|
||||
* @param {Date} date2 - A Date object
|
||||
* @returns {Object} The result object of subtracting date2 from date1
|
||||
*/
|
||||
proto.subtract = function (date1, date2) {
|
||||
var delta = date1.getTime() - date2.getTime();
|
||||
|
||||
return {
|
||||
toMilliseconds: function () {
|
||||
return delta;
|
||||
},
|
||||
toSeconds: function () {
|
||||
return delta / 1000;
|
||||
},
|
||||
toMinutes: function () {
|
||||
return delta / 60000;
|
||||
},
|
||||
toHours: function () {
|
||||
return delta / 3600000;
|
||||
},
|
||||
toDays: function () {
|
||||
return delta / 86400000;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Whether a year is a leap year
|
||||
* @param {number} y - A year to check
|
||||
* @returns {boolean} Whether the year is a leap year
|
||||
*/
|
||||
proto.isLeapYear = function (y) {
|
||||
return (!(y % 4) && !!(y % 100)) || !(y % 400);
|
||||
};
|
||||
|
||||
/**
|
||||
* Comparison of two dates
|
||||
* @param {Date} date1 - A Date object
|
||||
* @param {Date} date2 - A Date object
|
||||
* @returns {boolean} Whether the two dates are the same day (time is ignored)
|
||||
*/
|
||||
proto.isSameDay = function (date1, date2) {
|
||||
return date1.toDateString() === date2.toDateString();
|
||||
};
|
||||
|
||||
/**
|
||||
* Definition of new locale
|
||||
* @param {string} code - A language code
|
||||
* @param {Function} locale - A locale installer
|
||||
* @returns {void}
|
||||
*/
|
||||
proto.locale = function (code, locale) {
|
||||
if (!locales[code]) {
|
||||
locales[code] = locale;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Definition of new plugin
|
||||
* @param {string} name - A plugin name
|
||||
* @param {Function} plugin - A plugin installer
|
||||
* @returns {void}
|
||||
*/
|
||||
proto.plugin = function (name, plugin) {
|
||||
if (!plugins[name]) {
|
||||
plugins[name] = plugin;
|
||||
}
|
||||
};
|
||||
|
||||
date = extend(proto);
|
||||
|
||||
/**
|
||||
* Changing locales
|
||||
* @param {Function|string} [locale] - A locale installer or language code
|
||||
* @returns {string} The current language code
|
||||
*/
|
||||
date.locale = function (locale) {
|
||||
var install = typeof locale === 'function' ? locale : date.locale[locale];
|
||||
|
||||
if (!install) {
|
||||
return lang;
|
||||
}
|
||||
lang = install(proto);
|
||||
|
||||
var extension = locales[lang] || {};
|
||||
var res = extend(_res, extension.res, true);
|
||||
var formatter = extend(_formatter, extension.formatter, true, res);
|
||||
var parser = extend(_parser, extension.parser, true, res);
|
||||
|
||||
date._formatter = formatter;
|
||||
date._parser = parser;
|
||||
|
||||
for (var plugin in plugins) {
|
||||
date.extend(plugins[plugin]);
|
||||
}
|
||||
|
||||
return lang;
|
||||
};
|
||||
|
||||
/**
|
||||
* Functional extension
|
||||
* @param {Object} extension - An extension object
|
||||
* @returns {void}
|
||||
*/
|
||||
date.extend = function (extension) {
|
||||
var res = extend(date._parser.res, extension.res);
|
||||
var extender = extension.extender || {};
|
||||
|
||||
date._formatter = extend(date._formatter, extension.formatter, false, res);
|
||||
date._parser = extend(date._parser, extension.parser, false, res);
|
||||
|
||||
for (var key in extender) {
|
||||
if (!date[key]) {
|
||||
date[key] = extender[key];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Importing plugins
|
||||
* @param {Function|string} plugin - A plugin installer or plugin name
|
||||
* @returns {void}
|
||||
*/
|
||||
date.plugin = function (plugin) {
|
||||
var install = typeof plugin === 'function' ? plugin : date.plugin[plugin];
|
||||
|
||||
if (install) {
|
||||
date.extend(plugins[install(proto, date)] || {});
|
||||
}
|
||||
};
|
||||
|
||||
var date$1 = date;
|
||||
|
||||
return date$1;
|
||||
|
||||
}));
|
||||
4
node_modules/date-and-time/date-and-time.min.js
generated
vendored
Normal file
4
node_modules/date-and-time/date-and-time.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
512
node_modules/date-and-time/esm/date-and-time.es.js
generated
vendored
Normal file
512
node_modules/date-and-time/esm/date-and-time.es.js
generated
vendored
Normal file
@ -0,0 +1,512 @@
|
||||
/**
|
||||
* @preserve date-and-time (c) KNOWLEDGECODE | MIT
|
||||
*/
|
||||
|
||||
var locales = {},
|
||||
plugins = {},
|
||||
lang = 'en',
|
||||
_res = {
|
||||
MMMM: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
MMM: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
dddd: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
ddd: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
||||
dd: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
||||
A: ['AM', 'PM']
|
||||
},
|
||||
_formatter = {
|
||||
YYYY: function (d/*, formatString*/) { return ('000' + d.getFullYear()).slice(-4); },
|
||||
YY: function (d/*, formatString*/) { return ('0' + d.getFullYear()).slice(-2); },
|
||||
Y: function (d/*, formatString*/) { return '' + d.getFullYear(); },
|
||||
MMMM: function (d/*, formatString*/) { return this.res.MMMM[d.getMonth()]; },
|
||||
MMM: function (d/*, formatString*/) { return this.res.MMM[d.getMonth()]; },
|
||||
MM: function (d/*, formatString*/) { return ('0' + (d.getMonth() + 1)).slice(-2); },
|
||||
M: function (d/*, formatString*/) { return '' + (d.getMonth() + 1); },
|
||||
DD: function (d/*, formatString*/) { return ('0' + d.getDate()).slice(-2); },
|
||||
D: function (d/*, formatString*/) { return '' + d.getDate(); },
|
||||
HH: function (d/*, formatString*/) { return ('0' + d.getHours()).slice(-2); },
|
||||
H: function (d/*, formatString*/) { return '' + d.getHours(); },
|
||||
A: function (d/*, formatString*/) { return this.res.A[d.getHours() > 11 | 0]; },
|
||||
hh: function (d/*, formatString*/) { return ('0' + (d.getHours() % 12 || 12)).slice(-2); },
|
||||
h: function (d/*, formatString*/) { return '' + (d.getHours() % 12 || 12); },
|
||||
mm: function (d/*, formatString*/) { return ('0' + d.getMinutes()).slice(-2); },
|
||||
m: function (d/*, formatString*/) { return '' + d.getMinutes(); },
|
||||
ss: function (d/*, formatString*/) { return ('0' + d.getSeconds()).slice(-2); },
|
||||
s: function (d/*, formatString*/) { return '' + d.getSeconds(); },
|
||||
SSS: function (d/*, formatString*/) { return ('00' + d.getMilliseconds()).slice(-3); },
|
||||
SS: function (d/*, formatString*/) { return ('0' + (d.getMilliseconds() / 10 | 0)).slice(-2); },
|
||||
S: function (d/*, formatString*/) { return '' + (d.getMilliseconds() / 100 | 0); },
|
||||
dddd: function (d/*, formatString*/) { return this.res.dddd[d.getDay()]; },
|
||||
ddd: function (d/*, formatString*/) { return this.res.ddd[d.getDay()]; },
|
||||
dd: function (d/*, formatString*/) { return this.res.dd[d.getDay()]; },
|
||||
Z: function (d/*, formatString*/) {
|
||||
var offset = d.getTimezoneOffset() / 0.6 | 0;
|
||||
return (offset > 0 ? '-' : '+') + ('000' + Math.abs(offset - (offset % 100 * 0.4 | 0))).slice(-4);
|
||||
},
|
||||
ZZ: function (d/*, formatString*/) {
|
||||
var offset = d.getTimezoneOffset();
|
||||
var mod = Math.abs(offset);
|
||||
return (offset > 0 ? '-' : '+') + ('0' + (mod / 60 | 0)).slice(-2) + ':' + ('0' + mod % 60).slice(-2);
|
||||
},
|
||||
post: function (str) { return str; },
|
||||
res: _res
|
||||
},
|
||||
_parser = {
|
||||
YYYY: function (str/*, formatString */) { return this.exec(/^\d{4}/, str); },
|
||||
Y: function (str/*, formatString */) { return this.exec(/^\d{1,4}/, str); },
|
||||
MMMM: function (str/*, formatString */) {
|
||||
var result = this.find(this.res.MMMM, str);
|
||||
result.value++;
|
||||
return result;
|
||||
},
|
||||
MMM: function (str/*, formatString */) {
|
||||
var result = this.find(this.res.MMM, str);
|
||||
result.value++;
|
||||
return result;
|
||||
},
|
||||
MM: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
M: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
DD: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
D: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
HH: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
H: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
A: function (str/*, formatString */) { return this.find(this.res.A, str); },
|
||||
hh: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
h: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
mm: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
m: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
ss: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
s: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
SSS: function (str/*, formatString */) { return this.exec(/^\d{1,3}/, str); },
|
||||
SS: function (str/*, formatString */) {
|
||||
var result = this.exec(/^\d\d?/, str);
|
||||
result.value *= 10;
|
||||
return result;
|
||||
},
|
||||
S: function (str/*, formatString */) {
|
||||
var result = this.exec(/^\d/, str);
|
||||
result.value *= 100;
|
||||
return result;
|
||||
},
|
||||
Z: function (str/*, formatString */) {
|
||||
var result = this.exec(/^[+-]\d{2}[0-5]\d/, str);
|
||||
result.value = (result.value / 100 | 0) * -60 - result.value % 100;
|
||||
return result;
|
||||
},
|
||||
ZZ: function (str/*, formatString */) {
|
||||
var arr = /^([+-])(\d{2}):([0-5]\d)/.exec(str) || ['', '', '', ''];
|
||||
return { value: 0 - ((arr[1] + arr[2] | 0) * 60 + (arr[1] + arr[3] | 0)), length: arr[0].length };
|
||||
},
|
||||
h12: function (h, a) { return (h === 12 ? 0 : h) + a * 12; },
|
||||
exec: function (re, str) {
|
||||
var result = (re.exec(str) || [''])[0];
|
||||
return { value: result | 0, length: result.length };
|
||||
},
|
||||
find: function (array, str) {
|
||||
var index = -1, length = 0;
|
||||
|
||||
for (var i = 0, len = array.length, item; i < len; i++) {
|
||||
item = array[i];
|
||||
if (!str.indexOf(item) && item.length > length) {
|
||||
index = i;
|
||||
length = item.length;
|
||||
}
|
||||
}
|
||||
return { value: index, length: length };
|
||||
},
|
||||
pre: function (str) { return str; },
|
||||
res: _res
|
||||
},
|
||||
extend = function (base, props, override, res) {
|
||||
var obj = {}, key;
|
||||
|
||||
for (key in base) {
|
||||
obj[key] = base[key];
|
||||
}
|
||||
for (key in props || {}) {
|
||||
if (!(!!override ^ !!obj[key])) {
|
||||
obj[key] = props[key];
|
||||
}
|
||||
}
|
||||
if (res) {
|
||||
obj.res = res;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
proto = {
|
||||
_formatter: _formatter,
|
||||
_parser: _parser
|
||||
},
|
||||
date;
|
||||
|
||||
/**
|
||||
* Compiling format strings
|
||||
* @param {string} formatString - A format string
|
||||
* @returns {Array.<string>} A compiled object
|
||||
*/
|
||||
proto.compile = function (formatString) {
|
||||
return [formatString].concat(formatString.match(/\[(?:[^[\]]|\[[^[\]]*])*]|([A-Za-z])\1*|\.{3}|./g) || []);
|
||||
};
|
||||
|
||||
/**
|
||||
* Formatting date and time objects (Date -> String)
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {string|Array.<string>} arg - A format string or its compiled object
|
||||
* @param {boolean} [utc] - Output as UTC
|
||||
* @returns {string} A formatted string
|
||||
*/
|
||||
proto.format = function (dateObj, arg, utc) {
|
||||
var ctx = this || date, pattern = typeof arg === 'string' ? ctx.compile(arg) : arg,
|
||||
formatter = ctx._formatter,
|
||||
d = (function () {
|
||||
if (utc) {
|
||||
var u = new Date(dateObj.getTime());
|
||||
|
||||
u.getFullYear = u.getUTCFullYear;
|
||||
u.getMonth = u.getUTCMonth;
|
||||
u.getDate = u.getUTCDate;
|
||||
u.getHours = u.getUTCHours;
|
||||
u.getMinutes = u.getUTCMinutes;
|
||||
u.getSeconds = u.getUTCSeconds;
|
||||
u.getMilliseconds = u.getUTCMilliseconds;
|
||||
u.getDay = u.getUTCDay;
|
||||
u.getTimezoneOffset = function () { return 0; };
|
||||
u.getTimezoneName = function () { return 'UTC'; };
|
||||
return u;
|
||||
}
|
||||
return dateObj;
|
||||
}()),
|
||||
comment = /^\[(.*)\]$/, str = '';
|
||||
|
||||
for (var i = 1, len = pattern.length, token; i < len; i++) {
|
||||
token = pattern[i];
|
||||
str += formatter[token]
|
||||
? formatter.post(formatter[token](d, pattern[0]))
|
||||
: comment.test(token) ? token.replace(comment, '$1') : token;
|
||||
}
|
||||
return str;
|
||||
};
|
||||
|
||||
/**
|
||||
* Pre-parsing date and time strings
|
||||
* @param {string} dateString - A date and time string
|
||||
* @param {string|Array.<string>} arg - A format string or its compiled object
|
||||
* @param {boolean} [utc] - Input as UTC
|
||||
* @returns {Object} A pre-parsed result object
|
||||
*/
|
||||
proto.preparse = function (dateString, arg) {
|
||||
var ctx = this || date, pattern = typeof arg === 'string' ? ctx.compile(arg) : arg,
|
||||
parser = ctx._parser,
|
||||
dt = { Y: 1970, M: 1, D: 1, H: 0, A: 0, h: 0, m: 0, s: 0, S: 0, Z: 0, _index: 0, _length: 0, _match: 0 },
|
||||
wildcard = ' ', comment = /^\[(.*)\]$/, ellipsis = '...';
|
||||
|
||||
dateString = parser.pre(dateString);
|
||||
for (var i = 1, len = pattern.length, token, str, result; i < len; i++) {
|
||||
token = pattern[i];
|
||||
str = dateString.substring(dt._index);
|
||||
|
||||
if (parser[token]) {
|
||||
result = parser[token](str, pattern[0]);
|
||||
if (!result.length) {
|
||||
break;
|
||||
}
|
||||
dt[result.token || token.charAt(0)] = result.value;
|
||||
dt._index += result.length;
|
||||
dt._match++;
|
||||
} else if (token === str.charAt(0) || token === wildcard) {
|
||||
dt._index++;
|
||||
} else if (comment.test(token) && !str.indexOf(token.replace(comment, '$1'))) {
|
||||
dt._index += token.length - 2;
|
||||
} else if (token === ellipsis) {
|
||||
dt._index = dateString.length;
|
||||
break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
dt.H = dt.H || parser.h12(dt.h, dt.A);
|
||||
dt._length = dateString.length;
|
||||
return dt;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parsing of date and time string (String -> Date)
|
||||
* @param {string} dateString - A date-time string
|
||||
* @param {string|Array.<string>} arg - A format string or its compiled object
|
||||
* @param {boolean} [utc] - Input as UTC
|
||||
* @returns {Date} A Date object
|
||||
*/
|
||||
proto.parse = function (dateString, arg, utc) {
|
||||
var ctx = this || date, pattern = typeof arg === 'string' ? ctx.compile(arg) : arg,
|
||||
dt = ctx.preparse(dateString, pattern);
|
||||
|
||||
if (ctx.isValid(dt)) {
|
||||
dt.M -= dt.Y < 100 ? 22801 : 1; // 22801 = 1900 * 12 + 1
|
||||
if (utc || ~ctx._parser.find(pattern, 'ZZ').value) {
|
||||
return new Date(Date.UTC(dt.Y, dt.M, dt.D, dt.H, dt.m + dt.Z, dt.s, dt.S));
|
||||
}
|
||||
return new Date(dt.Y, dt.M, dt.D, dt.H, dt.m, dt.s, dt.S);
|
||||
}
|
||||
return new Date(NaN);
|
||||
};
|
||||
|
||||
/**
|
||||
* Date and time string validation
|
||||
* @param {Object|string} arg1 - A pre-parsed result object or a date and time string
|
||||
* @param {string|Array.<string>} [arg2] - A format string or its compiled object
|
||||
* @returns {boolean} Whether the date and time string is a valid date and time
|
||||
*/
|
||||
proto.isValid = function (arg1, arg2) {
|
||||
var ctx = this || date, dt = typeof arg1 === 'string' ? ctx.preparse(arg1, arg2) : arg1;
|
||||
|
||||
return !(
|
||||
dt._index < 1 || dt._length < 1 || dt._index - dt._length || dt._match < 1
|
||||
|| dt.Y < 1 || dt.Y > 9999 || dt.M < 1 || dt.M > 12 || dt.D < 1 || dt.D > new Date(dt.Y, dt.M, 0).getDate()
|
||||
|| dt.H < 0 || dt.H > 23 || dt.m < 0 || dt.m > 59 || dt.s < 0 || dt.s > 59 || dt.S < 0 || dt.S > 999
|
||||
|| dt.Z < -840 || dt.Z > 720
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Format transformation of date and time string (String -> String)
|
||||
* @param {string} dateString - A date and time string
|
||||
* @param {string|Array.<string>} arg1 - A format string or its compiled object before transformation
|
||||
* @param {string|Array.<string>} arg2 - A format string or its compiled object after transformation
|
||||
* @param {boolean} [utc] - Output as UTC
|
||||
* @returns {string} A formatted string
|
||||
*/
|
||||
proto.transform = function (dateString, arg1, arg2, utc) {
|
||||
const ctx = this || date;
|
||||
return ctx.format(ctx.parse(dateString, arg1), arg2, utc);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding years
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} years - Number of years to add
|
||||
* @param {boolean} [utc] - Calculates as UTC
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addYears = function (dateObj, years, utc) {
|
||||
return (this || date).addMonths(dateObj, years * 12, utc);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding months
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} months - Number of months to add
|
||||
* @param {boolean} [utc] - Calculates as UTC
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addMonths = function (dateObj, months, utc) {
|
||||
var d = new Date(dateObj.getTime());
|
||||
|
||||
if (utc) {
|
||||
d.setUTCMonth(d.getUTCMonth() + months);
|
||||
if (d.getUTCDate() < dateObj.getUTCDate()) {
|
||||
d.setUTCDate(0);
|
||||
return d;
|
||||
}
|
||||
} else {
|
||||
d.setMonth(d.getMonth() + months);
|
||||
if (d.getDate() < dateObj.getDate()) {
|
||||
d.setDate(0);
|
||||
return d;
|
||||
}
|
||||
}
|
||||
return d;
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding days
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} days - Number of days to add
|
||||
* @param {boolean} [utc] - Calculates as UTC
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addDays = function (dateObj, days, utc) {
|
||||
var d = new Date(dateObj.getTime());
|
||||
|
||||
if (utc) {
|
||||
d.setUTCDate(d.getUTCDate() + days);
|
||||
} else {
|
||||
d.setDate(d.getDate() + days);
|
||||
}
|
||||
return d;
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding hours
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} hours - Number of hours to add
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addHours = function (dateObj, hours) {
|
||||
return new Date(dateObj.getTime() + hours * 60 * 60 * 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding minutes
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} minutes - Number of minutes to add
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addMinutes = function (dateObj, minutes) {
|
||||
return new Date(dateObj.getTime() + minutes * 60 * 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding seconds
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} seconds - Number of seconds to add
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addSeconds = function (dateObj, seconds) {
|
||||
return new Date(dateObj.getTime() + seconds * 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding milliseconds
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} milliseconds - Number of milliseconds to add
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addMilliseconds = function (dateObj, milliseconds) {
|
||||
return new Date(dateObj.getTime() + milliseconds);
|
||||
};
|
||||
|
||||
/**
|
||||
* Subtracting two dates (date1 - date2)
|
||||
* @param {Date} date1 - A Date object
|
||||
* @param {Date} date2 - A Date object
|
||||
* @returns {Object} The result object of subtracting date2 from date1
|
||||
*/
|
||||
proto.subtract = function (date1, date2) {
|
||||
var delta = date1.getTime() - date2.getTime();
|
||||
|
||||
return {
|
||||
toMilliseconds: function () {
|
||||
return delta;
|
||||
},
|
||||
toSeconds: function () {
|
||||
return delta / 1000;
|
||||
},
|
||||
toMinutes: function () {
|
||||
return delta / 60000;
|
||||
},
|
||||
toHours: function () {
|
||||
return delta / 3600000;
|
||||
},
|
||||
toDays: function () {
|
||||
return delta / 86400000;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Whether a year is a leap year
|
||||
* @param {number} y - A year to check
|
||||
* @returns {boolean} Whether the year is a leap year
|
||||
*/
|
||||
proto.isLeapYear = function (y) {
|
||||
return (!(y % 4) && !!(y % 100)) || !(y % 400);
|
||||
};
|
||||
|
||||
/**
|
||||
* Comparison of two dates
|
||||
* @param {Date} date1 - A Date object
|
||||
* @param {Date} date2 - A Date object
|
||||
* @returns {boolean} Whether the two dates are the same day (time is ignored)
|
||||
*/
|
||||
proto.isSameDay = function (date1, date2) {
|
||||
return date1.toDateString() === date2.toDateString();
|
||||
};
|
||||
|
||||
/**
|
||||
* Definition of new locale
|
||||
* @param {string} code - A language code
|
||||
* @param {Function} locale - A locale installer
|
||||
* @returns {void}
|
||||
*/
|
||||
proto.locale = function (code, locale) {
|
||||
if (!locales[code]) {
|
||||
locales[code] = locale;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Definition of new plugin
|
||||
* @param {string} name - A plugin name
|
||||
* @param {Function} plugin - A plugin installer
|
||||
* @returns {void}
|
||||
*/
|
||||
proto.plugin = function (name, plugin) {
|
||||
if (!plugins[name]) {
|
||||
plugins[name] = plugin;
|
||||
}
|
||||
};
|
||||
|
||||
date = extend(proto);
|
||||
|
||||
/**
|
||||
* Changing locales
|
||||
* @param {Function|string} [locale] - A locale installer or language code
|
||||
* @returns {string} The current language code
|
||||
*/
|
||||
date.locale = function (locale) {
|
||||
var install = typeof locale === 'function' ? locale : date.locale[locale];
|
||||
|
||||
if (!install) {
|
||||
return lang;
|
||||
}
|
||||
lang = install(proto);
|
||||
|
||||
var extension = locales[lang] || {};
|
||||
var res = extend(_res, extension.res, true);
|
||||
var formatter = extend(_formatter, extension.formatter, true, res);
|
||||
var parser = extend(_parser, extension.parser, true, res);
|
||||
|
||||
date._formatter = formatter;
|
||||
date._parser = parser;
|
||||
|
||||
for (var plugin in plugins) {
|
||||
date.extend(plugins[plugin]);
|
||||
}
|
||||
|
||||
return lang;
|
||||
};
|
||||
|
||||
/**
|
||||
* Functional extension
|
||||
* @param {Object} extension - An extension object
|
||||
* @returns {void}
|
||||
*/
|
||||
date.extend = function (extension) {
|
||||
var res = extend(date._parser.res, extension.res);
|
||||
var extender = extension.extender || {};
|
||||
|
||||
date._formatter = extend(date._formatter, extension.formatter, false, res);
|
||||
date._parser = extend(date._parser, extension.parser, false, res);
|
||||
|
||||
for (var key in extender) {
|
||||
if (!date[key]) {
|
||||
date[key] = extender[key];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Importing plugins
|
||||
* @param {Function|string} plugin - A plugin installer or plugin name
|
||||
* @returns {void}
|
||||
*/
|
||||
date.plugin = function (plugin) {
|
||||
var install = typeof plugin === 'function' ? plugin : date.plugin[plugin];
|
||||
|
||||
if (install) {
|
||||
date.extend(plugins[install(proto, date)] || {});
|
||||
}
|
||||
};
|
||||
|
||||
var date$1 = date;
|
||||
|
||||
export { date$1 as default };
|
||||
4
node_modules/date-and-time/esm/date-and-time.es.min.js
generated
vendored
Normal file
4
node_modules/date-and-time/esm/date-and-time.es.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
512
node_modules/date-and-time/esm/date-and-time.mjs
generated
vendored
Normal file
512
node_modules/date-and-time/esm/date-and-time.mjs
generated
vendored
Normal file
@ -0,0 +1,512 @@
|
||||
/**
|
||||
* @preserve date-and-time (c) KNOWLEDGECODE | MIT
|
||||
*/
|
||||
|
||||
var locales = {},
|
||||
plugins = {},
|
||||
lang = 'en',
|
||||
_res = {
|
||||
MMMM: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
||||
MMM: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
dddd: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
ddd: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
||||
dd: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
|
||||
A: ['AM', 'PM']
|
||||
},
|
||||
_formatter = {
|
||||
YYYY: function (d/*, formatString*/) { return ('000' + d.getFullYear()).slice(-4); },
|
||||
YY: function (d/*, formatString*/) { return ('0' + d.getFullYear()).slice(-2); },
|
||||
Y: function (d/*, formatString*/) { return '' + d.getFullYear(); },
|
||||
MMMM: function (d/*, formatString*/) { return this.res.MMMM[d.getMonth()]; },
|
||||
MMM: function (d/*, formatString*/) { return this.res.MMM[d.getMonth()]; },
|
||||
MM: function (d/*, formatString*/) { return ('0' + (d.getMonth() + 1)).slice(-2); },
|
||||
M: function (d/*, formatString*/) { return '' + (d.getMonth() + 1); },
|
||||
DD: function (d/*, formatString*/) { return ('0' + d.getDate()).slice(-2); },
|
||||
D: function (d/*, formatString*/) { return '' + d.getDate(); },
|
||||
HH: function (d/*, formatString*/) { return ('0' + d.getHours()).slice(-2); },
|
||||
H: function (d/*, formatString*/) { return '' + d.getHours(); },
|
||||
A: function (d/*, formatString*/) { return this.res.A[d.getHours() > 11 | 0]; },
|
||||
hh: function (d/*, formatString*/) { return ('0' + (d.getHours() % 12 || 12)).slice(-2); },
|
||||
h: function (d/*, formatString*/) { return '' + (d.getHours() % 12 || 12); },
|
||||
mm: function (d/*, formatString*/) { return ('0' + d.getMinutes()).slice(-2); },
|
||||
m: function (d/*, formatString*/) { return '' + d.getMinutes(); },
|
||||
ss: function (d/*, formatString*/) { return ('0' + d.getSeconds()).slice(-2); },
|
||||
s: function (d/*, formatString*/) { return '' + d.getSeconds(); },
|
||||
SSS: function (d/*, formatString*/) { return ('00' + d.getMilliseconds()).slice(-3); },
|
||||
SS: function (d/*, formatString*/) { return ('0' + (d.getMilliseconds() / 10 | 0)).slice(-2); },
|
||||
S: function (d/*, formatString*/) { return '' + (d.getMilliseconds() / 100 | 0); },
|
||||
dddd: function (d/*, formatString*/) { return this.res.dddd[d.getDay()]; },
|
||||
ddd: function (d/*, formatString*/) { return this.res.ddd[d.getDay()]; },
|
||||
dd: function (d/*, formatString*/) { return this.res.dd[d.getDay()]; },
|
||||
Z: function (d/*, formatString*/) {
|
||||
var offset = d.getTimezoneOffset() / 0.6 | 0;
|
||||
return (offset > 0 ? '-' : '+') + ('000' + Math.abs(offset - (offset % 100 * 0.4 | 0))).slice(-4);
|
||||
},
|
||||
ZZ: function (d/*, formatString*/) {
|
||||
var offset = d.getTimezoneOffset();
|
||||
var mod = Math.abs(offset);
|
||||
return (offset > 0 ? '-' : '+') + ('0' + (mod / 60 | 0)).slice(-2) + ':' + ('0' + mod % 60).slice(-2);
|
||||
},
|
||||
post: function (str) { return str; },
|
||||
res: _res
|
||||
},
|
||||
_parser = {
|
||||
YYYY: function (str/*, formatString */) { return this.exec(/^\d{4}/, str); },
|
||||
Y: function (str/*, formatString */) { return this.exec(/^\d{1,4}/, str); },
|
||||
MMMM: function (str/*, formatString */) {
|
||||
var result = this.find(this.res.MMMM, str);
|
||||
result.value++;
|
||||
return result;
|
||||
},
|
||||
MMM: function (str/*, formatString */) {
|
||||
var result = this.find(this.res.MMM, str);
|
||||
result.value++;
|
||||
return result;
|
||||
},
|
||||
MM: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
M: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
DD: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
D: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
HH: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
H: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
A: function (str/*, formatString */) { return this.find(this.res.A, str); },
|
||||
hh: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
h: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
mm: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
m: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
ss: function (str/*, formatString */) { return this.exec(/^\d\d/, str); },
|
||||
s: function (str/*, formatString */) { return this.exec(/^\d\d?/, str); },
|
||||
SSS: function (str/*, formatString */) { return this.exec(/^\d{1,3}/, str); },
|
||||
SS: function (str/*, formatString */) {
|
||||
var result = this.exec(/^\d\d?/, str);
|
||||
result.value *= 10;
|
||||
return result;
|
||||
},
|
||||
S: function (str/*, formatString */) {
|
||||
var result = this.exec(/^\d/, str);
|
||||
result.value *= 100;
|
||||
return result;
|
||||
},
|
||||
Z: function (str/*, formatString */) {
|
||||
var result = this.exec(/^[+-]\d{2}[0-5]\d/, str);
|
||||
result.value = (result.value / 100 | 0) * -60 - result.value % 100;
|
||||
return result;
|
||||
},
|
||||
ZZ: function (str/*, formatString */) {
|
||||
var arr = /^([+-])(\d{2}):([0-5]\d)/.exec(str) || ['', '', '', ''];
|
||||
return { value: 0 - ((arr[1] + arr[2] | 0) * 60 + (arr[1] + arr[3] | 0)), length: arr[0].length };
|
||||
},
|
||||
h12: function (h, a) { return (h === 12 ? 0 : h) + a * 12; },
|
||||
exec: function (re, str) {
|
||||
var result = (re.exec(str) || [''])[0];
|
||||
return { value: result | 0, length: result.length };
|
||||
},
|
||||
find: function (array, str) {
|
||||
var index = -1, length = 0;
|
||||
|
||||
for (var i = 0, len = array.length, item; i < len; i++) {
|
||||
item = array[i];
|
||||
if (!str.indexOf(item) && item.length > length) {
|
||||
index = i;
|
||||
length = item.length;
|
||||
}
|
||||
}
|
||||
return { value: index, length: length };
|
||||
},
|
||||
pre: function (str) { return str; },
|
||||
res: _res
|
||||
},
|
||||
extend = function (base, props, override, res) {
|
||||
var obj = {}, key;
|
||||
|
||||
for (key in base) {
|
||||
obj[key] = base[key];
|
||||
}
|
||||
for (key in props || {}) {
|
||||
if (!(!!override ^ !!obj[key])) {
|
||||
obj[key] = props[key];
|
||||
}
|
||||
}
|
||||
if (res) {
|
||||
obj.res = res;
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
proto = {
|
||||
_formatter: _formatter,
|
||||
_parser: _parser
|
||||
},
|
||||
date;
|
||||
|
||||
/**
|
||||
* Compiling format strings
|
||||
* @param {string} formatString - A format string
|
||||
* @returns {Array.<string>} A compiled object
|
||||
*/
|
||||
proto.compile = function (formatString) {
|
||||
return [formatString].concat(formatString.match(/\[(?:[^[\]]|\[[^[\]]*])*]|([A-Za-z])\1*|\.{3}|./g) || []);
|
||||
};
|
||||
|
||||
/**
|
||||
* Formatting date and time objects (Date -> String)
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {string|Array.<string>} arg - A format string or its compiled object
|
||||
* @param {boolean} [utc] - Output as UTC
|
||||
* @returns {string} A formatted string
|
||||
*/
|
||||
proto.format = function (dateObj, arg, utc) {
|
||||
var ctx = this || date, pattern = typeof arg === 'string' ? ctx.compile(arg) : arg,
|
||||
formatter = ctx._formatter,
|
||||
d = (function () {
|
||||
if (utc) {
|
||||
var u = new Date(dateObj.getTime());
|
||||
|
||||
u.getFullYear = u.getUTCFullYear;
|
||||
u.getMonth = u.getUTCMonth;
|
||||
u.getDate = u.getUTCDate;
|
||||
u.getHours = u.getUTCHours;
|
||||
u.getMinutes = u.getUTCMinutes;
|
||||
u.getSeconds = u.getUTCSeconds;
|
||||
u.getMilliseconds = u.getUTCMilliseconds;
|
||||
u.getDay = u.getUTCDay;
|
||||
u.getTimezoneOffset = function () { return 0; };
|
||||
u.getTimezoneName = function () { return 'UTC'; };
|
||||
return u;
|
||||
}
|
||||
return dateObj;
|
||||
}()),
|
||||
comment = /^\[(.*)\]$/, str = '';
|
||||
|
||||
for (var i = 1, len = pattern.length, token; i < len; i++) {
|
||||
token = pattern[i];
|
||||
str += formatter[token]
|
||||
? formatter.post(formatter[token](d, pattern[0]))
|
||||
: comment.test(token) ? token.replace(comment, '$1') : token;
|
||||
}
|
||||
return str;
|
||||
};
|
||||
|
||||
/**
|
||||
* Pre-parsing date and time strings
|
||||
* @param {string} dateString - A date and time string
|
||||
* @param {string|Array.<string>} arg - A format string or its compiled object
|
||||
* @param {boolean} [utc] - Input as UTC
|
||||
* @returns {Object} A pre-parsed result object
|
||||
*/
|
||||
proto.preparse = function (dateString, arg) {
|
||||
var ctx = this || date, pattern = typeof arg === 'string' ? ctx.compile(arg) : arg,
|
||||
parser = ctx._parser,
|
||||
dt = { Y: 1970, M: 1, D: 1, H: 0, A: 0, h: 0, m: 0, s: 0, S: 0, Z: 0, _index: 0, _length: 0, _match: 0 },
|
||||
wildcard = ' ', comment = /^\[(.*)\]$/, ellipsis = '...';
|
||||
|
||||
dateString = parser.pre(dateString);
|
||||
for (var i = 1, len = pattern.length, token, str, result; i < len; i++) {
|
||||
token = pattern[i];
|
||||
str = dateString.substring(dt._index);
|
||||
|
||||
if (parser[token]) {
|
||||
result = parser[token](str, pattern[0]);
|
||||
if (!result.length) {
|
||||
break;
|
||||
}
|
||||
dt[result.token || token.charAt(0)] = result.value;
|
||||
dt._index += result.length;
|
||||
dt._match++;
|
||||
} else if (token === str.charAt(0) || token === wildcard) {
|
||||
dt._index++;
|
||||
} else if (comment.test(token) && !str.indexOf(token.replace(comment, '$1'))) {
|
||||
dt._index += token.length - 2;
|
||||
} else if (token === ellipsis) {
|
||||
dt._index = dateString.length;
|
||||
break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
dt.H = dt.H || parser.h12(dt.h, dt.A);
|
||||
dt._length = dateString.length;
|
||||
return dt;
|
||||
};
|
||||
|
||||
/**
|
||||
* Parsing of date and time string (String -> Date)
|
||||
* @param {string} dateString - A date-time string
|
||||
* @param {string|Array.<string>} arg - A format string or its compiled object
|
||||
* @param {boolean} [utc] - Input as UTC
|
||||
* @returns {Date} A Date object
|
||||
*/
|
||||
proto.parse = function (dateString, arg, utc) {
|
||||
var ctx = this || date, pattern = typeof arg === 'string' ? ctx.compile(arg) : arg,
|
||||
dt = ctx.preparse(dateString, pattern);
|
||||
|
||||
if (ctx.isValid(dt)) {
|
||||
dt.M -= dt.Y < 100 ? 22801 : 1; // 22801 = 1900 * 12 + 1
|
||||
if (utc || ~ctx._parser.find(pattern, 'ZZ').value) {
|
||||
return new Date(Date.UTC(dt.Y, dt.M, dt.D, dt.H, dt.m + dt.Z, dt.s, dt.S));
|
||||
}
|
||||
return new Date(dt.Y, dt.M, dt.D, dt.H, dt.m, dt.s, dt.S);
|
||||
}
|
||||
return new Date(NaN);
|
||||
};
|
||||
|
||||
/**
|
||||
* Date and time string validation
|
||||
* @param {Object|string} arg1 - A pre-parsed result object or a date and time string
|
||||
* @param {string|Array.<string>} [arg2] - A format string or its compiled object
|
||||
* @returns {boolean} Whether the date and time string is a valid date and time
|
||||
*/
|
||||
proto.isValid = function (arg1, arg2) {
|
||||
var ctx = this || date, dt = typeof arg1 === 'string' ? ctx.preparse(arg1, arg2) : arg1;
|
||||
|
||||
return !(
|
||||
dt._index < 1 || dt._length < 1 || dt._index - dt._length || dt._match < 1
|
||||
|| dt.Y < 1 || dt.Y > 9999 || dt.M < 1 || dt.M > 12 || dt.D < 1 || dt.D > new Date(dt.Y, dt.M, 0).getDate()
|
||||
|| dt.H < 0 || dt.H > 23 || dt.m < 0 || dt.m > 59 || dt.s < 0 || dt.s > 59 || dt.S < 0 || dt.S > 999
|
||||
|| dt.Z < -840 || dt.Z > 720
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* Format transformation of date and time string (String -> String)
|
||||
* @param {string} dateString - A date and time string
|
||||
* @param {string|Array.<string>} arg1 - A format string or its compiled object before transformation
|
||||
* @param {string|Array.<string>} arg2 - A format string or its compiled object after transformation
|
||||
* @param {boolean} [utc] - Output as UTC
|
||||
* @returns {string} A formatted string
|
||||
*/
|
||||
proto.transform = function (dateString, arg1, arg2, utc) {
|
||||
const ctx = this || date;
|
||||
return ctx.format(ctx.parse(dateString, arg1), arg2, utc);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding years
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} years - Number of years to add
|
||||
* @param {boolean} [utc] - Calculates as UTC
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addYears = function (dateObj, years, utc) {
|
||||
return (this || date).addMonths(dateObj, years * 12, utc);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding months
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} months - Number of months to add
|
||||
* @param {boolean} [utc] - Calculates as UTC
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addMonths = function (dateObj, months, utc) {
|
||||
var d = new Date(dateObj.getTime());
|
||||
|
||||
if (utc) {
|
||||
d.setUTCMonth(d.getUTCMonth() + months);
|
||||
if (d.getUTCDate() < dateObj.getUTCDate()) {
|
||||
d.setUTCDate(0);
|
||||
return d;
|
||||
}
|
||||
} else {
|
||||
d.setMonth(d.getMonth() + months);
|
||||
if (d.getDate() < dateObj.getDate()) {
|
||||
d.setDate(0);
|
||||
return d;
|
||||
}
|
||||
}
|
||||
return d;
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding days
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} days - Number of days to add
|
||||
* @param {boolean} [utc] - Calculates as UTC
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addDays = function (dateObj, days, utc) {
|
||||
var d = new Date(dateObj.getTime());
|
||||
|
||||
if (utc) {
|
||||
d.setUTCDate(d.getUTCDate() + days);
|
||||
} else {
|
||||
d.setDate(d.getDate() + days);
|
||||
}
|
||||
return d;
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding hours
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} hours - Number of hours to add
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addHours = function (dateObj, hours) {
|
||||
return new Date(dateObj.getTime() + hours * 60 * 60 * 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding minutes
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} minutes - Number of minutes to add
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addMinutes = function (dateObj, minutes) {
|
||||
return new Date(dateObj.getTime() + minutes * 60 * 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding seconds
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} seconds - Number of seconds to add
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addSeconds = function (dateObj, seconds) {
|
||||
return new Date(dateObj.getTime() + seconds * 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* Adding milliseconds
|
||||
* @param {Date} dateObj - A Date object
|
||||
* @param {number} milliseconds - Number of milliseconds to add
|
||||
* @returns {Date} The Date object after adding the value
|
||||
*/
|
||||
proto.addMilliseconds = function (dateObj, milliseconds) {
|
||||
return new Date(dateObj.getTime() + milliseconds);
|
||||
};
|
||||
|
||||
/**
|
||||
* Subtracting two dates (date1 - date2)
|
||||
* @param {Date} date1 - A Date object
|
||||
* @param {Date} date2 - A Date object
|
||||
* @returns {Object} The result object of subtracting date2 from date1
|
||||
*/
|
||||
proto.subtract = function (date1, date2) {
|
||||
var delta = date1.getTime() - date2.getTime();
|
||||
|
||||
return {
|
||||
toMilliseconds: function () {
|
||||
return delta;
|
||||
},
|
||||
toSeconds: function () {
|
||||
return delta / 1000;
|
||||
},
|
||||
toMinutes: function () {
|
||||
return delta / 60000;
|
||||
},
|
||||
toHours: function () {
|
||||
return delta / 3600000;
|
||||
},
|
||||
toDays: function () {
|
||||
return delta / 86400000;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Whether a year is a leap year
|
||||
* @param {number} y - A year to check
|
||||
* @returns {boolean} Whether the year is a leap year
|
||||
*/
|
||||
proto.isLeapYear = function (y) {
|
||||
return (!(y % 4) && !!(y % 100)) || !(y % 400);
|
||||
};
|
||||
|
||||
/**
|
||||
* Comparison of two dates
|
||||
* @param {Date} date1 - A Date object
|
||||
* @param {Date} date2 - A Date object
|
||||
* @returns {boolean} Whether the two dates are the same day (time is ignored)
|
||||
*/
|
||||
proto.isSameDay = function (date1, date2) {
|
||||
return date1.toDateString() === date2.toDateString();
|
||||
};
|
||||
|
||||
/**
|
||||
* Definition of new locale
|
||||
* @param {string} code - A language code
|
||||
* @param {Function} locale - A locale installer
|
||||
* @returns {void}
|
||||
*/
|
||||
proto.locale = function (code, locale) {
|
||||
if (!locales[code]) {
|
||||
locales[code] = locale;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Definition of new plugin
|
||||
* @param {string} name - A plugin name
|
||||
* @param {Function} plugin - A plugin installer
|
||||
* @returns {void}
|
||||
*/
|
||||
proto.plugin = function (name, plugin) {
|
||||
if (!plugins[name]) {
|
||||
plugins[name] = plugin;
|
||||
}
|
||||
};
|
||||
|
||||
date = extend(proto);
|
||||
|
||||
/**
|
||||
* Changing locales
|
||||
* @param {Function|string} [locale] - A locale installer or language code
|
||||
* @returns {string} The current language code
|
||||
*/
|
||||
date.locale = function (locale) {
|
||||
var install = typeof locale === 'function' ? locale : date.locale[locale];
|
||||
|
||||
if (!install) {
|
||||
return lang;
|
||||
}
|
||||
lang = install(proto);
|
||||
|
||||
var extension = locales[lang] || {};
|
||||
var res = extend(_res, extension.res, true);
|
||||
var formatter = extend(_formatter, extension.formatter, true, res);
|
||||
var parser = extend(_parser, extension.parser, true, res);
|
||||
|
||||
date._formatter = formatter;
|
||||
date._parser = parser;
|
||||
|
||||
for (var plugin in plugins) {
|
||||
date.extend(plugins[plugin]);
|
||||
}
|
||||
|
||||
return lang;
|
||||
};
|
||||
|
||||
/**
|
||||
* Functional extension
|
||||
* @param {Object} extension - An extension object
|
||||
* @returns {void}
|
||||
*/
|
||||
date.extend = function (extension) {
|
||||
var res = extend(date._parser.res, extension.res);
|
||||
var extender = extension.extender || {};
|
||||
|
||||
date._formatter = extend(date._formatter, extension.formatter, false, res);
|
||||
date._parser = extend(date._parser, extension.parser, false, res);
|
||||
|
||||
for (var key in extender) {
|
||||
if (!date[key]) {
|
||||
date[key] = extender[key];
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Importing plugins
|
||||
* @param {Function|string} plugin - A plugin installer or plugin name
|
||||
* @returns {void}
|
||||
*/
|
||||
date.plugin = function (plugin) {
|
||||
var install = typeof plugin === 'function' ? plugin : date.plugin[plugin];
|
||||
|
||||
if (install) {
|
||||
date.extend(plugins[install(proto, date)] || {});
|
||||
}
|
||||
};
|
||||
|
||||
var date$1 = date;
|
||||
|
||||
export { date$1 as default };
|
||||
39
node_modules/date-and-time/esm/locale/ar.es.js
generated
vendored
Normal file
39
node_modules/date-and-time/esm/locale/ar.es.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Arabic (ar)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var ar = function (date) {
|
||||
var code = 'ar';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['كانون الثاني يناير', 'شباط فبراير', 'آذار مارس', 'نيسان أبريل', 'أيار مايو', 'حزيران يونيو', 'تموز يوليو', 'آب أغسطس', 'أيلول سبتمبر', 'تشرين الأول أكتوبر', 'تشرين الثاني نوفمبر', 'كانون الأول ديسمبر'],
|
||||
MMM: ['كانون الثاني يناير', 'شباط فبراير', 'آذار مارس', 'نيسان أبريل', 'أيار مايو', 'حزيران يونيو', 'تموز يوليو', 'آب أغسطس', 'أيلول سبتمبر', 'تشرين الأول أكتوبر', 'تشرين الثاني نوفمبر', 'كانون الأول ديسمبر'],
|
||||
dddd: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||
ddd: ['أحد', 'إثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
|
||||
dd: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
A: ['ص', 'م']
|
||||
},
|
||||
formatter: {
|
||||
post: function (str) {
|
||||
var num = ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'];
|
||||
return str.replace(/\d/g, function (i) {
|
||||
return num[i | 0];
|
||||
});
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
pre: function (str) {
|
||||
var map = { '٠': 0, '١': 1, '٢': 2, '٣': 3, '٤': 4, '٥': 5, '٦': 6, '٧': 7, '٨': 8, '٩': 9 };
|
||||
return str.replace(/[٠١٢٣٤٥٦٧٨٩]/g, function (i) {
|
||||
return '' + map[i];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { ar as default };
|
||||
39
node_modules/date-and-time/esm/locale/ar.mjs
generated
vendored
Normal file
39
node_modules/date-and-time/esm/locale/ar.mjs
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Arabic (ar)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var ar = function (date) {
|
||||
var code = 'ar';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['كانون الثاني يناير', 'شباط فبراير', 'آذار مارس', 'نيسان أبريل', 'أيار مايو', 'حزيران يونيو', 'تموز يوليو', 'آب أغسطس', 'أيلول سبتمبر', 'تشرين الأول أكتوبر', 'تشرين الثاني نوفمبر', 'كانون الأول ديسمبر'],
|
||||
MMM: ['كانون الثاني يناير', 'شباط فبراير', 'آذار مارس', 'نيسان أبريل', 'أيار مايو', 'حزيران يونيو', 'تموز يوليو', 'آب أغسطس', 'أيلول سبتمبر', 'تشرين الأول أكتوبر', 'تشرين الثاني نوفمبر', 'كانون الأول ديسمبر'],
|
||||
dddd: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||
ddd: ['أحد', 'إثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
|
||||
dd: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
A: ['ص', 'م']
|
||||
},
|
||||
formatter: {
|
||||
post: function (str) {
|
||||
var num = ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'];
|
||||
return str.replace(/\d/g, function (i) {
|
||||
return num[i | 0];
|
||||
});
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
pre: function (str) {
|
||||
var map = { '٠': 0, '١': 1, '٢': 2, '٣': 3, '٤': 4, '٥': 5, '٦': 6, '٧': 7, '٨': 8, '٩': 9 };
|
||||
return str.replace(/[٠١٢٣٤٥٦٧٨٩]/g, function (i) {
|
||||
return '' + map[i];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { ar as default };
|
||||
44
node_modules/date-and-time/esm/locale/az.es.js
generated
vendored
Normal file
44
node_modules/date-and-time/esm/locale/az.es.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Azerbaijani (az)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var az = function (date) {
|
||||
var code = 'az';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'],
|
||||
MMM: ['yan', 'fev', 'mar', 'apr', 'may', 'iyn', 'iyl', 'avq', 'sen', 'okt', 'noy', 'dek'],
|
||||
dddd: ['Bazar', 'Bazar ertəsi', 'Çərşənbə axşamı', 'Çərşənbə', 'Cümə axşamı', 'Cümə', 'Şənbə'],
|
||||
ddd: ['Baz', 'BzE', 'ÇAx', 'Çər', 'CAx', 'Cüm', 'Şən'],
|
||||
dd: ['Bz', 'BE', 'ÇA', 'Çə', 'CA', 'Cü', 'Şə'],
|
||||
A: ['gecə', 'səhər', 'gündüz', 'axşam']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // gecə
|
||||
} else if (h < 12) {
|
||||
return this.res.A[1]; // səhər
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // gündüz
|
||||
}
|
||||
return this.res.A[3]; // axşam
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 2) {
|
||||
return h; // gecə, səhər
|
||||
}
|
||||
return h > 11 ? h : h + 12; // gündüz, axşam
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { az as default };
|
||||
44
node_modules/date-and-time/esm/locale/az.mjs
generated
vendored
Normal file
44
node_modules/date-and-time/esm/locale/az.mjs
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Azerbaijani (az)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var az = function (date) {
|
||||
var code = 'az';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'],
|
||||
MMM: ['yan', 'fev', 'mar', 'apr', 'may', 'iyn', 'iyl', 'avq', 'sen', 'okt', 'noy', 'dek'],
|
||||
dddd: ['Bazar', 'Bazar ertəsi', 'Çərşənbə axşamı', 'Çərşənbə', 'Cümə axşamı', 'Cümə', 'Şənbə'],
|
||||
ddd: ['Baz', 'BzE', 'ÇAx', 'Çər', 'CAx', 'Cüm', 'Şən'],
|
||||
dd: ['Bz', 'BE', 'ÇA', 'Çə', 'CA', 'Cü', 'Şə'],
|
||||
A: ['gecə', 'səhər', 'gündüz', 'axşam']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // gecə
|
||||
} else if (h < 12) {
|
||||
return this.res.A[1]; // səhər
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // gündüz
|
||||
}
|
||||
return this.res.A[3]; // axşam
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 2) {
|
||||
return h; // gecə, səhər
|
||||
}
|
||||
return h > 11 ? h : h + 12; // gündüz, axşam
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { az as default };
|
||||
50
node_modules/date-and-time/esm/locale/bn.es.js
generated
vendored
Normal file
50
node_modules/date-and-time/esm/locale/bn.es.js
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Bengali (bn)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var bn = function (date) {
|
||||
var code = 'bn';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['জানুয়ারী', 'ফেবুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'অগাস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'],
|
||||
MMM: ['জানু', 'ফেব', 'মার্চ', 'এপর', 'মে', 'জুন', 'জুল', 'অগ', 'সেপ্ট', 'অক্টো', 'নভ', 'ডিসেম্'],
|
||||
dddd: ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পত্তিবার', 'শুক্রবার', 'শনিবার'],
|
||||
ddd: ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহস্পত্তি', 'শুক্র', 'শনি'],
|
||||
dd: ['রব', 'সম', 'মঙ্গ', 'বু', 'ব্রিহ', 'শু', 'শনি'],
|
||||
A: ['রাত', 'সকাল', 'দুপুর', 'বিকাল']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // রাত
|
||||
} else if (h < 10) {
|
||||
return this.res.A[1]; // সকাল
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // দুপুর
|
||||
} else if (h < 20) {
|
||||
return this.res.A[3]; // বিকাল
|
||||
}
|
||||
return this.res.A[0]; // রাত
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 1) {
|
||||
return h < 4 || h > 11 ? h : h + 12; // রাত
|
||||
} else if (a < 2) {
|
||||
return h; // সকাল
|
||||
} else if (a < 3) {
|
||||
return h > 9 ? h : h + 12; // দুপুর
|
||||
}
|
||||
return h + 12; // বিকাল
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { bn as default };
|
||||
50
node_modules/date-and-time/esm/locale/bn.mjs
generated
vendored
Normal file
50
node_modules/date-and-time/esm/locale/bn.mjs
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Bengali (bn)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var bn = function (date) {
|
||||
var code = 'bn';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['জানুয়ারী', 'ফেবুয়ারী', 'মার্চ', 'এপ্রিল', 'মে', 'জুন', 'জুলাই', 'অগাস্ট', 'সেপ্টেম্বর', 'অক্টোবর', 'নভেম্বর', 'ডিসেম্বর'],
|
||||
MMM: ['জানু', 'ফেব', 'মার্চ', 'এপর', 'মে', 'জুন', 'জুল', 'অগ', 'সেপ্ট', 'অক্টো', 'নভ', 'ডিসেম্'],
|
||||
dddd: ['রবিবার', 'সোমবার', 'মঙ্গলবার', 'বুধবার', 'বৃহস্পত্তিবার', 'শুক্রবার', 'শনিবার'],
|
||||
ddd: ['রবি', 'সোম', 'মঙ্গল', 'বুধ', 'বৃহস্পত্তি', 'শুক্র', 'শনি'],
|
||||
dd: ['রব', 'সম', 'মঙ্গ', 'বু', 'ব্রিহ', 'শু', 'শনি'],
|
||||
A: ['রাত', 'সকাল', 'দুপুর', 'বিকাল']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // রাত
|
||||
} else if (h < 10) {
|
||||
return this.res.A[1]; // সকাল
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // দুপুর
|
||||
} else if (h < 20) {
|
||||
return this.res.A[3]; // বিকাল
|
||||
}
|
||||
return this.res.A[0]; // রাত
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 1) {
|
||||
return h < 4 || h > 11 ? h : h + 12; // রাত
|
||||
} else if (a < 2) {
|
||||
return h; // সকাল
|
||||
} else if (a < 3) {
|
||||
return h > 9 ? h : h + 12; // দুপুর
|
||||
}
|
||||
return h + 12; // বিকাল
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { bn as default };
|
||||
22
node_modules/date-and-time/esm/locale/cs.es.js
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/cs.es.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Czech (cs)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var cs = function (date) {
|
||||
var code = 'cs';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'],
|
||||
MMM: ['led', 'úno', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'],
|
||||
dddd: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
|
||||
ddd: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
|
||||
dd: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { cs as default };
|
||||
22
node_modules/date-and-time/esm/locale/cs.mjs
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/cs.mjs
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Czech (cs)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var cs = function (date) {
|
||||
var code = 'cs';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['leden', 'únor', 'březen', 'duben', 'květen', 'červen', 'červenec', 'srpen', 'září', 'říjen', 'listopad', 'prosinec'],
|
||||
MMM: ['led', 'úno', 'bře', 'dub', 'kvě', 'čvn', 'čvc', 'srp', 'zář', 'říj', 'lis', 'pro'],
|
||||
dddd: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
|
||||
ddd: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
|
||||
dd: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { cs as default };
|
||||
23
node_modules/date-and-time/esm/locale/de.es.js
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/de.es.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve German (de)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var de = function (date) {
|
||||
var code = 'de';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
|
||||
MMM: ['Jan.', 'Febr.', 'Mrz.', 'Apr.', 'Mai', 'Jun.', 'Jul.', 'Aug.', 'Sept.', 'Okt.', 'Nov.', 'Dez.'],
|
||||
dddd: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
|
||||
ddd: ['So.', 'Mo.', 'Di.', 'Mi.', 'Do.', 'Fr.', 'Sa.'],
|
||||
dd: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
|
||||
A: ['Uhr nachmittags', 'Uhr morgens']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { de as default };
|
||||
23
node_modules/date-and-time/esm/locale/de.mjs
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/de.mjs
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve German (de)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var de = function (date) {
|
||||
var code = 'de';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'],
|
||||
MMM: ['Jan.', 'Febr.', 'Mrz.', 'Apr.', 'Mai', 'Jun.', 'Jul.', 'Aug.', 'Sept.', 'Okt.', 'Nov.', 'Dez.'],
|
||||
dddd: ['Sonntag', 'Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag'],
|
||||
ddd: ['So.', 'Mo.', 'Di.', 'Mi.', 'Do.', 'Fr.', 'Sa.'],
|
||||
dd: ['So', 'Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa'],
|
||||
A: ['Uhr nachmittags', 'Uhr morgens']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { de as default };
|
||||
22
node_modules/date-and-time/esm/locale/dk.es.js
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/dk.es.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Danish (DK)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var dk = function (date) {
|
||||
var code = 'dk';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december'],
|
||||
MMM: ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
|
||||
dddd: ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'],
|
||||
ddd: ['søn', 'man', 'tir', 'ons', 'tors', 'fre', 'lør'],
|
||||
dd: ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { dk as default };
|
||||
22
node_modules/date-and-time/esm/locale/dk.mjs
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/dk.mjs
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Danish (DK)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var dk = function (date) {
|
||||
var code = 'dk';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['januar', 'februar', 'marts', 'april', 'maj', 'juni', 'juli', 'august', 'september', 'oktober', 'november', 'december'],
|
||||
MMM: ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
|
||||
dddd: ['søndag', 'mandag', 'tirsdag', 'onsdag', 'torsdag', 'fredag', 'lørdag'],
|
||||
ddd: ['søn', 'man', 'tir', 'ons', 'tors', 'fre', 'lør'],
|
||||
dd: ['sø', 'ma', 'ti', 'on', 'to', 'fr', 'lø']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { dk as default };
|
||||
44
node_modules/date-and-time/esm/locale/el.es.js
generated
vendored
Normal file
44
node_modules/date-and-time/esm/locale/el.es.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Greek (el)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var el = function (date) {
|
||||
var code = 'el';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: [
|
||||
['Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος'],
|
||||
['Ιανουαρίου', 'Φεβρουαρίου', 'Μαρτίου', 'Απριλίου', 'Μαΐου', 'Ιουνίου', 'Ιουλίου', 'Αυγούστου', 'Σεπτεμβρίου', 'Οκτωβρίου', 'Νοεμβρίου', 'Δεκεμβρίου']
|
||||
],
|
||||
MMM: ['Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαϊ', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ'],
|
||||
dddd: ['Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο'],
|
||||
ddd: ['Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ'],
|
||||
dd: ['Κυ', 'Δε', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σα'],
|
||||
A: ['πμ', 'μμ']
|
||||
},
|
||||
formatter: {
|
||||
MMMM: function (d, formatString) {
|
||||
return this.res.MMMM[/D.*MMMM/.test(formatString) | 0][d.getMonth()];
|
||||
},
|
||||
hh: function (d) {
|
||||
return ('0' + d.getHours() % 12).slice(-2);
|
||||
},
|
||||
h: function (d) {
|
||||
return d.getHours() % 12;
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
MMMM: function (str, formatString) {
|
||||
var result = this.find(this.res.MMMM[/D.*MMMM/.test(formatString) | 0], str);
|
||||
result.value++;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { el as default };
|
||||
44
node_modules/date-and-time/esm/locale/el.mjs
generated
vendored
Normal file
44
node_modules/date-and-time/esm/locale/el.mjs
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Greek (el)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var el = function (date) {
|
||||
var code = 'el';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: [
|
||||
['Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος'],
|
||||
['Ιανουαρίου', 'Φεβρουαρίου', 'Μαρτίου', 'Απριλίου', 'Μαΐου', 'Ιουνίου', 'Ιουλίου', 'Αυγούστου', 'Σεπτεμβρίου', 'Οκτωβρίου', 'Νοεμβρίου', 'Δεκεμβρίου']
|
||||
],
|
||||
MMM: ['Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαϊ', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ'],
|
||||
dddd: ['Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο'],
|
||||
ddd: ['Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ'],
|
||||
dd: ['Κυ', 'Δε', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σα'],
|
||||
A: ['πμ', 'μμ']
|
||||
},
|
||||
formatter: {
|
||||
MMMM: function (d, formatString) {
|
||||
return this.res.MMMM[/D.*MMMM/.test(formatString) | 0][d.getMonth()];
|
||||
},
|
||||
hh: function (d) {
|
||||
return ('0' + d.getHours() % 12).slice(-2);
|
||||
},
|
||||
h: function (d) {
|
||||
return d.getHours() % 12;
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
MMMM: function (str, formatString) {
|
||||
var result = this.find(this.res.MMMM[/D.*MMMM/.test(formatString) | 0], str);
|
||||
result.value++;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { el as default };
|
||||
13
node_modules/date-and-time/esm/locale/en.es.js
generated
vendored
Normal file
13
node_modules/date-and-time/esm/locale/en.es.js
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Englis (en)
|
||||
* @preserve This is a dummy module.
|
||||
*/
|
||||
|
||||
var en = function (date) {
|
||||
var code = 'en';
|
||||
|
||||
return code;
|
||||
};
|
||||
|
||||
export { en as default };
|
||||
13
node_modules/date-and-time/esm/locale/en.mjs
generated
vendored
Normal file
13
node_modules/date-and-time/esm/locale/en.mjs
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Englis (en)
|
||||
* @preserve This is a dummy module.
|
||||
*/
|
||||
|
||||
var en = function (date) {
|
||||
var code = 'en';
|
||||
|
||||
return code;
|
||||
};
|
||||
|
||||
export { en as default };
|
||||
42
node_modules/date-and-time/esm/locale/es.es.js
generated
vendored
Normal file
42
node_modules/date-and-time/esm/locale/es.es.js
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Spanish (es)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var es = function (date) {
|
||||
var code = 'es';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'],
|
||||
MMM: ['ene.', 'feb.', 'mar.', 'abr.', 'may.', 'jun.', 'jul.', 'ago.', 'sep.', 'oct.', 'nov.', 'dic.'],
|
||||
dddd: ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'],
|
||||
ddd: ['dom.', 'lun.', 'mar.', 'mié.', 'jue.', 'vie.', 'sáb.'],
|
||||
dd: ['do', 'lu', 'ma', 'mi', 'ju', 'vi', 'sá'],
|
||||
A: ['de la mañana', 'de la tarde', 'de la noche']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 12) {
|
||||
return this.res.A[0]; // de la mañana
|
||||
} else if (h < 19) {
|
||||
return this.res.A[1]; // de la tarde
|
||||
}
|
||||
return this.res.A[2]; // de la noche
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 1) {
|
||||
return h; // de la mañana
|
||||
}
|
||||
return h > 11 ? h : h + 12; // de la tarde, de la noche
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { es as default };
|
||||
42
node_modules/date-and-time/esm/locale/es.mjs
generated
vendored
Normal file
42
node_modules/date-and-time/esm/locale/es.mjs
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Spanish (es)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var es = function (date) {
|
||||
var code = 'es';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'],
|
||||
MMM: ['ene.', 'feb.', 'mar.', 'abr.', 'may.', 'jun.', 'jul.', 'ago.', 'sep.', 'oct.', 'nov.', 'dic.'],
|
||||
dddd: ['domingo', 'lunes', 'martes', 'miércoles', 'jueves', 'viernes', 'sábado'],
|
||||
ddd: ['dom.', 'lun.', 'mar.', 'mié.', 'jue.', 'vie.', 'sáb.'],
|
||||
dd: ['do', 'lu', 'ma', 'mi', 'ju', 'vi', 'sá'],
|
||||
A: ['de la mañana', 'de la tarde', 'de la noche']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 12) {
|
||||
return this.res.A[0]; // de la mañana
|
||||
} else if (h < 19) {
|
||||
return this.res.A[1]; // de la tarde
|
||||
}
|
||||
return this.res.A[2]; // de la noche
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 1) {
|
||||
return h; // de la mañana
|
||||
}
|
||||
return h > 11 ? h : h + 12; // de la tarde, de la noche
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { es as default };
|
||||
39
node_modules/date-and-time/esm/locale/fa.es.js
generated
vendored
Normal file
39
node_modules/date-and-time/esm/locale/fa.es.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Persian (fa)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var fa = function (date) {
|
||||
var code = 'fa';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'],
|
||||
MMM: ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'],
|
||||
dddd: ['یکشنبه', 'دوشنبه', 'سهشنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'],
|
||||
ddd: ['یکشنبه', 'دوشنبه', 'سهشنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'],
|
||||
dd: ['ی', 'د', 'س', 'چ', 'پ', 'ج', 'ش'],
|
||||
A: ['قبل از ظهر', 'بعد از ظهر']
|
||||
},
|
||||
formatter: {
|
||||
post: function (str) {
|
||||
var num = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
|
||||
return str.replace(/\d/g, function (i) {
|
||||
return num[i | 0];
|
||||
});
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
pre: function (str) {
|
||||
var map = { '۰': 0, '۱': 1, '۲': 2, '۳': 3, '۴': 4, '۵': 5, '۶': 6, '۷': 7, '۸': 8, '۹': 9 };
|
||||
return str.replace(/[۰۱۲۳۴۵۶۷۸۹]/g, function (i) {
|
||||
return '' + map[i];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { fa as default };
|
||||
39
node_modules/date-and-time/esm/locale/fa.mjs
generated
vendored
Normal file
39
node_modules/date-and-time/esm/locale/fa.mjs
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Persian (fa)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var fa = function (date) {
|
||||
var code = 'fa';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'],
|
||||
MMM: ['ژانویه', 'فوریه', 'مارس', 'آوریل', 'مه', 'ژوئن', 'ژوئیه', 'اوت', 'سپتامبر', 'اکتبر', 'نوامبر', 'دسامبر'],
|
||||
dddd: ['یکشنبه', 'دوشنبه', 'سهشنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'],
|
||||
ddd: ['یکشنبه', 'دوشنبه', 'سهشنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'],
|
||||
dd: ['ی', 'د', 'س', 'چ', 'پ', 'ج', 'ش'],
|
||||
A: ['قبل از ظهر', 'بعد از ظهر']
|
||||
},
|
||||
formatter: {
|
||||
post: function (str) {
|
||||
var num = ['۰', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹'];
|
||||
return str.replace(/\d/g, function (i) {
|
||||
return num[i | 0];
|
||||
});
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
pre: function (str) {
|
||||
var map = { '۰': 0, '۱': 1, '۲': 2, '۳': 3, '۴': 4, '۵': 5, '۶': 6, '۷': 7, '۸': 8, '۹': 9 };
|
||||
return str.replace(/[۰۱۲۳۴۵۶۷۸۹]/g, function (i) {
|
||||
return '' + map[i];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { fa as default };
|
||||
23
node_modules/date-and-time/esm/locale/fr.es.js
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/fr.es.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve French (fr)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var fr = function (date) {
|
||||
var code = 'fr';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
|
||||
MMM: ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],
|
||||
dddd: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
|
||||
ddd: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
|
||||
dd: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'],
|
||||
A: ['matin', 'l\'après-midi']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { fr as default };
|
||||
23
node_modules/date-and-time/esm/locale/fr.mjs
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/fr.mjs
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve French (fr)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var fr = function (date) {
|
||||
var code = 'fr';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre'],
|
||||
MMM: ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juil.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],
|
||||
dddd: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi'],
|
||||
ddd: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
|
||||
dd: ['Di', 'Lu', 'Ma', 'Me', 'Je', 'Ve', 'Sa'],
|
||||
A: ['matin', 'l\'après-midi']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { fr as default };
|
||||
50
node_modules/date-and-time/esm/locale/hi.es.js
generated
vendored
Normal file
50
node_modules/date-and-time/esm/locale/hi.es.js
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Hindi (hi)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var hi = function (date) {
|
||||
var code = 'hi';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'],
|
||||
MMM: ['जन.', 'फ़र.', 'मार्च', 'अप्रै.', 'मई', 'जून', 'जुल.', 'अग.', 'सित.', 'अक्टू.', 'नव.', 'दिस.'],
|
||||
dddd: ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरूवार', 'शुक्रवार', 'शनिवार'],
|
||||
ddd: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरू', 'शुक्र', 'शनि'],
|
||||
dd: ['र', 'सो', 'मं', 'बु', 'गु', 'शु', 'श'],
|
||||
A: ['रात', 'सुबह', 'दोपहर', 'शाम']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // रात
|
||||
} else if (h < 10) {
|
||||
return this.res.A[1]; // सुबह
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // दोपहर
|
||||
} else if (h < 20) {
|
||||
return this.res.A[3]; // शाम
|
||||
}
|
||||
return this.res.A[0]; // रात
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 1) {
|
||||
return h < 4 || h > 11 ? h : h + 12; // रात
|
||||
} else if (a < 2) {
|
||||
return h; // सुबह
|
||||
} else if (a < 3) {
|
||||
return h > 9 ? h : h + 12; // दोपहर
|
||||
}
|
||||
return h + 12; // शाम
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { hi as default };
|
||||
50
node_modules/date-and-time/esm/locale/hi.mjs
generated
vendored
Normal file
50
node_modules/date-and-time/esm/locale/hi.mjs
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Hindi (hi)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var hi = function (date) {
|
||||
var code = 'hi';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['जनवरी', 'फ़रवरी', 'मार्च', 'अप्रैल', 'मई', 'जून', 'जुलाई', 'अगस्त', 'सितम्बर', 'अक्टूबर', 'नवम्बर', 'दिसम्बर'],
|
||||
MMM: ['जन.', 'फ़र.', 'मार्च', 'अप्रै.', 'मई', 'जून', 'जुल.', 'अग.', 'सित.', 'अक्टू.', 'नव.', 'दिस.'],
|
||||
dddd: ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरूवार', 'शुक्रवार', 'शनिवार'],
|
||||
ddd: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरू', 'शुक्र', 'शनि'],
|
||||
dd: ['र', 'सो', 'मं', 'बु', 'गु', 'शु', 'श'],
|
||||
A: ['रात', 'सुबह', 'दोपहर', 'शाम']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // रात
|
||||
} else if (h < 10) {
|
||||
return this.res.A[1]; // सुबह
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // दोपहर
|
||||
} else if (h < 20) {
|
||||
return this.res.A[3]; // शाम
|
||||
}
|
||||
return this.res.A[0]; // रात
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 1) {
|
||||
return h < 4 || h > 11 ? h : h + 12; // रात
|
||||
} else if (a < 2) {
|
||||
return h; // सुबह
|
||||
} else if (a < 3) {
|
||||
return h > 9 ? h : h + 12; // दोपहर
|
||||
}
|
||||
return h + 12; // शाम
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { hi as default };
|
||||
23
node_modules/date-and-time/esm/locale/hu.es.js
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/hu.es.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Hungarian (hu)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var hu = function (date) {
|
||||
var code = 'hu';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december'],
|
||||
MMM: ['jan', 'feb', 'márc', 'ápr', 'máj', 'jún', 'júl', 'aug', 'szept', 'okt', 'nov', 'dec'],
|
||||
dddd: ['vasárnap', 'hétfő', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat'],
|
||||
ddd: ['vas', 'hét', 'kedd', 'sze', 'csüt', 'pén', 'szo'],
|
||||
dd: ['v', 'h', 'k', 'sze', 'cs', 'p', 'szo'],
|
||||
A: ['de', 'du']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { hu as default };
|
||||
23
node_modules/date-and-time/esm/locale/hu.mjs
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/hu.mjs
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Hungarian (hu)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var hu = function (date) {
|
||||
var code = 'hu';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['január', 'február', 'március', 'április', 'május', 'június', 'július', 'augusztus', 'szeptember', 'október', 'november', 'december'],
|
||||
MMM: ['jan', 'feb', 'márc', 'ápr', 'máj', 'jún', 'júl', 'aug', 'szept', 'okt', 'nov', 'dec'],
|
||||
dddd: ['vasárnap', 'hétfő', 'kedd', 'szerda', 'csütörtök', 'péntek', 'szombat'],
|
||||
ddd: ['vas', 'hét', 'kedd', 'sze', 'csüt', 'pén', 'szo'],
|
||||
dd: ['v', 'h', 'k', 'sze', 'cs', 'p', 'szo'],
|
||||
A: ['de', 'du']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { hu as default };
|
||||
46
node_modules/date-and-time/esm/locale/id.es.js
generated
vendored
Normal file
46
node_modules/date-and-time/esm/locale/id.es.js
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Indonesian (id)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var id = function (date) {
|
||||
var code = 'id';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'],
|
||||
MMM: ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Ags', 'Sep', 'Okt', 'Nov', 'Des'],
|
||||
dddd: ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu'],
|
||||
ddd: ['Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
|
||||
dd: ['Mg', 'Sn', 'Sl', 'Rb', 'Km', 'Jm', 'Sb'],
|
||||
A: ['pagi', 'siang', 'sore', 'malam']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 11) {
|
||||
return this.res.A[0]; // pagi
|
||||
} else if (h < 15) {
|
||||
return this.res.A[1]; // siang
|
||||
} else if (h < 19) {
|
||||
return this.res.A[2]; // sore
|
||||
}
|
||||
return this.res.A[3]; // malam
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 1) {
|
||||
return h; // pagi
|
||||
} else if (a < 2) {
|
||||
return h >= 11 ? h : h + 12; // siang
|
||||
}
|
||||
return h + 12; // sore, malam
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { id as default };
|
||||
46
node_modules/date-and-time/esm/locale/id.mjs
generated
vendored
Normal file
46
node_modules/date-and-time/esm/locale/id.mjs
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Indonesian (id)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var id = function (date) {
|
||||
var code = 'id';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'November', 'Desember'],
|
||||
MMM: ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Ags', 'Sep', 'Okt', 'Nov', 'Des'],
|
||||
dddd: ['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu'],
|
||||
ddd: ['Min', 'Sen', 'Sel', 'Rab', 'Kam', 'Jum', 'Sab'],
|
||||
dd: ['Mg', 'Sn', 'Sl', 'Rb', 'Km', 'Jm', 'Sb'],
|
||||
A: ['pagi', 'siang', 'sore', 'malam']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 11) {
|
||||
return this.res.A[0]; // pagi
|
||||
} else if (h < 15) {
|
||||
return this.res.A[1]; // siang
|
||||
} else if (h < 19) {
|
||||
return this.res.A[2]; // sore
|
||||
}
|
||||
return this.res.A[3]; // malam
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 1) {
|
||||
return h; // pagi
|
||||
} else if (a < 2) {
|
||||
return h >= 11 ? h : h + 12; // siang
|
||||
}
|
||||
return h + 12; // sore, malam
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { id as default };
|
||||
23
node_modules/date-and-time/esm/locale/it.es.js
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/it.es.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Italian (it)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var it = function (date) {
|
||||
var code = 'it';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'],
|
||||
MMM: ['gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic'],
|
||||
dddd: ['Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'],
|
||||
ddd: ['Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab'],
|
||||
dd: ['Do', 'Lu', 'Ma', 'Me', 'Gi', 'Ve', 'Sa'],
|
||||
A: ['di mattina', 'di pomerrigio']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { it as default };
|
||||
23
node_modules/date-and-time/esm/locale/it.mjs
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/it.mjs
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Italian (it)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var it = function (date) {
|
||||
var code = 'it';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['gennaio', 'febbraio', 'marzo', 'aprile', 'maggio', 'giugno', 'luglio', 'agosto', 'settembre', 'ottobre', 'novembre', 'dicembre'],
|
||||
MMM: ['gen', 'feb', 'mar', 'apr', 'mag', 'giu', 'lug', 'ago', 'set', 'ott', 'nov', 'dic'],
|
||||
dddd: ['Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'],
|
||||
ddd: ['Dom', 'Lun', 'Mar', 'Mer', 'Gio', 'Ven', 'Sab'],
|
||||
dd: ['Do', 'Lu', 'Ma', 'Me', 'Gi', 'Ve', 'Sa'],
|
||||
A: ['di mattina', 'di pomerrigio']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { it as default };
|
||||
31
node_modules/date-and-time/esm/locale/ja.es.js
generated
vendored
Normal file
31
node_modules/date-and-time/esm/locale/ja.es.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Japanese (ja)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var ja = function (date) {
|
||||
var code = 'ja';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
||||
MMM: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
||||
dddd: ['日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'],
|
||||
ddd: ['日', '月', '火', '水', '木', '金', '土'],
|
||||
dd: ['日', '月', '火', '水', '木', '金', '土'],
|
||||
A: ['午前', '午後']
|
||||
},
|
||||
formatter: {
|
||||
hh: function (d) {
|
||||
return ('0' + d.getHours() % 12).slice(-2);
|
||||
},
|
||||
h: function (d) {
|
||||
return d.getHours() % 12;
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { ja as default };
|
||||
31
node_modules/date-and-time/esm/locale/ja.mjs
generated
vendored
Normal file
31
node_modules/date-and-time/esm/locale/ja.mjs
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Japanese (ja)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var ja = function (date) {
|
||||
var code = 'ja';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
||||
MMM: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
||||
dddd: ['日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日'],
|
||||
ddd: ['日', '月', '火', '水', '木', '金', '土'],
|
||||
dd: ['日', '月', '火', '水', '木', '金', '土'],
|
||||
A: ['午前', '午後']
|
||||
},
|
||||
formatter: {
|
||||
hh: function (d) {
|
||||
return ('0' + d.getHours() % 12).slice(-2);
|
||||
},
|
||||
h: function (d) {
|
||||
return d.getHours() % 12;
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { ja as default };
|
||||
46
node_modules/date-and-time/esm/locale/jv.es.js
generated
vendored
Normal file
46
node_modules/date-and-time/esm/locale/jv.es.js
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Javanese (jv)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var jv = function (date) {
|
||||
var code = 'jv';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'Nopember', 'Desember'],
|
||||
MMM: ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Ags', 'Sep', 'Okt', 'Nop', 'Des'],
|
||||
dddd: ['Minggu', 'Senen', 'Seloso', 'Rebu', 'Kemis', 'Jemuwah', 'Septu'],
|
||||
ddd: ['Min', 'Sen', 'Sel', 'Reb', 'Kem', 'Jem', 'Sep'],
|
||||
dd: ['Mg', 'Sn', 'Sl', 'Rb', 'Km', 'Jm', 'Sp'],
|
||||
A: ['enjing', 'siyang', 'sonten', 'ndalu']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 11) {
|
||||
return this.res.A[0]; // enjing
|
||||
} else if (h < 15) {
|
||||
return this.res.A[1]; // siyang
|
||||
} else if (h < 19) {
|
||||
return this.res.A[2]; // sonten
|
||||
}
|
||||
return this.res.A[3]; // ndalu
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 1) {
|
||||
return h; // enjing
|
||||
} else if (a < 2) {
|
||||
return h >= 11 ? h : h + 12; // siyang
|
||||
}
|
||||
return h + 12; // sonten, ndalu
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { jv as default };
|
||||
46
node_modules/date-and-time/esm/locale/jv.mjs
generated
vendored
Normal file
46
node_modules/date-and-time/esm/locale/jv.mjs
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Javanese (jv)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var jv = function (date) {
|
||||
var code = 'jv';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Januari', 'Februari', 'Maret', 'April', 'Mei', 'Juni', 'Juli', 'Agustus', 'September', 'Oktober', 'Nopember', 'Desember'],
|
||||
MMM: ['Jan', 'Feb', 'Mar', 'Apr', 'Mei', 'Jun', 'Jul', 'Ags', 'Sep', 'Okt', 'Nop', 'Des'],
|
||||
dddd: ['Minggu', 'Senen', 'Seloso', 'Rebu', 'Kemis', 'Jemuwah', 'Septu'],
|
||||
ddd: ['Min', 'Sen', 'Sel', 'Reb', 'Kem', 'Jem', 'Sep'],
|
||||
dd: ['Mg', 'Sn', 'Sl', 'Rb', 'Km', 'Jm', 'Sp'],
|
||||
A: ['enjing', 'siyang', 'sonten', 'ndalu']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 11) {
|
||||
return this.res.A[0]; // enjing
|
||||
} else if (h < 15) {
|
||||
return this.res.A[1]; // siyang
|
||||
} else if (h < 19) {
|
||||
return this.res.A[2]; // sonten
|
||||
}
|
||||
return this.res.A[3]; // ndalu
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 1) {
|
||||
return h; // enjing
|
||||
} else if (a < 2) {
|
||||
return h >= 11 ? h : h + 12; // siyang
|
||||
}
|
||||
return h + 12; // sonten, ndalu
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { jv as default };
|
||||
23
node_modules/date-and-time/esm/locale/ko.es.js
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/ko.es.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Korean (ko)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var ko = function (date) {
|
||||
var code = 'ko';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
||||
MMM: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
||||
dddd: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
|
||||
ddd: ['일', '월', '화', '수', '목', '금', '토'],
|
||||
dd: ['일', '월', '화', '수', '목', '금', '토'],
|
||||
A: ['오전', '오후']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { ko as default };
|
||||
23
node_modules/date-and-time/esm/locale/ko.mjs
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/ko.mjs
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Korean (ko)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var ko = function (date) {
|
||||
var code = 'ko';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
||||
MMM: ['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월'],
|
||||
dddd: ['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일'],
|
||||
ddd: ['일', '월', '화', '수', '목', '금', '토'],
|
||||
dd: ['일', '월', '화', '수', '목', '금', '토'],
|
||||
A: ['오전', '오후']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { ko as default };
|
||||
38
node_modules/date-and-time/esm/locale/my.es.js
generated
vendored
Normal file
38
node_modules/date-and-time/esm/locale/my.es.js
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Burmese (my)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var my = function (date) {
|
||||
var code = 'my';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['ဇန်နဝါရီ', 'ဖေဖော်ဝါရီ', 'မတ်', 'ဧပြီ', 'မေ', 'ဇွန်', 'ဇူလိုင်', 'သြဂုတ်', 'စက်တင်ဘာ', 'အောက်တိုဘာ', 'နိုဝင်ဘာ', 'ဒီဇင်ဘာ'],
|
||||
MMM: ['ဇန်', 'ဖေ', 'မတ်', 'ပြီ', 'မေ', 'ဇွန်', 'လိုင်', 'သြ', 'စက်', 'အောက်', 'နို', 'ဒီ'],
|
||||
dddd: ['တနင်္ဂနွေ', 'တနင်္လာ', 'အင်္ဂါ', 'ဗုဒ္ဓဟူး', 'ကြာသပတေး', 'သောကြာ', 'စနေ'],
|
||||
ddd: ['နွေ', 'လာ', 'ဂါ', 'ဟူး', 'ကြာ', 'သော', 'နေ'],
|
||||
dd: ['နွေ', 'လာ', 'ဂါ', 'ဟူး', 'ကြာ', 'သော', 'နေ']
|
||||
},
|
||||
formatter: {
|
||||
post: function (str) {
|
||||
var num = ['၀', '၁', '၂', '၃', '၄', '၅', '၆', '၇', '၈', '၉'];
|
||||
return str.replace(/\d/g, function (i) {
|
||||
return num[i | 0];
|
||||
});
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
pre: function (str) {
|
||||
var map = { '၀': 0, '၁': 1, '၂': 2, '၃': 3, '၄': 4, '၅': 5, '၆': 6, '၇': 7, '၈': 8, '၉': 9 };
|
||||
return str.replace(/[၀၁၂၃၄၅၆၇၈၉]/g, function (i) {
|
||||
return '' + map[i];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { my as default };
|
||||
38
node_modules/date-and-time/esm/locale/my.mjs
generated
vendored
Normal file
38
node_modules/date-and-time/esm/locale/my.mjs
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Burmese (my)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var my = function (date) {
|
||||
var code = 'my';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['ဇန်နဝါရီ', 'ဖေဖော်ဝါရီ', 'မတ်', 'ဧပြီ', 'မေ', 'ဇွန်', 'ဇူလိုင်', 'သြဂုတ်', 'စက်တင်ဘာ', 'အောက်တိုဘာ', 'နိုဝင်ဘာ', 'ဒီဇင်ဘာ'],
|
||||
MMM: ['ဇန်', 'ဖေ', 'မတ်', 'ပြီ', 'မေ', 'ဇွန်', 'လိုင်', 'သြ', 'စက်', 'အောက်', 'နို', 'ဒီ'],
|
||||
dddd: ['တနင်္ဂနွေ', 'တနင်္လာ', 'အင်္ဂါ', 'ဗုဒ္ဓဟူး', 'ကြာသပတေး', 'သောကြာ', 'စနေ'],
|
||||
ddd: ['နွေ', 'လာ', 'ဂါ', 'ဟူး', 'ကြာ', 'သော', 'နေ'],
|
||||
dd: ['နွေ', 'လာ', 'ဂါ', 'ဟူး', 'ကြာ', 'သော', 'နေ']
|
||||
},
|
||||
formatter: {
|
||||
post: function (str) {
|
||||
var num = ['၀', '၁', '၂', '၃', '၄', '၅', '၆', '၇', '၈', '၉'];
|
||||
return str.replace(/\d/g, function (i) {
|
||||
return num[i | 0];
|
||||
});
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
pre: function (str) {
|
||||
var map = { '၀': 0, '၁': 1, '၂': 2, '၃': 3, '၄': 4, '၅': 5, '၆': 6, '၇': 7, '၈': 8, '၉': 9 };
|
||||
return str.replace(/[၀၁၂၃၄၅၆၇၈၉]/g, function (i) {
|
||||
return '' + map[i];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { my as default };
|
||||
37
node_modules/date-and-time/esm/locale/nl.es.js
generated
vendored
Normal file
37
node_modules/date-and-time/esm/locale/nl.es.js
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Dutch (nl)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var nl = function (date) {
|
||||
var code = 'nl';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
|
||||
MMM: [
|
||||
['jan.', 'feb.', 'mrt.', 'apr.', 'mei', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'],
|
||||
['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec']
|
||||
],
|
||||
dddd: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
|
||||
ddd: ['zo.', 'ma.', 'di.', 'wo.', 'do.', 'vr.', 'za.'],
|
||||
dd: ['Zo', 'Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za']
|
||||
},
|
||||
formatter: {
|
||||
MMM: function (d, formatString) {
|
||||
return this.res.MMM[/-MMM-/.test(formatString) | 0][d.getMonth()];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
MMM: function (str, formatString) {
|
||||
var result = this.find(this.res.MMM[/-MMM-/.test(formatString) | 0], str);
|
||||
result.value++;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { nl as default };
|
||||
37
node_modules/date-and-time/esm/locale/nl.mjs
generated
vendored
Normal file
37
node_modules/date-and-time/esm/locale/nl.mjs
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Dutch (nl)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var nl = function (date) {
|
||||
var code = 'nl';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
|
||||
MMM: [
|
||||
['jan.', 'feb.', 'mrt.', 'apr.', 'mei', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'],
|
||||
['jan', 'feb', 'mrt', 'apr', 'mei', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec']
|
||||
],
|
||||
dddd: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
|
||||
ddd: ['zo.', 'ma.', 'di.', 'wo.', 'do.', 'vr.', 'za.'],
|
||||
dd: ['Zo', 'Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za']
|
||||
},
|
||||
formatter: {
|
||||
MMM: function (d, formatString) {
|
||||
return this.res.MMM[/-MMM-/.test(formatString) | 0][d.getMonth()];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
MMM: function (str, formatString) {
|
||||
var result = this.find(this.res.MMM[/-MMM-/.test(formatString) | 0], str);
|
||||
result.value++;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { nl as default };
|
||||
62
node_modules/date-and-time/esm/locale/pa-in.es.js
generated
vendored
Normal file
62
node_modules/date-and-time/esm/locale/pa-in.es.js
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Punjabi (pa-in)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var pa_in = function (date) {
|
||||
var code = 'pa-in';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'],
|
||||
MMM: ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'],
|
||||
dddd: ['ਐਤਵਾਰ', 'ਸੋਮਵਾਰ', 'ਮੰਗਲਵਾਰ', 'ਬੁਧਵਾਰ', 'ਵੀਰਵਾਰ', 'ਸ਼ੁੱਕਰਵਾਰ', 'ਸ਼ਨੀਚਰਵਾਰ'],
|
||||
ddd: ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁਧ', 'ਵੀਰ', 'ਸ਼ੁਕਰ', 'ਸ਼ਨੀ'],
|
||||
dd: ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁਧ', 'ਵੀਰ', 'ਸ਼ੁਕਰ', 'ਸ਼ਨੀ'],
|
||||
A: ['ਰਾਤ', 'ਸਵੇਰ', 'ਦੁਪਹਿਰ', 'ਸ਼ਾਮ']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // ਰਾਤ
|
||||
} else if (h < 10) {
|
||||
return this.res.A[1]; // ਸਵੇਰ
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // ਦੁਪਹਿਰ
|
||||
} else if (h < 20) {
|
||||
return this.res.A[3]; // ਸ਼ਾਮ
|
||||
}
|
||||
return this.res.A[0]; // ਰਾਤ
|
||||
},
|
||||
post: function (str) {
|
||||
var num = ['੦', '੧', '੨', '੩', '੪', '੫', '੬', '੭', '੮', '੯'];
|
||||
return str.replace(/\d/g, function (i) {
|
||||
return num[i | 0];
|
||||
});
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 1) {
|
||||
return h < 4 || h > 11 ? h : h + 12; // ਰਾਤ
|
||||
} else if (a < 2) {
|
||||
return h; // ਸਵੇਰ
|
||||
} else if (a < 3) {
|
||||
return h >= 10 ? h : h + 12; // ਦੁਪਹਿਰ
|
||||
}
|
||||
return h + 12; // ਸ਼ਾਮ
|
||||
},
|
||||
pre: function (str) {
|
||||
var map = { '੦': 0, '੧': 1, '੨': 2, '੩': 3, '੪': 4, '੫': 5, '੬': 6, '੭': 7, '੮': 8, '੯': 9 };
|
||||
return str.replace(/[੦੧੨੩੪੫੬੭੮੯]/g, function (i) {
|
||||
return '' + map[i];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { pa_in as default };
|
||||
62
node_modules/date-and-time/esm/locale/pa-in.mjs
generated
vendored
Normal file
62
node_modules/date-and-time/esm/locale/pa-in.mjs
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Punjabi (pa-in)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var pa_in = function (date) {
|
||||
var code = 'pa-in';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'],
|
||||
MMM: ['ਜਨਵਰੀ', 'ਫ਼ਰਵਰੀ', 'ਮਾਰਚ', 'ਅਪ੍ਰੈਲ', 'ਮਈ', 'ਜੂਨ', 'ਜੁਲਾਈ', 'ਅਗਸਤ', 'ਸਤੰਬਰ', 'ਅਕਤੂਬਰ', 'ਨਵੰਬਰ', 'ਦਸੰਬਰ'],
|
||||
dddd: ['ਐਤਵਾਰ', 'ਸੋਮਵਾਰ', 'ਮੰਗਲਵਾਰ', 'ਬੁਧਵਾਰ', 'ਵੀਰਵਾਰ', 'ਸ਼ੁੱਕਰਵਾਰ', 'ਸ਼ਨੀਚਰਵਾਰ'],
|
||||
ddd: ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁਧ', 'ਵੀਰ', 'ਸ਼ੁਕਰ', 'ਸ਼ਨੀ'],
|
||||
dd: ['ਐਤ', 'ਸੋਮ', 'ਮੰਗਲ', 'ਬੁਧ', 'ਵੀਰ', 'ਸ਼ੁਕਰ', 'ਸ਼ਨੀ'],
|
||||
A: ['ਰਾਤ', 'ਸਵੇਰ', 'ਦੁਪਹਿਰ', 'ਸ਼ਾਮ']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // ਰਾਤ
|
||||
} else if (h < 10) {
|
||||
return this.res.A[1]; // ਸਵੇਰ
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // ਦੁਪਹਿਰ
|
||||
} else if (h < 20) {
|
||||
return this.res.A[3]; // ਸ਼ਾਮ
|
||||
}
|
||||
return this.res.A[0]; // ਰਾਤ
|
||||
},
|
||||
post: function (str) {
|
||||
var num = ['੦', '੧', '੨', '੩', '੪', '੫', '੬', '੭', '੮', '੯'];
|
||||
return str.replace(/\d/g, function (i) {
|
||||
return num[i | 0];
|
||||
});
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 1) {
|
||||
return h < 4 || h > 11 ? h : h + 12; // ਰਾਤ
|
||||
} else if (a < 2) {
|
||||
return h; // ਸਵੇਰ
|
||||
} else if (a < 3) {
|
||||
return h >= 10 ? h : h + 12; // ਦੁਪਹਿਰ
|
||||
}
|
||||
return h + 12; // ਸ਼ਾਮ
|
||||
},
|
||||
pre: function (str) {
|
||||
var map = { '੦': 0, '੧': 1, '੨': 2, '੩': 3, '੪': 4, '੫': 5, '੬': 6, '੭': 7, '੮': 8, '੯': 9 };
|
||||
return str.replace(/[੦੧੨੩੪੫੬੭੮੯]/g, function (i) {
|
||||
return '' + map[i];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { pa_in as default };
|
||||
37
node_modules/date-and-time/esm/locale/pl.es.js
generated
vendored
Normal file
37
node_modules/date-and-time/esm/locale/pl.es.js
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Polish (pl)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var pl = function (date) {
|
||||
var code = 'pl';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: [
|
||||
['styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień'],
|
||||
['stycznia', 'lutego', 'marca', 'kwietnia', 'maja', 'czerwca', 'lipca', 'sierpnia', 'września', 'października', 'listopada', 'grudnia']
|
||||
],
|
||||
MMM: ['sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru'],
|
||||
dddd: ['niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota'],
|
||||
ddd: ['nie', 'pon', 'wt', 'śr', 'czw', 'pt', 'sb'],
|
||||
dd: ['Nd', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So']
|
||||
},
|
||||
formatter: {
|
||||
MMMM: function (d, formatString) {
|
||||
return this.res.MMMM[/D MMMM/.test(formatString) | 0][d.getMonth()];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
MMMM: function (str, formatString) {
|
||||
var result = this.find(this.res.MMMM[/D MMMM/.test(formatString) | 0], str);
|
||||
result.value++;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { pl as default };
|
||||
37
node_modules/date-and-time/esm/locale/pl.mjs
generated
vendored
Normal file
37
node_modules/date-and-time/esm/locale/pl.mjs
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Polish (pl)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var pl = function (date) {
|
||||
var code = 'pl';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: [
|
||||
['styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień'],
|
||||
['stycznia', 'lutego', 'marca', 'kwietnia', 'maja', 'czerwca', 'lipca', 'sierpnia', 'września', 'października', 'listopada', 'grudnia']
|
||||
],
|
||||
MMM: ['sty', 'lut', 'mar', 'kwi', 'maj', 'cze', 'lip', 'sie', 'wrz', 'paź', 'lis', 'gru'],
|
||||
dddd: ['niedziela', 'poniedziałek', 'wtorek', 'środa', 'czwartek', 'piątek', 'sobota'],
|
||||
ddd: ['nie', 'pon', 'wt', 'śr', 'czw', 'pt', 'sb'],
|
||||
dd: ['Nd', 'Pn', 'Wt', 'Śr', 'Cz', 'Pt', 'So']
|
||||
},
|
||||
formatter: {
|
||||
MMMM: function (d, formatString) {
|
||||
return this.res.MMMM[/D MMMM/.test(formatString) | 0][d.getMonth()];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
MMMM: function (str, formatString) {
|
||||
var result = this.find(this.res.MMMM[/D MMMM/.test(formatString) | 0], str);
|
||||
result.value++;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { pl as default };
|
||||
44
node_modules/date-and-time/esm/locale/pt.es.js
generated
vendored
Normal file
44
node_modules/date-and-time/esm/locale/pt.es.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Portuguese (pt)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var pt = function (date) {
|
||||
var code = 'pt';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
|
||||
MMM: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
|
||||
dddd: ['Domingo', 'Segunda-Feira', 'Terça-Feira', 'Quarta-Feira', 'Quinta-Feira', 'Sexta-Feira', 'Sábado'],
|
||||
ddd: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'],
|
||||
dd: ['Dom', '2ª', '3ª', '4ª', '5ª', '6ª', 'Sáb'],
|
||||
A: ['da madrugada', 'da manhã', 'da tarde', 'da noite']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 5) {
|
||||
return this.res.A[0]; // da madrugada
|
||||
} else if (h < 12) {
|
||||
return this.res.A[1]; // da manhã
|
||||
} else if (h < 19) {
|
||||
return this.res.A[2]; // da tarde
|
||||
}
|
||||
return this.res.A[3]; // da noite
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 2) {
|
||||
return h; // da madrugada, da manhã
|
||||
}
|
||||
return h > 11 ? h : h + 12; // da tarde, da noite
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { pt as default };
|
||||
44
node_modules/date-and-time/esm/locale/pt.mjs
generated
vendored
Normal file
44
node_modules/date-and-time/esm/locale/pt.mjs
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Portuguese (pt)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var pt = function (date) {
|
||||
var code = 'pt';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'],
|
||||
MMM: ['Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun', 'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'],
|
||||
dddd: ['Domingo', 'Segunda-Feira', 'Terça-Feira', 'Quarta-Feira', 'Quinta-Feira', 'Sexta-Feira', 'Sábado'],
|
||||
ddd: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'],
|
||||
dd: ['Dom', '2ª', '3ª', '4ª', '5ª', '6ª', 'Sáb'],
|
||||
A: ['da madrugada', 'da manhã', 'da tarde', 'da noite']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 5) {
|
||||
return this.res.A[0]; // da madrugada
|
||||
} else if (h < 12) {
|
||||
return this.res.A[1]; // da manhã
|
||||
} else if (h < 19) {
|
||||
return this.res.A[2]; // da tarde
|
||||
}
|
||||
return this.res.A[3]; // da noite
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 2) {
|
||||
return h; // da madrugada, da manhã
|
||||
}
|
||||
return h > 11 ? h : h + 12; // da tarde, da noite
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { pt as default };
|
||||
22
node_modules/date-and-time/esm/locale/ro.es.js
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/ro.es.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Romanian (ro)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var ro = function (date) {
|
||||
var code = 'ro';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie', 'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie'],
|
||||
MMM: ['ian.', 'febr.', 'mart.', 'apr.', 'mai', 'iun.', 'iul.', 'aug.', 'sept.', 'oct.', 'nov.', 'dec.'],
|
||||
dddd: ['duminică', 'luni', 'marți', 'miercuri', 'joi', 'vineri', 'sâmbătă'],
|
||||
ddd: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
|
||||
dd: ['Du', 'Lu', 'Ma', 'Mi', 'Jo', 'Vi', 'Sâ']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { ro as default };
|
||||
22
node_modules/date-and-time/esm/locale/ro.mjs
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/ro.mjs
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Romanian (ro)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var ro = function (date) {
|
||||
var code = 'ro';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['ianuarie', 'februarie', 'martie', 'aprilie', 'mai', 'iunie', 'iulie', 'august', 'septembrie', 'octombrie', 'noiembrie', 'decembrie'],
|
||||
MMM: ['ian.', 'febr.', 'mart.', 'apr.', 'mai', 'iun.', 'iul.', 'aug.', 'sept.', 'oct.', 'nov.', 'dec.'],
|
||||
dddd: ['duminică', 'luni', 'marți', 'miercuri', 'joi', 'vineri', 'sâmbătă'],
|
||||
ddd: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
|
||||
dd: ['Du', 'Lu', 'Ma', 'Mi', 'Jo', 'Vi', 'Sâ']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { ro as default };
|
||||
44
node_modules/date-and-time/esm/locale/ru.es.js
generated
vendored
Normal file
44
node_modules/date-and-time/esm/locale/ru.es.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Russian (ru)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var ru = function (date) {
|
||||
var code = 'ru';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Января', 'Февраля', 'Марта', 'Апреля', 'Мая', 'Июня', 'Июля', 'Августа', 'Сентября', 'Октября', 'Ноября', 'Декабря'],
|
||||
MMM: ['янв', 'фев', 'мар', 'апр', 'мая', 'июня', 'июля', 'авг', 'сен', 'окт', 'ноя', 'дек'],
|
||||
dddd: ['Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'],
|
||||
ddd: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
|
||||
dd: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
|
||||
A: ['ночи', 'утра', 'дня', 'вечера']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // ночи
|
||||
} else if (h < 12) {
|
||||
return this.res.A[1]; // утра
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // дня
|
||||
}
|
||||
return this.res.A[3]; // вечера
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 2) {
|
||||
return h; // ночи, утра
|
||||
}
|
||||
return h > 11 ? h : h + 12; // дня, вечера
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { ru as default };
|
||||
44
node_modules/date-and-time/esm/locale/ru.mjs
generated
vendored
Normal file
44
node_modules/date-and-time/esm/locale/ru.mjs
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Russian (ru)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var ru = function (date) {
|
||||
var code = 'ru';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Января', 'Февраля', 'Марта', 'Апреля', 'Мая', 'Июня', 'Июля', 'Августа', 'Сентября', 'Октября', 'Ноября', 'Декабря'],
|
||||
MMM: ['янв', 'фев', 'мар', 'апр', 'мая', 'июня', 'июля', 'авг', 'сен', 'окт', 'ноя', 'дек'],
|
||||
dddd: ['Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота'],
|
||||
ddd: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
|
||||
dd: ['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
|
||||
A: ['ночи', 'утра', 'дня', 'вечера']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // ночи
|
||||
} else if (h < 12) {
|
||||
return this.res.A[1]; // утра
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // дня
|
||||
}
|
||||
return this.res.A[3]; // вечера
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 2) {
|
||||
return h; // ночи, утра
|
||||
}
|
||||
return h > 11 ? h : h + 12; // дня, вечера
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { ru as default };
|
||||
22
node_modules/date-and-time/esm/locale/rw.es.js
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/rw.es.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Kinyarwanda (rw)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var rw = function (date) {
|
||||
var code = 'rw';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Mutarama', 'Gashyantare', 'Werurwe', 'Mata', 'Gicurasi', 'Kamena', 'Nyakanga', 'Kanama', 'Nzeri', 'Ukwakira', 'Ugushyingo', 'Ukuboza'],
|
||||
MMM: ['Mtr', 'Gas', 'Wer', 'Mta', 'Gic', 'Kmn', 'Nyk', 'Knm', 'Nze', 'Ukw', 'Ugu', 'Uku'],
|
||||
dddd: ['Ku cyumweru', 'Ku wambere', 'Ku wakabiri', 'Ku wagatatu', 'Ku wakane', 'Ku wagatanu', 'Ku wagatandatu'],
|
||||
ddd: ['Cyu', 'Mbe', 'Kbr', 'Gtt', 'Kne', 'Gtn', 'Gtd'],
|
||||
dd: ['Cy', 'Mb', 'Kb', 'Gt', 'Kn', 'Gn', 'Gd']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { rw as default };
|
||||
22
node_modules/date-and-time/esm/locale/rw.mjs
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/rw.mjs
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Kinyarwanda (rw)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var rw = function (date) {
|
||||
var code = 'rw';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Mutarama', 'Gashyantare', 'Werurwe', 'Mata', 'Gicurasi', 'Kamena', 'Nyakanga', 'Kanama', 'Nzeri', 'Ukwakira', 'Ugushyingo', 'Ukuboza'],
|
||||
MMM: ['Mtr', 'Gas', 'Wer', 'Mta', 'Gic', 'Kmn', 'Nyk', 'Knm', 'Nze', 'Ukw', 'Ugu', 'Uku'],
|
||||
dddd: ['Ku cyumweru', 'Ku wambere', 'Ku wakabiri', 'Ku wagatatu', 'Ku wakane', 'Ku wagatanu', 'Ku wagatandatu'],
|
||||
ddd: ['Cyu', 'Mbe', 'Kbr', 'Gtt', 'Kne', 'Gtn', 'Gtd'],
|
||||
dd: ['Cy', 'Mb', 'Kb', 'Gt', 'Kn', 'Gn', 'Gd']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { rw as default };
|
||||
22
node_modules/date-and-time/esm/locale/sr.es.js
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/sr.es.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Serbian (sr)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var sr = function (date) {
|
||||
var code = 'sr';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'],
|
||||
MMM: ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'],
|
||||
dddd: ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'],
|
||||
ddd: ['ned.', 'pon.', 'uto.', 'sre.', 'čet.', 'pet.', 'sub.'],
|
||||
dd: ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { sr as default };
|
||||
22
node_modules/date-and-time/esm/locale/sr.mjs
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/sr.mjs
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Serbian (sr)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var sr = function (date) {
|
||||
var code = 'sr';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['januar', 'februar', 'mart', 'april', 'maj', 'jun', 'jul', 'avgust', 'septembar', 'oktobar', 'novembar', 'decembar'],
|
||||
MMM: ['jan.', 'feb.', 'mar.', 'apr.', 'maj', 'jun', 'jul', 'avg.', 'sep.', 'okt.', 'nov.', 'dec.'],
|
||||
dddd: ['nedelja', 'ponedeljak', 'utorak', 'sreda', 'četvrtak', 'petak', 'subota'],
|
||||
ddd: ['ned.', 'pon.', 'uto.', 'sre.', 'čet.', 'pet.', 'sub.'],
|
||||
dd: ['ne', 'po', 'ut', 'sr', 'če', 'pe', 'su']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { sr as default };
|
||||
22
node_modules/date-and-time/esm/locale/sv.es.js
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/sv.es.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Swedish (SV)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var sv = function (date) {
|
||||
var code = 'sv';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december'],
|
||||
MMM: ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
|
||||
dddd: ['söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag'],
|
||||
ddd: ['sön', 'mån', 'tis', 'ons', 'tor', 'fre', 'lör'],
|
||||
dd: ['sö', 'må', 'ti', 'on', 'to', 'fr', 'lö']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { sv as default };
|
||||
22
node_modules/date-and-time/esm/locale/sv.mjs
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/sv.mjs
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Swedish (SV)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var sv = function (date) {
|
||||
var code = 'sv';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['januari', 'februari', 'mars', 'april', 'maj', 'juni', 'juli', 'augusti', 'september', 'oktober', 'november', 'december'],
|
||||
MMM: ['jan', 'feb', 'mar', 'apr', 'maj', 'jun', 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
|
||||
dddd: ['söndag', 'måndag', 'tisdag', 'onsdag', 'torsdag', 'fredag', 'lördag'],
|
||||
ddd: ['sön', 'mån', 'tis', 'ons', 'tor', 'fre', 'lör'],
|
||||
dd: ['sö', 'må', 'ti', 'on', 'to', 'fr', 'lö']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { sv as default };
|
||||
23
node_modules/date-and-time/esm/locale/th.es.js
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/th.es.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Thai (th)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var th = function (date) {
|
||||
var code = 'th';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'],
|
||||
MMM: ['ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.'],
|
||||
dddd: ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัสบดี', 'ศุกร์', 'เสาร์'],
|
||||
ddd: ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัส', 'ศุกร์', 'เสาร์'],
|
||||
dd: ['อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'],
|
||||
A: ['ก่อนเที่ยง', 'หลังเที่ยง']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { th as default };
|
||||
23
node_modules/date-and-time/esm/locale/th.mjs
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/th.mjs
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Thai (th)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var th = function (date) {
|
||||
var code = 'th';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'],
|
||||
MMM: ['ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.'],
|
||||
dddd: ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัสบดี', 'ศุกร์', 'เสาร์'],
|
||||
ddd: ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัส', 'ศุกร์', 'เสาร์'],
|
||||
dd: ['อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'],
|
||||
A: ['ก่อนเที่ยง', 'หลังเที่ยง']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { th as default };
|
||||
22
node_modules/date-and-time/esm/locale/tr.es.js
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/tr.es.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Turkish (tr)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var tr = function (date) {
|
||||
var code = 'tr';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'],
|
||||
MMM: ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'],
|
||||
dddd: ['Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi'],
|
||||
ddd: ['Paz', 'Pts', 'Sal', 'Çar', 'Per', 'Cum', 'Cts'],
|
||||
dd: ['Pz', 'Pt', 'Sa', 'Ça', 'Pe', 'Cu', 'Ct']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { tr as default };
|
||||
22
node_modules/date-and-time/esm/locale/tr.mjs
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/tr.mjs
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Turkish (tr)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var tr = function (date) {
|
||||
var code = 'tr';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['Ocak', 'Şubat', 'Mart', 'Nisan', 'Mayıs', 'Haziran', 'Temmuz', 'Ağustos', 'Eylül', 'Ekim', 'Kasım', 'Aralık'],
|
||||
MMM: ['Oca', 'Şub', 'Mar', 'Nis', 'May', 'Haz', 'Tem', 'Ağu', 'Eyl', 'Eki', 'Kas', 'Ara'],
|
||||
dddd: ['Pazar', 'Pazartesi', 'Salı', 'Çarşamba', 'Perşembe', 'Cuma', 'Cumartesi'],
|
||||
ddd: ['Paz', 'Pts', 'Sal', 'Çar', 'Per', 'Cum', 'Cts'],
|
||||
dd: ['Pz', 'Pt', 'Sa', 'Ça', 'Pe', 'Cu', 'Ct']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { tr as default };
|
||||
57
node_modules/date-and-time/esm/locale/uk.es.js
generated
vendored
Normal file
57
node_modules/date-and-time/esm/locale/uk.es.js
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Ukrainian (uk)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var uk = function (date) {
|
||||
var code = 'uk';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['січня', 'лютого', 'березня', 'квітня', 'травня', 'червня', 'липня', 'серпня', 'вересня', 'жовтня', 'листопада', 'грудня'],
|
||||
MMM: ['січ', 'лют', 'бер', 'квіт', 'трав', 'черв', 'лип', 'серп', 'вер', 'жовт', 'лист', 'груд'],
|
||||
dddd: [
|
||||
['неділя', 'понеділок', 'вівторок', 'середа', 'четвер', 'п’ятниця', 'субота'],
|
||||
['неділю', 'понеділок', 'вівторок', 'середу', 'четвер', 'п’ятницю', 'суботу'],
|
||||
['неділі', 'понеділка', 'вівторка', 'середи', 'четверга', 'п’ятниці', 'суботи']
|
||||
],
|
||||
ddd: ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'],
|
||||
dd: ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'],
|
||||
A: ['ночі', 'ранку', 'дня', 'вечора']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // ночі
|
||||
} else if (h < 12) {
|
||||
return this.res.A[1]; // ранку
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // дня
|
||||
}
|
||||
return this.res.A[3]; // вечора
|
||||
},
|
||||
dddd: function (d, formatString) {
|
||||
var type = 0;
|
||||
if (/(\[[ВвУу]\]) ?dddd/.test(formatString)) {
|
||||
type = 1;
|
||||
} else if (/\[?(?:минулої|наступної)? ?\] ?dddd/.test(formatString)) {
|
||||
type = 2;
|
||||
}
|
||||
return this.res.dddd[type][d.getDay()];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 2) {
|
||||
return h; // ночі, ранку
|
||||
}
|
||||
return h > 11 ? h : h + 12; // дня, вечора
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { uk as default };
|
||||
57
node_modules/date-and-time/esm/locale/uk.mjs
generated
vendored
Normal file
57
node_modules/date-and-time/esm/locale/uk.mjs
generated
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Ukrainian (uk)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var uk = function (date) {
|
||||
var code = 'uk';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['січня', 'лютого', 'березня', 'квітня', 'травня', 'червня', 'липня', 'серпня', 'вересня', 'жовтня', 'листопада', 'грудня'],
|
||||
MMM: ['січ', 'лют', 'бер', 'квіт', 'трав', 'черв', 'лип', 'серп', 'вер', 'жовт', 'лист', 'груд'],
|
||||
dddd: [
|
||||
['неділя', 'понеділок', 'вівторок', 'середа', 'четвер', 'п’ятниця', 'субота'],
|
||||
['неділю', 'понеділок', 'вівторок', 'середу', 'четвер', 'п’ятницю', 'суботу'],
|
||||
['неділі', 'понеділка', 'вівторка', 'середи', 'четверга', 'п’ятниці', 'суботи']
|
||||
],
|
||||
ddd: ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'],
|
||||
dd: ['нд', 'пн', 'вт', 'ср', 'чт', 'пт', 'сб'],
|
||||
A: ['ночі', 'ранку', 'дня', 'вечора']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // ночі
|
||||
} else if (h < 12) {
|
||||
return this.res.A[1]; // ранку
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // дня
|
||||
}
|
||||
return this.res.A[3]; // вечора
|
||||
},
|
||||
dddd: function (d, formatString) {
|
||||
var type = 0;
|
||||
if (/(\[[ВвУу]\]) ?dddd/.test(formatString)) {
|
||||
type = 1;
|
||||
} else if (/\[?(?:минулої|наступної)? ?\] ?dddd/.test(formatString)) {
|
||||
type = 2;
|
||||
}
|
||||
return this.res.dddd[type][d.getDay()];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 2) {
|
||||
return h; // ночі, ранку
|
||||
}
|
||||
return h > 11 ? h : h + 12; // дня, вечора
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { uk as default };
|
||||
22
node_modules/date-and-time/esm/locale/uz.es.js
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/uz.es.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Uzbek (uz)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var uz = function (date) {
|
||||
var code = 'uz';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['январ', 'феврал', 'март', 'апрел', 'май', 'июн', 'июл', 'август', 'сентябр', 'октябр', 'ноябр', 'декабр'],
|
||||
MMM: ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'],
|
||||
dddd: ['Якшанба', 'Душанба', 'Сешанба', 'Чоршанба', 'Пайшанба', 'Жума', 'Шанба'],
|
||||
ddd: ['Якш', 'Душ', 'Сеш', 'Чор', 'Пай', 'Жум', 'Шан'],
|
||||
dd: ['Як', 'Ду', 'Се', 'Чо', 'Па', 'Жу', 'Ша']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { uz as default };
|
||||
22
node_modules/date-and-time/esm/locale/uz.mjs
generated
vendored
Normal file
22
node_modules/date-and-time/esm/locale/uz.mjs
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Uzbek (uz)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var uz = function (date) {
|
||||
var code = 'uz';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['январ', 'феврал', 'март', 'апрел', 'май', 'июн', 'июл', 'август', 'сентябр', 'октябр', 'ноябр', 'декабр'],
|
||||
MMM: ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'],
|
||||
dddd: ['Якшанба', 'Душанба', 'Сешанба', 'Чоршанба', 'Пайшанба', 'Жума', 'Шанба'],
|
||||
ddd: ['Якш', 'Душ', 'Сеш', 'Чор', 'Пай', 'Жум', 'Шан'],
|
||||
dd: ['Як', 'Ду', 'Се', 'Чо', 'Па', 'Жу', 'Ша']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { uz as default };
|
||||
23
node_modules/date-and-time/esm/locale/vi.es.js
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/vi.es.js
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Vietnamese (vi)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var vi = function (date) {
|
||||
var code = 'vi';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['tháng 1', 'tháng 2', 'tháng 3', 'tháng 4', 'tháng 5', 'tháng 6', 'tháng 7', 'tháng 8', 'tháng 9', 'tháng 10', 'tháng 11', 'tháng 12'],
|
||||
MMM: ['Th01', 'Th02', 'Th03', 'Th04', 'Th05', 'Th06', 'Th07', 'Th08', 'Th09', 'Th10', 'Th11', 'Th12'],
|
||||
dddd: ['chủ nhật', 'thứ hai', 'thứ ba', 'thứ tư', 'thứ năm', 'thứ sáu', 'thứ bảy'],
|
||||
ddd: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
||||
dd: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
||||
A: ['sa', 'ch']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { vi as default };
|
||||
23
node_modules/date-and-time/esm/locale/vi.mjs
generated
vendored
Normal file
23
node_modules/date-and-time/esm/locale/vi.mjs
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Vietnamese (vi)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var vi = function (date) {
|
||||
var code = 'vi';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['tháng 1', 'tháng 2', 'tháng 3', 'tháng 4', 'tháng 5', 'tháng 6', 'tháng 7', 'tháng 8', 'tháng 9', 'tháng 10', 'tháng 11', 'tháng 12'],
|
||||
MMM: ['Th01', 'Th02', 'Th03', 'Th04', 'Th05', 'Th06', 'Th07', 'Th08', 'Th09', 'Th10', 'Th11', 'Th12'],
|
||||
dddd: ['chủ nhật', 'thứ hai', 'thứ ba', 'thứ tư', 'thứ năm', 'thứ sáu', 'thứ bảy'],
|
||||
ddd: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
||||
dd: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'],
|
||||
A: ['sa', 'ch']
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { vi as default };
|
||||
48
node_modules/date-and-time/esm/locale/zh-cn.es.js
generated
vendored
Normal file
48
node_modules/date-and-time/esm/locale/zh-cn.es.js
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Chinese (zh-cn)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var zh_cn = function (date) {
|
||||
var code = 'zh-cn';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
||||
MMM: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
||||
dddd: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
||||
ddd: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
||||
dd: ['日', '一', '二', '三', '四', '五', '六'],
|
||||
A: ['凌晨', '早上', '上午', '中午', '下午', '晚上']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var hm = d.getHours() * 100 + d.getMinutes();
|
||||
if (hm < 600) {
|
||||
return this.res.A[0]; // 凌晨
|
||||
} else if (hm < 900) {
|
||||
return this.res.A[1]; // 早上
|
||||
} else if (hm < 1130) {
|
||||
return this.res.A[2]; // 上午
|
||||
} else if (hm < 1230) {
|
||||
return this.res.A[3]; // 中午
|
||||
} else if (hm < 1800) {
|
||||
return this.res.A[4]; // 下午
|
||||
}
|
||||
return this.res.A[5]; // 晚上
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 4) {
|
||||
return h; // 凌晨, 早上, 上午, 中午
|
||||
}
|
||||
return h > 11 ? h : h + 12; // 下午, 晚上
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { zh_cn as default };
|
||||
48
node_modules/date-and-time/esm/locale/zh-cn.mjs
generated
vendored
Normal file
48
node_modules/date-and-time/esm/locale/zh-cn.mjs
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Chinese (zh-cn)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var zh_cn = function (date) {
|
||||
var code = 'zh-cn';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
||||
MMM: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
||||
dddd: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
||||
ddd: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
||||
dd: ['日', '一', '二', '三', '四', '五', '六'],
|
||||
A: ['凌晨', '早上', '上午', '中午', '下午', '晚上']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var hm = d.getHours() * 100 + d.getMinutes();
|
||||
if (hm < 600) {
|
||||
return this.res.A[0]; // 凌晨
|
||||
} else if (hm < 900) {
|
||||
return this.res.A[1]; // 早上
|
||||
} else if (hm < 1130) {
|
||||
return this.res.A[2]; // 上午
|
||||
} else if (hm < 1230) {
|
||||
return this.res.A[3]; // 中午
|
||||
} else if (hm < 1800) {
|
||||
return this.res.A[4]; // 下午
|
||||
}
|
||||
return this.res.A[5]; // 晚上
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 4) {
|
||||
return h; // 凌晨, 早上, 上午, 中午
|
||||
}
|
||||
return h > 11 ? h : h + 12; // 下午, 晚上
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { zh_cn as default };
|
||||
46
node_modules/date-and-time/esm/locale/zh-tw.es.js
generated
vendored
Normal file
46
node_modules/date-and-time/esm/locale/zh-tw.es.js
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Chinese (zh-tw)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var zh_tw = function (date) {
|
||||
var code = 'zh-tw';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
||||
MMM: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
||||
dddd: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
||||
ddd: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
||||
dd: ['日', '一', '二', '三', '四', '五', '六'],
|
||||
A: ['早上', '上午', '中午', '下午', '晚上']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var hm = d.getHours() * 100 + d.getMinutes();
|
||||
if (hm < 900) {
|
||||
return this.res.A[0]; // 早上
|
||||
} else if (hm < 1130) {
|
||||
return this.res.A[1]; // 上午
|
||||
} else if (hm < 1230) {
|
||||
return this.res.A[2]; // 中午
|
||||
} else if (hm < 1800) {
|
||||
return this.res.A[3]; // 下午
|
||||
}
|
||||
return this.res.A[4]; // 晚上
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 3) {
|
||||
return h; // 早上, 上午, 中午
|
||||
}
|
||||
return h > 11 ? h : h + 12; // 下午, 晚上
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { zh_tw as default };
|
||||
46
node_modules/date-and-time/esm/locale/zh-tw.mjs
generated
vendored
Normal file
46
node_modules/date-and-time/esm/locale/zh-tw.mjs
generated
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Chinese (zh-tw)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var zh_tw = function (date) {
|
||||
var code = 'zh-tw';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
||||
MMM: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
||||
dddd: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
||||
ddd: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
||||
dd: ['日', '一', '二', '三', '四', '五', '六'],
|
||||
A: ['早上', '上午', '中午', '下午', '晚上']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var hm = d.getHours() * 100 + d.getMinutes();
|
||||
if (hm < 900) {
|
||||
return this.res.A[0]; // 早上
|
||||
} else if (hm < 1130) {
|
||||
return this.res.A[1]; // 上午
|
||||
} else if (hm < 1230) {
|
||||
return this.res.A[2]; // 中午
|
||||
} else if (hm < 1800) {
|
||||
return this.res.A[3]; // 下午
|
||||
}
|
||||
return this.res.A[4]; // 晚上
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 3) {
|
||||
return h; // 早上, 上午, 中午
|
||||
}
|
||||
return h > 11 ? h : h + 12; // 下午, 晚上
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
export { zh_tw as default };
|
||||
19
node_modules/date-and-time/esm/plugin/day-of-week.es.js
generated
vendored
Normal file
19
node_modules/date-and-time/esm/plugin/day-of-week.es.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve day-of-week
|
||||
*/
|
||||
|
||||
var plugin = function (date) {
|
||||
var name = 'day-of-week';
|
||||
|
||||
date.plugin(name, {
|
||||
parser: {
|
||||
dddd: function (str) { return this.find(this.res.dddd, str); },
|
||||
ddd: function (str) { return this.find(this.res.ddd, str); },
|
||||
dd: function (str) { return this.find(this.res.dd, str); }
|
||||
}
|
||||
});
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
19
node_modules/date-and-time/esm/plugin/day-of-week.mjs
generated
vendored
Normal file
19
node_modules/date-and-time/esm/plugin/day-of-week.mjs
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve day-of-week
|
||||
*/
|
||||
|
||||
var plugin = function (date) {
|
||||
var name = 'day-of-week';
|
||||
|
||||
date.plugin(name, {
|
||||
parser: {
|
||||
dddd: function (str) { return this.find(this.res.dddd, str); },
|
||||
ddd: function (str) { return this.find(this.res.ddd, str); },
|
||||
dd: function (str) { return this.find(this.res.dd, str); }
|
||||
}
|
||||
});
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
47
node_modules/date-and-time/esm/plugin/meridiem.es.js
generated
vendored
Normal file
47
node_modules/date-and-time/esm/plugin/meridiem.es.js
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve meridiem
|
||||
*/
|
||||
|
||||
var plugin = function (date) {
|
||||
var name = 'meridiem';
|
||||
|
||||
date.plugin(name, {
|
||||
res: {
|
||||
AA: ['A.M.', 'P.M.'],
|
||||
a: ['am', 'pm'],
|
||||
aa: ['a.m.', 'p.m.']
|
||||
},
|
||||
formatter: {
|
||||
AA: function (d) {
|
||||
return this.res.AA[d.getHours() > 11 | 0];
|
||||
},
|
||||
a: function (d) {
|
||||
return this.res.a[d.getHours() > 11 | 0];
|
||||
},
|
||||
aa: function (d) {
|
||||
return this.res.aa[d.getHours() > 11 | 0];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
AA: function (str) {
|
||||
var result = this.find(this.res.AA, str);
|
||||
result.token = 'A';
|
||||
return result;
|
||||
},
|
||||
a: function (str) {
|
||||
var result = this.find(this.res.a, str);
|
||||
result.token = 'A';
|
||||
return result;
|
||||
},
|
||||
aa: function (str) {
|
||||
var result = this.find(this.res.aa, str);
|
||||
result.token = 'A';
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
47
node_modules/date-and-time/esm/plugin/meridiem.mjs
generated
vendored
Normal file
47
node_modules/date-and-time/esm/plugin/meridiem.mjs
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve meridiem
|
||||
*/
|
||||
|
||||
var plugin = function (date) {
|
||||
var name = 'meridiem';
|
||||
|
||||
date.plugin(name, {
|
||||
res: {
|
||||
AA: ['A.M.', 'P.M.'],
|
||||
a: ['am', 'pm'],
|
||||
aa: ['a.m.', 'p.m.']
|
||||
},
|
||||
formatter: {
|
||||
AA: function (d) {
|
||||
return this.res.AA[d.getHours() > 11 | 0];
|
||||
},
|
||||
a: function (d) {
|
||||
return this.res.a[d.getHours() > 11 | 0];
|
||||
},
|
||||
aa: function (d) {
|
||||
return this.res.aa[d.getHours() > 11 | 0];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
AA: function (str) {
|
||||
var result = this.find(this.res.AA, str);
|
||||
result.token = 'A';
|
||||
return result;
|
||||
},
|
||||
a: function (str) {
|
||||
var result = this.find(this.res.a, str);
|
||||
result.token = 'A';
|
||||
return result;
|
||||
},
|
||||
aa: function (str) {
|
||||
var result = this.find(this.res.aa, str);
|
||||
result.token = 'A';
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
31
node_modules/date-and-time/esm/plugin/microsecond.es.js
generated
vendored
Normal file
31
node_modules/date-and-time/esm/plugin/microsecond.es.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve microsecond
|
||||
*/
|
||||
|
||||
var plugin = function (date) {
|
||||
var name = 'microsecond';
|
||||
|
||||
date.plugin(name, {
|
||||
parser: {
|
||||
SSSSSS: function (str) {
|
||||
var result = this.exec(/^\d{1,6}/, str);
|
||||
result.value = result.value / 1000 | 0;
|
||||
return result;
|
||||
},
|
||||
SSSSS: function (str) {
|
||||
var result = this.exec(/^\d{1,5}/, str);
|
||||
result.value = result.value / 100 | 0;
|
||||
return result;
|
||||
},
|
||||
SSSS: function (str) {
|
||||
var result = this.exec(/^\d{1,4}/, str);
|
||||
result.value = result.value / 10 | 0;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
31
node_modules/date-and-time/esm/plugin/microsecond.mjs
generated
vendored
Normal file
31
node_modules/date-and-time/esm/plugin/microsecond.mjs
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve microsecond
|
||||
*/
|
||||
|
||||
var plugin = function (date) {
|
||||
var name = 'microsecond';
|
||||
|
||||
date.plugin(name, {
|
||||
parser: {
|
||||
SSSSSS: function (str) {
|
||||
var result = this.exec(/^\d{1,6}/, str);
|
||||
result.value = result.value / 1000 | 0;
|
||||
return result;
|
||||
},
|
||||
SSSSS: function (str) {
|
||||
var result = this.exec(/^\d{1,5}/, str);
|
||||
result.value = result.value / 100 | 0;
|
||||
return result;
|
||||
},
|
||||
SSSS: function (str) {
|
||||
var result = this.exec(/^\d{1,4}/, str);
|
||||
result.value = result.value / 10 | 0;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
34
node_modules/date-and-time/esm/plugin/ordinal.es.js
generated
vendored
Normal file
34
node_modules/date-and-time/esm/plugin/ordinal.es.js
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve ordinal
|
||||
*/
|
||||
|
||||
var plugin = function (date) {
|
||||
var name = 'ordinal';
|
||||
|
||||
date.plugin(name, {
|
||||
formatter: {
|
||||
DDD: function (d) {
|
||||
var day = d.getDate();
|
||||
|
||||
switch (day) {
|
||||
case 1:
|
||||
case 21:
|
||||
case 31:
|
||||
return day + 'st';
|
||||
case 2:
|
||||
case 22:
|
||||
return day + 'nd';
|
||||
case 3:
|
||||
case 23:
|
||||
return day + 'rd';
|
||||
default:
|
||||
return day + 'th';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
34
node_modules/date-and-time/esm/plugin/ordinal.mjs
generated
vendored
Normal file
34
node_modules/date-and-time/esm/plugin/ordinal.mjs
generated
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve ordinal
|
||||
*/
|
||||
|
||||
var plugin = function (date) {
|
||||
var name = 'ordinal';
|
||||
|
||||
date.plugin(name, {
|
||||
formatter: {
|
||||
DDD: function (d) {
|
||||
var day = d.getDate();
|
||||
|
||||
switch (day) {
|
||||
case 1:
|
||||
case 21:
|
||||
case 31:
|
||||
return day + 'st';
|
||||
case 2:
|
||||
case 22:
|
||||
return day + 'nd';
|
||||
case 3:
|
||||
case 23:
|
||||
return day + 'rd';
|
||||
default:
|
||||
return day + 'th';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
75
node_modules/date-and-time/esm/plugin/timespan.es.js
generated
vendored
Normal file
75
node_modules/date-and-time/esm/plugin/timespan.es.js
generated
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve timespan
|
||||
*/
|
||||
|
||||
var plugin = function (date) {
|
||||
var timeSpan = function (date1, date2) {
|
||||
var milliseconds = function (dt, time) {
|
||||
dt.S = time;
|
||||
return dt;
|
||||
},
|
||||
seconds = function (dt, time) {
|
||||
dt.s = time / 1000 | 0;
|
||||
return milliseconds(dt, Math.abs(time) % 1000);
|
||||
},
|
||||
minutes = function (dt, time) {
|
||||
dt.m = time / 60000 | 0;
|
||||
return seconds(dt, Math.abs(time) % 60000);
|
||||
},
|
||||
hours = function (dt, time) {
|
||||
dt.H = time / 3600000 | 0;
|
||||
return minutes(dt, Math.abs(time) % 3600000);
|
||||
},
|
||||
days = function (dt, time) {
|
||||
dt.D = time / 86400000 | 0;
|
||||
return hours(dt, Math.abs(time) % 86400000);
|
||||
},
|
||||
format = function (dt, formatString) {
|
||||
var pattern = date.compile(formatString);
|
||||
var str = '';
|
||||
|
||||
for (var i = 1, len = pattern.length, token, value; i < len; i++) {
|
||||
token = pattern[i].charAt(0);
|
||||
if (token in dt) {
|
||||
value = '' + Math.abs(dt[token]);
|
||||
while (value.length < pattern[i].length) {
|
||||
value = '0' + value;
|
||||
}
|
||||
if (dt[token] < 0) {
|
||||
value = '-' + value;
|
||||
}
|
||||
str += value;
|
||||
} else {
|
||||
str += pattern[i].replace(/\[(.*)]/, '$1');
|
||||
}
|
||||
}
|
||||
return str;
|
||||
},
|
||||
delta = date1.getTime() - date2.getTime();
|
||||
|
||||
return {
|
||||
toMilliseconds: function (formatString) {
|
||||
return format(milliseconds({}, delta), formatString);
|
||||
},
|
||||
toSeconds: function (formatString) {
|
||||
return format(seconds({}, delta), formatString);
|
||||
},
|
||||
toMinutes: function (formatString) {
|
||||
return format(minutes({}, delta), formatString);
|
||||
},
|
||||
toHours: function (formatString) {
|
||||
return format(hours({}, delta), formatString);
|
||||
},
|
||||
toDays: function (formatString) {
|
||||
return format(days({}, delta), formatString);
|
||||
}
|
||||
};
|
||||
};
|
||||
var name = 'timespan';
|
||||
|
||||
date.plugin(name, { extender: { timeSpan: timeSpan } });
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
75
node_modules/date-and-time/esm/plugin/timespan.mjs
generated
vendored
Normal file
75
node_modules/date-and-time/esm/plugin/timespan.mjs
generated
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve timespan
|
||||
*/
|
||||
|
||||
var plugin = function (date) {
|
||||
var timeSpan = function (date1, date2) {
|
||||
var milliseconds = function (dt, time) {
|
||||
dt.S = time;
|
||||
return dt;
|
||||
},
|
||||
seconds = function (dt, time) {
|
||||
dt.s = time / 1000 | 0;
|
||||
return milliseconds(dt, Math.abs(time) % 1000);
|
||||
},
|
||||
minutes = function (dt, time) {
|
||||
dt.m = time / 60000 | 0;
|
||||
return seconds(dt, Math.abs(time) % 60000);
|
||||
},
|
||||
hours = function (dt, time) {
|
||||
dt.H = time / 3600000 | 0;
|
||||
return minutes(dt, Math.abs(time) % 3600000);
|
||||
},
|
||||
days = function (dt, time) {
|
||||
dt.D = time / 86400000 | 0;
|
||||
return hours(dt, Math.abs(time) % 86400000);
|
||||
},
|
||||
format = function (dt, formatString) {
|
||||
var pattern = date.compile(formatString);
|
||||
var str = '';
|
||||
|
||||
for (var i = 1, len = pattern.length, token, value; i < len; i++) {
|
||||
token = pattern[i].charAt(0);
|
||||
if (token in dt) {
|
||||
value = '' + Math.abs(dt[token]);
|
||||
while (value.length < pattern[i].length) {
|
||||
value = '0' + value;
|
||||
}
|
||||
if (dt[token] < 0) {
|
||||
value = '-' + value;
|
||||
}
|
||||
str += value;
|
||||
} else {
|
||||
str += pattern[i].replace(/\[(.*)]/, '$1');
|
||||
}
|
||||
}
|
||||
return str;
|
||||
},
|
||||
delta = date1.getTime() - date2.getTime();
|
||||
|
||||
return {
|
||||
toMilliseconds: function (formatString) {
|
||||
return format(milliseconds({}, delta), formatString);
|
||||
},
|
||||
toSeconds: function (formatString) {
|
||||
return format(seconds({}, delta), formatString);
|
||||
},
|
||||
toMinutes: function (formatString) {
|
||||
return format(minutes({}, delta), formatString);
|
||||
},
|
||||
toHours: function (formatString) {
|
||||
return format(hours({}, delta), formatString);
|
||||
},
|
||||
toDays: function (formatString) {
|
||||
return format(days({}, delta), formatString);
|
||||
}
|
||||
};
|
||||
};
|
||||
var name = 'timespan';
|
||||
|
||||
date.plugin(name, { extender: { timeSpan: timeSpan } });
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
724
node_modules/date-and-time/esm/plugin/timezone.es.js
generated
vendored
Normal file
724
node_modules/date-and-time/esm/plugin/timezone.es.js
generated
vendored
Normal file
@ -0,0 +1,724 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve timezone
|
||||
*/
|
||||
|
||||
var plugin = function (proto, date) {
|
||||
var timeZones = {
|
||||
africa: {
|
||||
abidjan: [0, -968],
|
||||
accra: [0, -968],
|
||||
addis_ababa: [10800, 9900, 9000, 8836],
|
||||
algiers: [7200, 3600, 732, 561, 0],
|
||||
asmara: [10800, 9900, 9000, 8836],
|
||||
bamako: [0, -968],
|
||||
bangui: [3600, 1800, 815, 0],
|
||||
banjul: [0, -968],
|
||||
bissau: [0, -3600, -3740],
|
||||
blantyre: [7820, 7200],
|
||||
brazzaville: [3600, 1800, 815, 0],
|
||||
bujumbura: [7820, 7200],
|
||||
cairo: [10800, 7509, 7200],
|
||||
casablanca: [3600, 0, -1820],
|
||||
ceuta: [7200, 3600, 0, -1276],
|
||||
conakry: [0, -968],
|
||||
dakar: [0, -968],
|
||||
dar_es_salaam: [10800, 9900, 9000, 8836],
|
||||
djibouti: [10800, 9900, 9000, 8836],
|
||||
douala: [3600, 1800, 815, 0],
|
||||
el_aaiun: [3600, 0, -3168, -3600],
|
||||
freetown: [0, -968],
|
||||
gaborone: [7820, 7200],
|
||||
harare: [7820, 7200],
|
||||
johannesburg: [10800, 7200, 6720, 5400],
|
||||
juba: [10800, 7588, 7200],
|
||||
kampala: [10800, 9900, 9000, 8836],
|
||||
khartoum: [10800, 7808, 7200],
|
||||
kigali: [7820, 7200],
|
||||
kinshasa: [3600, 1800, 815, 0],
|
||||
lagos: [3600, 1800, 815, 0],
|
||||
libreville: [3600, 1800, 815, 0],
|
||||
lome: [0, -968],
|
||||
luanda: [3600, 1800, 815, 0],
|
||||
lubumbashi: [7820, 7200],
|
||||
lusaka: [7820, 7200],
|
||||
malabo: [3600, 1800, 815, 0],
|
||||
maputo: [7820, 7200],
|
||||
maseru: [10800, 7200, 6720, 5400],
|
||||
mbabane: [10800, 7200, 6720, 5400],
|
||||
mogadishu: [10800, 9900, 9000, 8836],
|
||||
monrovia: [0, -2588, -2670],
|
||||
nairobi: [10800, 9900, 9000, 8836],
|
||||
ndjamena: [7200, 3612, 3600],
|
||||
niamey: [3600, 1800, 815, 0],
|
||||
nouakchott: [0, -968],
|
||||
ouagadougou: [0, -968],
|
||||
'porto-novo': [3600, 1800, 815, 0],
|
||||
sao_tome: [3600, 1616, 0, -2205],
|
||||
tripoli: [7200, 3600, 3164],
|
||||
tunis: [7200, 3600, 2444, 561],
|
||||
windhoek: [10800, 7200, 5400, 4104, 3600]
|
||||
},
|
||||
america: {
|
||||
adak: [44002, -32400, -36000, -39600, -42398],
|
||||
anchorage: [50424, -28800, -32400, -35976, -36000],
|
||||
anguilla: [-10800, -14400, -15865],
|
||||
antigua: [-10800, -14400, -15865],
|
||||
araguaina: [-7200, -10800, -11568],
|
||||
argentina: {
|
||||
buenos_aires: [-7200, -10800, -14028, -14400, -15408],
|
||||
catamarca: [-7200, -10800, -14400, -15408, -15788],
|
||||
cordoba: [-7200, -10800, -14400, -15408],
|
||||
jujuy: [-7200, -10800, -14400, -15408, -15672],
|
||||
la_rioja: [-7200, -10800, -14400, -15408, -16044],
|
||||
mendoza: [-7200, -10800, -14400, -15408, -16516],
|
||||
rio_gallegos: [-7200, -10800, -14400, -15408, -16612],
|
||||
salta: [-7200, -10800, -14400, -15408, -15700],
|
||||
san_juan: [-7200, -10800, -14400, -15408, -16444],
|
||||
san_luis: [-7200, -10800, -14400, -15408, -15924],
|
||||
tucuman: [-7200, -10800, -14400, -15408, -15652],
|
||||
ushuaia: [-7200, -10800, -14400, -15408, -16392]
|
||||
},
|
||||
aruba: [-10800, -14400, -15865],
|
||||
asuncion: [-10800, -13840, -14400],
|
||||
atikokan: [-18000, -19088, -19176],
|
||||
bahia_banderas: [-18000, -21600, -25200, -25260, -28800],
|
||||
bahia: [-7200, -9244, -10800],
|
||||
barbados: [-10800, -12600, -14309, -14400],
|
||||
belem: [-7200, -10800, -11636],
|
||||
belize: [-18000, -19800, -21168, -21600],
|
||||
'blanc-sablon': [-10800, -14400, -15865],
|
||||
boa_vista: [-10800, -14400, -14560],
|
||||
bogota: [-14400, -17776, -18000],
|
||||
boise: [-21600, -25200, -27889, -28800],
|
||||
cambridge_bay: [0, -18000, -21600, -25200],
|
||||
campo_grande: [-10800, -13108, -14400],
|
||||
cancun: [-14400, -18000, -20824, -21600],
|
||||
caracas: [-14400, -16060, -16064, -16200],
|
||||
cayenne: [-10800, -12560, -14400],
|
||||
cayman: [-18000, -19088, -19176],
|
||||
chicago: [-18000, -21036, -21600],
|
||||
chihuahua: [-18000, -21600, -25200, -25460],
|
||||
ciudad_juarez: [-18000, -21600, -25200, -25556],
|
||||
costa_rica: [-18000, -20173, -21600],
|
||||
creston: [-21600, -25200, -26898],
|
||||
cuiaba: [-10800, -13460, -14400],
|
||||
curacao: [-10800, -14400, -15865],
|
||||
danmarkshavn: [0, -4480, -7200, -10800],
|
||||
dawson: [-25200, -28800, -32400, -33460],
|
||||
dawson_creek: [-25200, -28800, -28856],
|
||||
denver: [-21600, -25196, -25200],
|
||||
detroit: [-14400, -18000, -19931, -21600],
|
||||
dominica: [-10800, -14400, -15865],
|
||||
edmonton: [-21600, -25200, -27232],
|
||||
eirunepe: [-14400, -16768, -18000],
|
||||
el_salvador: [-18000, -21408, -21600],
|
||||
fortaleza: [-7200, -9240, -10800],
|
||||
fort_nelson: [-25200, -28800, -29447],
|
||||
glace_bay: [-10800, -14388, -14400],
|
||||
goose_bay: [-7200, -9000, -9052, -10800, -12600, -12652, -14400, -14500],
|
||||
grand_turk: [-14400, -17072, -18000, -18430],
|
||||
grenada: [-10800, -14400, -15865],
|
||||
guadeloupe: [-10800, -14400, -15865],
|
||||
guatemala: [-18000, -21600, -21724],
|
||||
guayaquil: [-14400, -18000, -18840, -19160],
|
||||
guyana: [-10800, -13500, -13959, -14400],
|
||||
halifax: [-10800, -14400, -15264],
|
||||
havana: [-14400, -18000, -19768, -19776],
|
||||
hermosillo: [-21600, -25200, -26632, -28800],
|
||||
indiana: {
|
||||
indianapolis: [-14400, -18000, -20678, -21600],
|
||||
knox: [-18000, -20790, -21600],
|
||||
marengo: [-14400, -18000, -20723, -21600],
|
||||
petersburg: [-14400, -18000, -20947, -21600],
|
||||
tell_city: [-14400, -18000, -20823, -21600],
|
||||
vevay: [-14400, -18000, -20416, -21600],
|
||||
vincennes: [-14400, -18000, -21007, -21600],
|
||||
winamac: [-14400, -18000, -20785, -21600]
|
||||
},
|
||||
inuvik: [0, -21600, -25200, -28800],
|
||||
iqaluit: [0, -14400, -18000, -21600],
|
||||
jamaica: [-14400, -18000, -18430],
|
||||
juneau: [54139, -25200, -28800, -32261, -32400],
|
||||
kentucky: {
|
||||
louisville: [-14400, -18000, -20582, -21600],
|
||||
monticello: [-14400, -18000, -20364, -21600]
|
||||
},
|
||||
kralendijk: [-10800, -14400, -15865],
|
||||
la_paz: [-12756, -14400, -16356],
|
||||
lima: [-14400, -18000, -18492, -18516],
|
||||
los_angeles: [-25200, -28378, -28800],
|
||||
lower_princes: [-10800, -14400, -15865],
|
||||
maceio: [-7200, -8572, -10800],
|
||||
managua: [-18000, -20708, -20712, -21600],
|
||||
manaus: [-10800, -14400, -14404],
|
||||
marigot: [-10800, -14400, -15865],
|
||||
martinique: [-10800, -14400, -14660],
|
||||
matamoros: [-18000, -21600, -23400],
|
||||
mazatlan: [-21600, -25200, -25540, -28800],
|
||||
menominee: [-18000, -21027, -21600],
|
||||
merida: [-18000, -21508, -21600],
|
||||
metlakatla: [54822, -25200, -28800, -31578, -32400],
|
||||
mexico_city: [-18000, -21600, -23796, -25200],
|
||||
miquelon: [-7200, -10800, -13480, -14400],
|
||||
moncton: [-10800, -14400, -15548, -18000],
|
||||
monterrey: [-18000, -21600, -24076],
|
||||
montevideo: [-5400, -7200, -9000, -10800, -12600, -13491, -14400],
|
||||
montserrat: [-10800, -14400, -15865],
|
||||
nassau: [-14400, -18000, -19052],
|
||||
new_york: [-14400, -17762, -18000],
|
||||
nome: [46702, -28800, -32400, -36000, -39600, -39698],
|
||||
noronha: [-3600, -7200, -7780],
|
||||
north_dakota: {
|
||||
beulah: [-18000, -21600, -24427, -25200],
|
||||
center: [-18000, -21600, -24312, -25200],
|
||||
new_salem: [-18000, -21600, -24339, -25200]
|
||||
},
|
||||
nuuk: [-3600, -7200, -10800, -12416],
|
||||
ojinaga: [-18000, -21600, -25060, -25200],
|
||||
panama: [-18000, -19088, -19176],
|
||||
paramaribo: [-10800, -12600, -13236, -13240, -13252],
|
||||
phoenix: [-21600, -25200, -26898],
|
||||
'port-au-prince': [-14400, -17340, -17360, -18000],
|
||||
port_of_spain: [-10800, -14400, -15865],
|
||||
porto_velho: [-10800, -14400, -15336],
|
||||
puerto_rico: [-10800, -14400, -15865],
|
||||
punta_arenas: [-10800, -14400, -16965, -17020, -18000],
|
||||
rankin_inlet: [0, -18000, -21600],
|
||||
recife: [-7200, -8376, -10800],
|
||||
regina: [-21600, -25116, -25200],
|
||||
resolute: [0, -18000, -21600],
|
||||
rio_branco: [-14400, -16272, -18000],
|
||||
santarem: [-10800, -13128, -14400],
|
||||
santiago: [-10800, -14400, -16965, -18000],
|
||||
santo_domingo: [-14400, -16200, -16776, -16800, -18000],
|
||||
sao_paulo: [-7200, -10800, -11188],
|
||||
scoresbysund: [0, -3600, -5272, -7200],
|
||||
sitka: [53927, -25200, -28800, -32400, -32473],
|
||||
st_barthelemy: [-10800, -14400, -15865],
|
||||
st_johns: [-5400, -9000, -9052, -12600, -12652],
|
||||
st_kitts: [-10800, -14400, -15865],
|
||||
st_lucia: [-10800, -14400, -15865],
|
||||
st_thomas: [-10800, -14400, -15865],
|
||||
st_vincent: [-10800, -14400, -15865],
|
||||
swift_current: [-21600, -25200, -25880],
|
||||
tegucigalpa: [-18000, -20932, -21600],
|
||||
thule: [-10800, -14400, -16508],
|
||||
tijuana: [-25200, -28084, -28800],
|
||||
toronto: [-14400, -18000, -19052],
|
||||
tortola: [-10800, -14400, -15865],
|
||||
vancouver: [-25200, -28800, -29548],
|
||||
whitehorse: [-25200, -28800, -32400, -32412],
|
||||
winnipeg: [-18000, -21600, -23316],
|
||||
yakutat: [52865, -28800, -32400, -33535]
|
||||
},
|
||||
antarctica: {
|
||||
casey: [39600, 28800, 0],
|
||||
davis: [25200, 18000, 0],
|
||||
dumontdurville: [36000, 35320, 35312],
|
||||
macquarie: [39600, 36000, 0],
|
||||
mawson: [21600, 18000, 0],
|
||||
mcmurdo: [46800, 45000, 43200, 41944, 41400],
|
||||
palmer: [0, -7200, -10800, -14400],
|
||||
rothera: [0, -10800],
|
||||
syowa: [11212, 10800],
|
||||
troll: [7200, 0],
|
||||
vostok: [25200, 18000, 0]
|
||||
},
|
||||
arctic: { longyearbyen: [10800, 7200, 3600, 3208] },
|
||||
asia: {
|
||||
aden: [11212, 10800],
|
||||
almaty: [25200, 21600, 18468, 18000],
|
||||
amman: [10800, 8624, 7200],
|
||||
anadyr: [50400, 46800, 43200, 42596, 39600],
|
||||
aqtau: [21600, 18000, 14400, 12064],
|
||||
aqtobe: [21600, 18000, 14400, 13720],
|
||||
ashgabat: [21600, 18000, 14400, 14012],
|
||||
atyrau: [21600, 18000, 14400, 12464, 10800],
|
||||
baghdad: [14400, 10800, 10660, 10656],
|
||||
bahrain: [14400, 12368, 10800],
|
||||
baku: [18000, 14400, 11964, 10800],
|
||||
bangkok: [25200, 24124],
|
||||
barnaul: [28800, 25200, 21600, 20100],
|
||||
beirut: [10800, 8520, 7200],
|
||||
bishkek: [25200, 21600, 18000, 17904],
|
||||
brunei: [32400, 30000, 28800, 27000, 26480],
|
||||
chita: [36000, 32400, 28800, 27232],
|
||||
choibalsan: [36000, 32400, 28800, 27480, 25200],
|
||||
colombo: [23400, 21600, 19800, 19172, 19164],
|
||||
damascus: [10800, 8712, 7200],
|
||||
dhaka: [25200, 23400, 21700, 21600, 21200, 19800],
|
||||
dili: [32400, 30140, 28800],
|
||||
dubai: [14400, 13272],
|
||||
dushanbe: [25200, 21600, 18000, 16512],
|
||||
famagusta: [10800, 8148, 7200],
|
||||
gaza: [10800, 8272, 7200],
|
||||
hebron: [10800, 8423, 7200],
|
||||
ho_chi_minh: [32400, 28800, 25590, 25200],
|
||||
hong_kong: [32400, 30600, 28800, 27402],
|
||||
hovd: [28800, 25200, 21996, 21600],
|
||||
irkutsk: [32400, 28800, 25200, 25025],
|
||||
jakarta: [32400, 28800, 27000, 26400, 25632, 25200],
|
||||
jayapura: [34200, 33768, 32400],
|
||||
jerusalem: [14400, 10800, 8454, 8440, 7200],
|
||||
kabul: [16608, 16200, 14400],
|
||||
kamchatka: [46800, 43200, 39600, 38076],
|
||||
karachi: [23400, 21600, 19800, 18000, 16092],
|
||||
kathmandu: [20700, 20476, 19800],
|
||||
khandyga: [39600, 36000, 32533, 32400, 28800],
|
||||
kolkata: [23400, 21208, 21200, 19800, 19270],
|
||||
krasnoyarsk: [28800, 25200, 22286, 21600],
|
||||
kuala_lumpur: [32400, 28800, 27000, 26400, 25200, 24925],
|
||||
kuching: [32400, 30000, 28800, 27000, 26480],
|
||||
kuwait: [11212, 10800],
|
||||
macau: [36000, 32400, 28800, 27250],
|
||||
magadan: [43200, 39600, 36192, 36000],
|
||||
makassar: [32400, 28800, 28656],
|
||||
manila: [32400, 29040, 28800, -57360],
|
||||
muscat: [14400, 13272],
|
||||
nicosia: [10800, 8008, 7200],
|
||||
novokuznetsk: [28800, 25200, 21600, 20928],
|
||||
novosibirsk: [28800, 25200, 21600, 19900],
|
||||
omsk: [25200, 21600, 18000, 17610],
|
||||
oral: [21600, 18000, 14400, 12324, 10800],
|
||||
phnom_penh: [25200, 24124],
|
||||
pontianak: [32400, 28800, 27000, 26240, 25200],
|
||||
pyongyang: [32400, 30600, 30180],
|
||||
qatar: [14400, 12368, 10800],
|
||||
qostanay: [21600, 18000, 15268, 14400],
|
||||
qyzylorda: [21600, 18000, 15712, 14400],
|
||||
riyadh: [11212, 10800],
|
||||
sakhalin: [43200, 39600, 36000, 34248, 32400],
|
||||
samarkand: [21600, 18000, 16073, 14400],
|
||||
seoul: [36000, 34200, 32400, 30600, 30472],
|
||||
shanghai: [32400, 29143, 28800],
|
||||
singapore: [32400, 28800, 27000, 26400, 25200, 24925],
|
||||
srednekolymsk: [43200, 39600, 36892, 36000],
|
||||
taipei: [32400, 29160, 28800],
|
||||
tashkent: [25200, 21600, 18000, 16631],
|
||||
tbilisi: [18000, 14400, 10800, 10751],
|
||||
tehran: [18000, 16200, 14400, 12600, 12344],
|
||||
thimphu: [21600, 21516, 19800],
|
||||
tokyo: [36000, 33539, 32400],
|
||||
tomsk: [28800, 25200, 21600, 20391],
|
||||
ulaanbaatar: [32400, 28800, 25652, 25200],
|
||||
urumqi: [21600, 21020],
|
||||
'ust-nera': [43200, 39600, 36000, 34374, 32400, 28800],
|
||||
vientiane: [25200, 24124],
|
||||
vladivostok: [39600, 36000, 32400, 31651],
|
||||
yakutsk: [36000, 32400, 31138, 28800],
|
||||
yangon: [32400, 23400, 23087],
|
||||
yekaterinburg: [21600, 18000, 14553, 14400, 13505],
|
||||
yerevan: [18000, 14400, 10800, 10680]
|
||||
},
|
||||
atlantic: {
|
||||
azores: [0, -3600, -6160, -6872, -7200],
|
||||
bermuda: [-10800, -11958, -14400, -15558],
|
||||
canary: [3600, 0, -3600, -3696],
|
||||
cape_verde: [-3600, -5644, -7200],
|
||||
faroe: [3600, 0, -1624],
|
||||
madeira: [3600, 0, -3600, -4056],
|
||||
reykjavik: [0, -968],
|
||||
south_georgia: [-7200, -8768],
|
||||
stanley: [-7200, -10800, -13884, -14400],
|
||||
st_helena: [0, -968]
|
||||
},
|
||||
australia: {
|
||||
adelaide: [37800, 34200, 33260, 32400],
|
||||
brisbane: [39600, 36728, 36000],
|
||||
broken_hill: [37800, 36000, 34200, 33948, 32400],
|
||||
darwin: [37800, 34200, 32400, 31400],
|
||||
eucla: [35100, 31500, 30928],
|
||||
hobart: [39600, 36000, 35356],
|
||||
lindeman: [39600, 36000, 35756],
|
||||
lord_howe: [41400, 39600, 38180, 37800, 36000],
|
||||
melbourne: [39600, 36000, 34792],
|
||||
perth: [32400, 28800, 27804],
|
||||
sydney: [39600, 36292, 36000]
|
||||
},
|
||||
europe: {
|
||||
amsterdam: [7200, 3600, 1050, 0],
|
||||
andorra: [7200, 3600, 364, 0],
|
||||
astrakhan: [18000, 14400, 11532, 10800],
|
||||
athens: [10800, 7200, 5692, 3600],
|
||||
belgrade: [7200, 4920, 3600],
|
||||
berlin: [10800, 7200, 3600, 3208],
|
||||
bratislava: [7200, 3600, 3464, 0],
|
||||
brussels: [7200, 3600, 1050, 0],
|
||||
bucharest: [10800, 7200, 6264],
|
||||
budapest: [7200, 4580, 3600],
|
||||
busingen: [7200, 3600, 2048, 1786],
|
||||
chisinau: [14400, 10800, 7200, 6920, 6900, 6264, 3600],
|
||||
copenhagen: [10800, 7200, 3600, 3208],
|
||||
dublin: [3600, 2079, 0, -1521],
|
||||
gibraltar: [7200, 3600, 0, -1284],
|
||||
guernsey: [7200, 3600, 0, -75],
|
||||
helsinki: [10800, 7200, 5989],
|
||||
isle_of_man: [7200, 3600, 0, -75],
|
||||
istanbul: [14400, 10800, 7200, 7016, 6952],
|
||||
jersey: [7200, 3600, 0, -75],
|
||||
kaliningrad: [14400, 10800, 7200, 4920, 3600],
|
||||
kirov: [18000, 14400, 11928, 10800],
|
||||
kyiv: [14400, 10800, 7324, 7200, 3600],
|
||||
lisbon: [7200, 3600, 0, -2205],
|
||||
ljubljana: [7200, 4920, 3600],
|
||||
london: [7200, 3600, 0, -75],
|
||||
luxembourg: [7200, 3600, 1050, 0],
|
||||
madrid: [7200, 3600, 0, -884],
|
||||
malta: [7200, 3600, 3484],
|
||||
mariehamn: [10800, 7200, 5989],
|
||||
minsk: [14400, 10800, 7200, 6616, 6600, 3600],
|
||||
monaco: [7200, 3600, 561, 0],
|
||||
moscow: [18000, 16279, 14400, 12679, 10800, 9079, 9017, 7200],
|
||||
oslo: [10800, 7200, 3600, 3208],
|
||||
paris: [7200, 3600, 561, 0],
|
||||
podgorica: [7200, 4920, 3600],
|
||||
prague: [7200, 3600, 3464, 0],
|
||||
riga: [14400, 10800, 9394, 7200, 5794, 3600],
|
||||
rome: [7200, 3600, 2996],
|
||||
samara: [18000, 14400, 12020, 10800],
|
||||
san_marino: [7200, 3600, 2996],
|
||||
sarajevo: [7200, 4920, 3600],
|
||||
saratov: [18000, 14400, 11058, 10800],
|
||||
simferopol: [14400, 10800, 8184, 8160, 7200, 3600],
|
||||
skopje: [7200, 4920, 3600],
|
||||
sofia: [10800, 7200, 7016, 5596, 3600],
|
||||
stockholm: [10800, 7200, 3600, 3208],
|
||||
tallinn: [14400, 10800, 7200, 5940, 3600],
|
||||
tirane: [7200, 4760, 3600],
|
||||
ulyanovsk: [18000, 14400, 11616, 10800, 7200],
|
||||
vaduz: [7200, 3600, 2048, 1786],
|
||||
vatican: [7200, 3600, 2996],
|
||||
vienna: [7200, 3921, 3600],
|
||||
vilnius: [14400, 10800, 7200, 6076, 5736, 5040, 3600],
|
||||
volgograd: [18000, 14400, 10800, 10660],
|
||||
warsaw: [10800, 7200, 5040, 3600],
|
||||
zagreb: [7200, 4920, 3600],
|
||||
zurich: [7200, 3600, 2048, 1786]
|
||||
},
|
||||
indian: {
|
||||
antananarivo: [10800, 9900, 9000, 8836],
|
||||
chagos: [21600, 18000, 17380],
|
||||
christmas: [25200, 24124],
|
||||
cocos: [32400, 23400, 23087],
|
||||
comoro: [10800, 9900, 9000, 8836],
|
||||
kerguelen: [18000, 17640],
|
||||
mahe: [14400, 13272],
|
||||
maldives: [18000, 17640],
|
||||
mauritius: [18000, 14400, 13800],
|
||||
mayotte: [10800, 9900, 9000, 8836],
|
||||
reunion: [14400, 13272]
|
||||
},
|
||||
pacific: {
|
||||
apia: [50400, 46800, 45184, -36000, -39600, -41216, -41400],
|
||||
auckland: [46800, 45000, 43200, 41944, 41400],
|
||||
bougainville: [39600, 37336, 36000, 35312, 32400],
|
||||
chatham: [49500, 45900, 44100, 44028],
|
||||
chuuk: [36000, 35320, 35312],
|
||||
easter: [-18000, -21600, -25200, -26248],
|
||||
efate: [43200, 40396, 39600],
|
||||
fakaofo: [46800, -39600, -41096],
|
||||
fiji: [46800, 43200, 42944],
|
||||
funafuti: [43200, 41524],
|
||||
galapagos: [-18000, -21504, -21600],
|
||||
gambier: [-32388, -32400],
|
||||
guadalcanal: [39600, 38388],
|
||||
guam: [39600, 36000, 34740, 32400, -51660],
|
||||
honolulu: [-34200, -36000, -37800, -37886],
|
||||
kanton: [46800, 0, -39600, -43200],
|
||||
kiritimati: [50400, -36000, -37760, -38400],
|
||||
kosrae: [43200, 39600, 39116, 36000, 32400, -47284],
|
||||
kwajalein: [43200, 40160, 39600, 36000, 32400, -43200],
|
||||
majuro: [43200, 41524],
|
||||
marquesas: [-33480, -34200],
|
||||
midway: [45432, -39600, -40968],
|
||||
nauru: [43200, 41400, 40060, 32400],
|
||||
niue: [-39600, -40780, -40800],
|
||||
norfolk: [45000, 43200, 41400, 40320, 40312, 39600],
|
||||
noumea: [43200, 39948, 39600],
|
||||
pago_pago: [45432, -39600, -40968],
|
||||
palau: [32400, 32276, -54124],
|
||||
pitcairn: [-28800, -30600, -31220],
|
||||
pohnpei: [39600, 38388],
|
||||
port_moresby: [36000, 35320, 35312],
|
||||
rarotonga: [48056, -34200, -36000, -37800, -38344],
|
||||
saipan: [39600, 36000, 34740, 32400, -51660],
|
||||
tahiti: [-35896, -36000],
|
||||
tarawa: [43200, 41524],
|
||||
tongatapu: [50400, 46800, 44400, 44352],
|
||||
wake: [43200, 41524],
|
||||
wallis: [43200, 41524]
|
||||
}
|
||||
};
|
||||
var timeZoneNames = {
|
||||
'Acre Standard Time': 'ACT', 'Acre Summer Time': 'ACST', 'Afghanistan Time': 'AFT',
|
||||
'Alaska Daylight Time': 'AKDT', 'Alaska Standard Time': 'AKST', 'Almaty Standard Time': 'ALMT',
|
||||
'Almaty Summer Time': 'ALMST', 'Amazon Standard Time': 'AMT', 'Amazon Summer Time': 'AMST',
|
||||
'Anadyr Standard Time': 'ANAT', 'Anadyr Summer Time': 'ANAST', 'Apia Daylight Time': 'WSDT',
|
||||
'Apia Standard Time': 'WSST', 'Aqtau Standard Time': 'AQTT', 'Aqtau Summer Time': 'AQTST',
|
||||
'Aqtobe Standard Time': 'AQTT', 'Aqtobe Summer Time': 'AQST', 'Arabian Daylight Time': 'ADT',
|
||||
'Arabian Standard Time': 'AST', 'Argentina Standard Time': 'ART', 'Argentina Summer Time': 'ARST',
|
||||
'Armenia Standard Time': 'AMT', 'Armenia Summer Time': 'AMST', 'Atlantic Daylight Time': 'ADT',
|
||||
'Atlantic Standard Time': 'AST', 'Australian Central Daylight Time': 'ACDT', 'Australian Central Standard Time': 'ACST',
|
||||
'Australian Central Western Daylight Time': 'ACWDT', 'Australian Central Western Standard Time': 'ACWST', 'Australian Eastern Daylight Time': 'AEDT',
|
||||
'Australian Eastern Standard Time': 'AEST', 'Australian Western Daylight Time': 'AWDT', 'Australian Western Standard Time': 'AWST',
|
||||
'Azerbaijan Standard Time': 'AZT', 'Azerbaijan Summer Time': 'AZST', 'Azores Standard Time': 'AZOT',
|
||||
'Azores Summer Time': 'AZOST', 'Bangladesh Standard Time': 'BST', 'Bangladesh Summer Time': 'BDST',
|
||||
'Bhutan Time': 'BTT', 'Bolivia Time': 'BOT', 'Brasilia Standard Time': 'BRT',
|
||||
'Brasilia Summer Time': 'BRST', 'British Summer Time': 'BST', 'Brunei Darussalam Time': 'BNT',
|
||||
'Cape Verde Standard Time': 'CVT', 'Casey Time': 'CAST', 'Central Africa Time': 'CAT',
|
||||
'Central Daylight Time': 'CDT', 'Central European Standard Time': 'CET', 'Central European Summer Time': 'CEST',
|
||||
'Central Indonesia Time': 'WITA', 'Central Standard Time': 'CST', 'Chamorro Standard Time': 'ChST',
|
||||
'Chatham Daylight Time': 'CHADT', 'Chatham Standard Time': 'CHAST', 'Chile Standard Time': 'CLT',
|
||||
'Chile Summer Time': 'CLST', 'China Daylight Time': 'CDT', 'China Standard Time': 'CST',
|
||||
'Christmas Island Time': 'CXT', 'Chuuk Time': 'CHUT', 'Cocos Islands Time': 'CCT',
|
||||
'Colombia Standard Time': 'COT', 'Colombia Summer Time': 'COST', 'Cook Islands Half Summer Time': 'CKHST',
|
||||
'Cook Islands Standard Time': 'CKT', 'Coordinated Universal Time': 'UTC', 'Cuba Daylight Time': 'CDT',
|
||||
'Cuba Standard Time': 'CST', 'Davis Time': 'DAVT', 'Dumont-d’Urville Time': 'DDUT',
|
||||
'East Africa Time': 'EAT', 'East Greenland Standard Time': 'EGT', 'East Greenland Summer Time': 'EGST',
|
||||
'East Kazakhstan Time': 'ALMT', 'East Timor Time': 'TLT', 'Easter Island Standard Time': 'EAST',
|
||||
'Easter Island Summer Time': 'EASST', 'Eastern Daylight Time': 'EDT', 'Eastern European Standard Time': 'EET',
|
||||
'Eastern European Summer Time': 'EEST', 'Eastern Indonesia Time': 'WIT', 'Eastern Standard Time': 'EST',
|
||||
'Ecuador Time': 'ECT', 'Falkland Islands Standard Time': 'FKST', 'Falkland Islands Summer Time': 'FKDT',
|
||||
'Fernando de Noronha Standard Time': 'FNT', 'Fernando de Noronha Summer Time': 'FNST', 'Fiji Standard Time': 'FJT',
|
||||
'Fiji Summer Time': 'FJST', 'French Guiana Time': 'GFT', 'French Southern & Antarctic Time': 'TFT',
|
||||
'Further-eastern European Time': 'FET', 'Galapagos Time': 'GALT', 'Gambier Time': 'GAMT',
|
||||
'Georgia Standard Time': 'GET', 'Georgia Summer Time': 'GEST', 'Gilbert Islands Time': 'GILT',
|
||||
'Greenwich Mean Time': 'GMT', 'Guam Standard Time': 'ChST', 'Gulf Standard Time': 'GST',
|
||||
'Guyana Time': 'GYT', 'Hawaii-Aleutian Daylight Time': 'HADT', 'Hawaii-Aleutian Standard Time': 'HAST',
|
||||
'Hong Kong Standard Time': 'HKT', 'Hong Kong Summer Time': 'HKST', 'Hovd Standard Time': 'HOVT',
|
||||
'Hovd Summer Time': 'HOVST', 'India Standard Time': 'IST', 'Indian Ocean Time': 'IOT',
|
||||
'Indochina Time': 'ICT', 'Iran Daylight Time': 'IRDT', 'Iran Standard Time': 'IRST',
|
||||
'Irish Standard Time': 'IST', 'Irkutsk Standard Time': 'IRKT', 'Irkutsk Summer Time': 'IRKST',
|
||||
'Israel Daylight Time': 'IDT', 'Israel Standard Time': 'IST', 'Japan Standard Time': 'JST',
|
||||
'Korean Daylight Time': 'KDT', 'Korean Standard Time': 'KST', 'Kosrae Time': 'KOST',
|
||||
'Krasnoyarsk Standard Time': 'KRAT', 'Krasnoyarsk Summer Time': 'KRAST', 'Kyrgyzstan Time': 'KGT',
|
||||
'Lanka Time': 'LKT', 'Line Islands Time': 'LINT', 'Lord Howe Daylight Time': 'LHDT',
|
||||
'Lord Howe Standard Time': 'LHST', 'Macao Standard Time': 'CST', 'Macao Summer Time': 'CDT',
|
||||
'Magadan Standard Time': 'MAGT', 'Magadan Summer Time': 'MAGST', 'Malaysia Time': 'MYT',
|
||||
'Maldives Time': 'MVT', 'Marquesas Time': 'MART', 'Marshall Islands Time': 'MHT',
|
||||
'Mauritius Standard Time': 'MUT', 'Mauritius Summer Time': 'MUST', 'Mawson Time': 'MAWT',
|
||||
'Mexican Pacific Daylight Time': 'PDT', 'Mexican Pacific Standard Time': 'PST', 'Moscow Standard Time': 'MSK',
|
||||
'Moscow Summer Time': 'MSD', 'Mountain Daylight Time': 'MDT', 'Mountain Standard Time': 'MST',
|
||||
'Myanmar Time': 'MMT', 'Nauru Time': 'NRT', 'Nepal Time': 'NPT',
|
||||
'New Caledonia Standard Time': 'NCT', 'New Caledonia Summer Time': 'NCST', 'New Zealand Daylight Time': 'NZDT',
|
||||
'New Zealand Standard Time': 'NZST', 'Newfoundland Daylight Time': 'NDT', 'Newfoundland Standard Time': 'NST',
|
||||
'Niue Time': 'NUT', 'Norfolk Island Daylight Time': 'NFDT', 'Norfolk Island Standard Time': 'NFT',
|
||||
'North Mariana Islands Time': 'ChST', 'Novosibirsk Standard Time': 'NOVT', 'Novosibirsk Summer Time': 'NOVST',
|
||||
'Omsk Standard Time': 'OMST', 'Omsk Summer Time': 'OMSST', 'Pacific Daylight Time': 'PDT',
|
||||
'Pacific Standard Time': 'PST', 'Pakistan Standard Time': 'PKT', 'Pakistan Summer Time': 'PKST',
|
||||
'Palau Time': 'PWT', 'Papua New Guinea Time': 'PGT', 'Paraguay Standard Time': 'PYT',
|
||||
'Paraguay Summer Time': 'PYST', 'Peru Standard Time': 'PET', 'Peru Summer Time': 'PEST',
|
||||
'Petropavlovsk-Kamchatski Standard Time': 'PETT', 'Petropavlovsk-Kamchatski Summer Time': 'PETST', 'Philippine Standard Time': 'PST',
|
||||
'Philippine Summer Time': 'PHST', 'Phoenix Islands Time': 'PHOT', 'Pitcairn Time': 'PIT',
|
||||
'Ponape Time': 'PONT', 'Pyongyang Time': 'KST', 'Qyzylorda Standard Time': 'QYZT',
|
||||
'Qyzylorda Summer Time': 'QYZST', 'Rothera Time': 'ROOTT', 'Réunion Time': 'RET',
|
||||
'Sakhalin Standard Time': 'SAKT', 'Sakhalin Summer Time': 'SAKST', 'Samara Standard Time': 'SAMT',
|
||||
'Samara Summer Time': 'SAMST', 'Samoa Standard Time': 'SST', 'Seychelles Time': 'SCT',
|
||||
'Singapore Standard Time': 'SGT', 'Solomon Islands Time': 'SBT', 'South Africa Standard Time': 'SAST',
|
||||
'South Georgia Time': 'GST', 'St. Pierre & Miquelon Daylight Time': 'PMDT', 'St. Pierre & Miquelon Standard Time': 'PMST',
|
||||
'Suriname Time': 'SRT', 'Syowa Time': 'SYOT', 'Tahiti Time': 'TAHT',
|
||||
'Taipei Daylight Time': 'CDT', 'Taipei Standard Time': 'CST', 'Tajikistan Time': 'TJT',
|
||||
'Tokelau Time': 'TKT', 'Tonga Standard Time': 'TOT', 'Tonga Summer Time': 'TOST',
|
||||
'Turkmenistan Standard Time': 'TMT', 'Tuvalu Time': 'TVT', 'Ulaanbaatar Standard Time': 'ULAT',
|
||||
'Ulaanbaatar Summer Time': 'ULAST', 'Uruguay Standard Time': 'UYT', 'Uruguay Summer Time': 'UYST',
|
||||
'Uzbekistan Standard Time': 'UZT', 'Uzbekistan Summer Time': 'UZST', 'Vanuatu Standard Time': 'VUT',
|
||||
'Vanuatu Summer Time': 'VUST', 'Venezuela Time': 'VET', 'Vladivostok Standard Time': 'VLAT',
|
||||
'Vladivostok Summer Time': 'VLAST', 'Volgograd Standard Time': 'VOLT', 'Volgograd Summer Time': 'VOLST',
|
||||
'Vostok Time': 'VOST', 'Wake Island Time': 'WAKT', 'Wallis & Futuna Time': 'WFT',
|
||||
'West Africa Standard Time': 'WAT', 'West Africa Summer Time': 'WAST', 'West Greenland Standard Time': 'WGST',
|
||||
'West Greenland Summer Time': 'WGST', 'West Kazakhstan Time': 'AQTT', 'Western Argentina Standard Time': 'ART',
|
||||
'Western Argentina Summer Time': 'ARST', 'Western European Standard Time': 'WET', 'Western European Summer Time': 'WEST',
|
||||
'Western Indonesia Time': 'WIB', 'Yakutsk Standard Time': 'YAKT', 'Yakutsk Summer Time': 'YAKST',
|
||||
'Yekaterinburg Standard Time': 'YEKT', 'Yekaterinburg Summer Time': 'YEKST', 'Yukon Time': 'YT'
|
||||
};
|
||||
var options = {
|
||||
hour12: false, weekday: 'short', year: 'numeric', month: 'numeric', day: 'numeric',
|
||||
hour: 'numeric', minute: 'numeric', second: 'numeric', fractionalSecondDigits: 3,
|
||||
timeZone: 'UTC'
|
||||
};
|
||||
var cache = {
|
||||
utc: new Intl.DateTimeFormat('en-US', options)
|
||||
};
|
||||
var getDateTimeFormat = function (timeZone) {
|
||||
if (timeZone) {
|
||||
var tz = timeZone.toLowerCase();
|
||||
|
||||
if (!cache[tz]) {
|
||||
options.timeZone = timeZone;
|
||||
cache[tz] = new Intl.DateTimeFormat('en-US', options);
|
||||
}
|
||||
return cache[tz];
|
||||
}
|
||||
options.timeZone = undefined;
|
||||
return new Intl.DateTimeFormat('en-US', options);
|
||||
};
|
||||
var formatToParts = function (dateTimeFormat, dateObjOrTime) {
|
||||
var array = dateTimeFormat.formatToParts(dateObjOrTime),
|
||||
values = {};
|
||||
|
||||
for (var i = 0, len = array.length; i < len; i++) {
|
||||
var type = array[i].type,
|
||||
value = array[i].value;
|
||||
|
||||
switch (type) {
|
||||
case 'weekday':
|
||||
values[type] = 'SunMonTueWedThuFriSat'.indexOf(value) / 3;
|
||||
break;
|
||||
case 'hour':
|
||||
values[type] = value % 24;
|
||||
break;
|
||||
case 'year':
|
||||
case 'month':
|
||||
case 'day':
|
||||
case 'minute':
|
||||
case 'second':
|
||||
case 'fractionalSecond':
|
||||
values[type] = value | 0;
|
||||
}
|
||||
}
|
||||
return values;
|
||||
};
|
||||
var getTimeFromParts = function (parts) {
|
||||
return Date.UTC(
|
||||
parts.year, parts.month - (parts.year < 100 ? 1900 * 12 + 1 : 1), parts.day,
|
||||
parts.hour, parts.minute, parts.second, parts.fractionalSecond
|
||||
);
|
||||
};
|
||||
var formatTZ = function (dateObj, arg, timeZone) {
|
||||
var parts = formatToParts(getDateTimeFormat(timeZone), dateObj);
|
||||
|
||||
return date.format({
|
||||
getFullYear: function () { return parts.year; },
|
||||
getMonth: function () { return parts.month - 1; },
|
||||
getDate: function () { return parts.day; },
|
||||
getHours: function () { return parts.hour; },
|
||||
getMinutes: function () { return parts.minute; },
|
||||
getSeconds: function () { return parts.second; },
|
||||
getMilliseconds: function () { return parts.fractionalSecond; },
|
||||
getDay: function () { return parts.weekday; },
|
||||
getTime: function () { return dateObj.getTime(); },
|
||||
getTimezoneOffset: function () {
|
||||
return (dateObj.getTime() - getTimeFromParts(parts)) / 60000 | 0;
|
||||
},
|
||||
getTimezoneName: function () { return timeZone || undefined; }
|
||||
}, arg);
|
||||
};
|
||||
var parseTZ = function (arg1, arg2, timeZone) {
|
||||
var pattern = typeof arg2 === 'string' ? date.compile(arg2) : arg2;
|
||||
var time = typeof arg1 === 'string' ? date.parse(arg1, pattern, !!timeZone).getTime() : arg1;
|
||||
var hasZ = function (array) {
|
||||
for (var i = 1, len = array.length; i < len; i++) {
|
||||
if (!array[i].indexOf('Z')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
if (!timeZone || hasZ(pattern) || timeZone.toUpperCase() === 'UTC' || isNaN(time)) {
|
||||
return new Date(time);
|
||||
}
|
||||
|
||||
var getOffset = function (timeZoneName) {
|
||||
var keys = (timeZoneName || '').toLowerCase().split('/');
|
||||
var value = timeZones[keys[0]] || {};
|
||||
|
||||
for (var i = 1, len = keys.length; i < len; i++) {
|
||||
value = value[keys[i]] || {};
|
||||
}
|
||||
return Array.isArray(value) ? value : [];
|
||||
};
|
||||
|
||||
var utc = getDateTimeFormat('UTC');
|
||||
var tz = getDateTimeFormat(timeZone);
|
||||
var offset = getOffset(timeZone);
|
||||
|
||||
for (var i = 0; i < 2; i++) {
|
||||
var targetString = utc.format(time - i * 24 * 60 * 60 * 1000);
|
||||
|
||||
for (var j = 0, len = offset.length; j < len; j++) {
|
||||
if (tz.format(time - (offset[j] + i * 24 * 60 * 60) * 1000) === targetString) {
|
||||
return new Date(time - offset[j] * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Date(NaN);
|
||||
};
|
||||
var transformTZ = function (dateString, arg1, arg2, timeZone) {
|
||||
return formatTZ(date.parse(dateString, arg1), arg2, timeZone);
|
||||
};
|
||||
var normalizeDateParts = function (parts, adjustEOM) {
|
||||
var d = new Date(Date.UTC(
|
||||
parts.year, parts.month - (parts.year < 100 ? 1900 * 12 + 1 : 1), parts.day
|
||||
));
|
||||
|
||||
if (adjustEOM && d.getUTCDate() < parts.day) {
|
||||
d.setUTCDate(0);
|
||||
}
|
||||
parts.year = d.getUTCFullYear();
|
||||
parts.month = d.getUTCMonth() + 1;
|
||||
parts.day = d.getUTCDate();
|
||||
|
||||
return parts;
|
||||
};
|
||||
var addYearsTZ = function (dateObj, years, timeZone) {
|
||||
return addMonthsTZ(dateObj, years * 12, timeZone);
|
||||
};
|
||||
var addMonthsTZ = function (dateObj, months, timeZone) {
|
||||
var parts = formatToParts(getDateTimeFormat(timeZone), dateObj);
|
||||
|
||||
parts.month += months;
|
||||
var dateObj2 = parseTZ(getTimeFromParts(normalizeDateParts(parts, true)), [], timeZone);
|
||||
|
||||
return isNaN(dateObj2.getTime()) ? date.addMonths(dateObj, months, true) : dateObj2;
|
||||
};
|
||||
var addDaysTZ = function (dateObj, days, timeZone) {
|
||||
var parts = formatToParts(getDateTimeFormat(timeZone), dateObj);
|
||||
|
||||
parts.day += days;
|
||||
var dateObj2 = parseTZ(getTimeFromParts(normalizeDateParts(parts, false)), [], timeZone);
|
||||
|
||||
return isNaN(dateObj2.getTime()) ? date.addDays(dateObj, days, true) : dateObj2;
|
||||
};
|
||||
|
||||
var name = 'timezone';
|
||||
|
||||
var getName = function (d) {
|
||||
var parts = new Intl.DateTimeFormat('en-US', {
|
||||
timeZone: typeof d.getTimezoneName === 'function' ? d.getTimezoneName() : undefined,
|
||||
timeZoneName: 'long'
|
||||
}).formatToParts(d.getTime());
|
||||
|
||||
for (var i = 0, len = parts.length; i < len; i++) {
|
||||
if (parts[i].type === 'timeZoneName') {
|
||||
return parts[i].value;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
proto.plugin(name, {
|
||||
formatter: {
|
||||
z: function (d) {
|
||||
var name = getName(d);
|
||||
return timeZoneNames[name] || '';
|
||||
},
|
||||
zz: function (d) {
|
||||
var name = getName(d);
|
||||
return /^GMT[+-].+$/.test(name) ? '' : name;
|
||||
}
|
||||
},
|
||||
extender: {
|
||||
formatTZ: formatTZ,
|
||||
parseTZ: parseTZ,
|
||||
transformTZ: transformTZ,
|
||||
addYearsTZ: addYearsTZ,
|
||||
addMonthsTZ: addMonthsTZ,
|
||||
addDaysTZ: addDaysTZ
|
||||
}
|
||||
});
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
724
node_modules/date-and-time/esm/plugin/timezone.mjs
generated
vendored
Normal file
724
node_modules/date-and-time/esm/plugin/timezone.mjs
generated
vendored
Normal file
@ -0,0 +1,724 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve timezone
|
||||
*/
|
||||
|
||||
var plugin = function (proto, date) {
|
||||
var timeZones = {
|
||||
africa: {
|
||||
abidjan: [0, -968],
|
||||
accra: [0, -968],
|
||||
addis_ababa: [10800, 9900, 9000, 8836],
|
||||
algiers: [7200, 3600, 732, 561, 0],
|
||||
asmara: [10800, 9900, 9000, 8836],
|
||||
bamako: [0, -968],
|
||||
bangui: [3600, 1800, 815, 0],
|
||||
banjul: [0, -968],
|
||||
bissau: [0, -3600, -3740],
|
||||
blantyre: [7820, 7200],
|
||||
brazzaville: [3600, 1800, 815, 0],
|
||||
bujumbura: [7820, 7200],
|
||||
cairo: [10800, 7509, 7200],
|
||||
casablanca: [3600, 0, -1820],
|
||||
ceuta: [7200, 3600, 0, -1276],
|
||||
conakry: [0, -968],
|
||||
dakar: [0, -968],
|
||||
dar_es_salaam: [10800, 9900, 9000, 8836],
|
||||
djibouti: [10800, 9900, 9000, 8836],
|
||||
douala: [3600, 1800, 815, 0],
|
||||
el_aaiun: [3600, 0, -3168, -3600],
|
||||
freetown: [0, -968],
|
||||
gaborone: [7820, 7200],
|
||||
harare: [7820, 7200],
|
||||
johannesburg: [10800, 7200, 6720, 5400],
|
||||
juba: [10800, 7588, 7200],
|
||||
kampala: [10800, 9900, 9000, 8836],
|
||||
khartoum: [10800, 7808, 7200],
|
||||
kigali: [7820, 7200],
|
||||
kinshasa: [3600, 1800, 815, 0],
|
||||
lagos: [3600, 1800, 815, 0],
|
||||
libreville: [3600, 1800, 815, 0],
|
||||
lome: [0, -968],
|
||||
luanda: [3600, 1800, 815, 0],
|
||||
lubumbashi: [7820, 7200],
|
||||
lusaka: [7820, 7200],
|
||||
malabo: [3600, 1800, 815, 0],
|
||||
maputo: [7820, 7200],
|
||||
maseru: [10800, 7200, 6720, 5400],
|
||||
mbabane: [10800, 7200, 6720, 5400],
|
||||
mogadishu: [10800, 9900, 9000, 8836],
|
||||
monrovia: [0, -2588, -2670],
|
||||
nairobi: [10800, 9900, 9000, 8836],
|
||||
ndjamena: [7200, 3612, 3600],
|
||||
niamey: [3600, 1800, 815, 0],
|
||||
nouakchott: [0, -968],
|
||||
ouagadougou: [0, -968],
|
||||
'porto-novo': [3600, 1800, 815, 0],
|
||||
sao_tome: [3600, 1616, 0, -2205],
|
||||
tripoli: [7200, 3600, 3164],
|
||||
tunis: [7200, 3600, 2444, 561],
|
||||
windhoek: [10800, 7200, 5400, 4104, 3600]
|
||||
},
|
||||
america: {
|
||||
adak: [44002, -32400, -36000, -39600, -42398],
|
||||
anchorage: [50424, -28800, -32400, -35976, -36000],
|
||||
anguilla: [-10800, -14400, -15865],
|
||||
antigua: [-10800, -14400, -15865],
|
||||
araguaina: [-7200, -10800, -11568],
|
||||
argentina: {
|
||||
buenos_aires: [-7200, -10800, -14028, -14400, -15408],
|
||||
catamarca: [-7200, -10800, -14400, -15408, -15788],
|
||||
cordoba: [-7200, -10800, -14400, -15408],
|
||||
jujuy: [-7200, -10800, -14400, -15408, -15672],
|
||||
la_rioja: [-7200, -10800, -14400, -15408, -16044],
|
||||
mendoza: [-7200, -10800, -14400, -15408, -16516],
|
||||
rio_gallegos: [-7200, -10800, -14400, -15408, -16612],
|
||||
salta: [-7200, -10800, -14400, -15408, -15700],
|
||||
san_juan: [-7200, -10800, -14400, -15408, -16444],
|
||||
san_luis: [-7200, -10800, -14400, -15408, -15924],
|
||||
tucuman: [-7200, -10800, -14400, -15408, -15652],
|
||||
ushuaia: [-7200, -10800, -14400, -15408, -16392]
|
||||
},
|
||||
aruba: [-10800, -14400, -15865],
|
||||
asuncion: [-10800, -13840, -14400],
|
||||
atikokan: [-18000, -19088, -19176],
|
||||
bahia_banderas: [-18000, -21600, -25200, -25260, -28800],
|
||||
bahia: [-7200, -9244, -10800],
|
||||
barbados: [-10800, -12600, -14309, -14400],
|
||||
belem: [-7200, -10800, -11636],
|
||||
belize: [-18000, -19800, -21168, -21600],
|
||||
'blanc-sablon': [-10800, -14400, -15865],
|
||||
boa_vista: [-10800, -14400, -14560],
|
||||
bogota: [-14400, -17776, -18000],
|
||||
boise: [-21600, -25200, -27889, -28800],
|
||||
cambridge_bay: [0, -18000, -21600, -25200],
|
||||
campo_grande: [-10800, -13108, -14400],
|
||||
cancun: [-14400, -18000, -20824, -21600],
|
||||
caracas: [-14400, -16060, -16064, -16200],
|
||||
cayenne: [-10800, -12560, -14400],
|
||||
cayman: [-18000, -19088, -19176],
|
||||
chicago: [-18000, -21036, -21600],
|
||||
chihuahua: [-18000, -21600, -25200, -25460],
|
||||
ciudad_juarez: [-18000, -21600, -25200, -25556],
|
||||
costa_rica: [-18000, -20173, -21600],
|
||||
creston: [-21600, -25200, -26898],
|
||||
cuiaba: [-10800, -13460, -14400],
|
||||
curacao: [-10800, -14400, -15865],
|
||||
danmarkshavn: [0, -4480, -7200, -10800],
|
||||
dawson: [-25200, -28800, -32400, -33460],
|
||||
dawson_creek: [-25200, -28800, -28856],
|
||||
denver: [-21600, -25196, -25200],
|
||||
detroit: [-14400, -18000, -19931, -21600],
|
||||
dominica: [-10800, -14400, -15865],
|
||||
edmonton: [-21600, -25200, -27232],
|
||||
eirunepe: [-14400, -16768, -18000],
|
||||
el_salvador: [-18000, -21408, -21600],
|
||||
fortaleza: [-7200, -9240, -10800],
|
||||
fort_nelson: [-25200, -28800, -29447],
|
||||
glace_bay: [-10800, -14388, -14400],
|
||||
goose_bay: [-7200, -9000, -9052, -10800, -12600, -12652, -14400, -14500],
|
||||
grand_turk: [-14400, -17072, -18000, -18430],
|
||||
grenada: [-10800, -14400, -15865],
|
||||
guadeloupe: [-10800, -14400, -15865],
|
||||
guatemala: [-18000, -21600, -21724],
|
||||
guayaquil: [-14400, -18000, -18840, -19160],
|
||||
guyana: [-10800, -13500, -13959, -14400],
|
||||
halifax: [-10800, -14400, -15264],
|
||||
havana: [-14400, -18000, -19768, -19776],
|
||||
hermosillo: [-21600, -25200, -26632, -28800],
|
||||
indiana: {
|
||||
indianapolis: [-14400, -18000, -20678, -21600],
|
||||
knox: [-18000, -20790, -21600],
|
||||
marengo: [-14400, -18000, -20723, -21600],
|
||||
petersburg: [-14400, -18000, -20947, -21600],
|
||||
tell_city: [-14400, -18000, -20823, -21600],
|
||||
vevay: [-14400, -18000, -20416, -21600],
|
||||
vincennes: [-14400, -18000, -21007, -21600],
|
||||
winamac: [-14400, -18000, -20785, -21600]
|
||||
},
|
||||
inuvik: [0, -21600, -25200, -28800],
|
||||
iqaluit: [0, -14400, -18000, -21600],
|
||||
jamaica: [-14400, -18000, -18430],
|
||||
juneau: [54139, -25200, -28800, -32261, -32400],
|
||||
kentucky: {
|
||||
louisville: [-14400, -18000, -20582, -21600],
|
||||
monticello: [-14400, -18000, -20364, -21600]
|
||||
},
|
||||
kralendijk: [-10800, -14400, -15865],
|
||||
la_paz: [-12756, -14400, -16356],
|
||||
lima: [-14400, -18000, -18492, -18516],
|
||||
los_angeles: [-25200, -28378, -28800],
|
||||
lower_princes: [-10800, -14400, -15865],
|
||||
maceio: [-7200, -8572, -10800],
|
||||
managua: [-18000, -20708, -20712, -21600],
|
||||
manaus: [-10800, -14400, -14404],
|
||||
marigot: [-10800, -14400, -15865],
|
||||
martinique: [-10800, -14400, -14660],
|
||||
matamoros: [-18000, -21600, -23400],
|
||||
mazatlan: [-21600, -25200, -25540, -28800],
|
||||
menominee: [-18000, -21027, -21600],
|
||||
merida: [-18000, -21508, -21600],
|
||||
metlakatla: [54822, -25200, -28800, -31578, -32400],
|
||||
mexico_city: [-18000, -21600, -23796, -25200],
|
||||
miquelon: [-7200, -10800, -13480, -14400],
|
||||
moncton: [-10800, -14400, -15548, -18000],
|
||||
monterrey: [-18000, -21600, -24076],
|
||||
montevideo: [-5400, -7200, -9000, -10800, -12600, -13491, -14400],
|
||||
montserrat: [-10800, -14400, -15865],
|
||||
nassau: [-14400, -18000, -19052],
|
||||
new_york: [-14400, -17762, -18000],
|
||||
nome: [46702, -28800, -32400, -36000, -39600, -39698],
|
||||
noronha: [-3600, -7200, -7780],
|
||||
north_dakota: {
|
||||
beulah: [-18000, -21600, -24427, -25200],
|
||||
center: [-18000, -21600, -24312, -25200],
|
||||
new_salem: [-18000, -21600, -24339, -25200]
|
||||
},
|
||||
nuuk: [-3600, -7200, -10800, -12416],
|
||||
ojinaga: [-18000, -21600, -25060, -25200],
|
||||
panama: [-18000, -19088, -19176],
|
||||
paramaribo: [-10800, -12600, -13236, -13240, -13252],
|
||||
phoenix: [-21600, -25200, -26898],
|
||||
'port-au-prince': [-14400, -17340, -17360, -18000],
|
||||
port_of_spain: [-10800, -14400, -15865],
|
||||
porto_velho: [-10800, -14400, -15336],
|
||||
puerto_rico: [-10800, -14400, -15865],
|
||||
punta_arenas: [-10800, -14400, -16965, -17020, -18000],
|
||||
rankin_inlet: [0, -18000, -21600],
|
||||
recife: [-7200, -8376, -10800],
|
||||
regina: [-21600, -25116, -25200],
|
||||
resolute: [0, -18000, -21600],
|
||||
rio_branco: [-14400, -16272, -18000],
|
||||
santarem: [-10800, -13128, -14400],
|
||||
santiago: [-10800, -14400, -16965, -18000],
|
||||
santo_domingo: [-14400, -16200, -16776, -16800, -18000],
|
||||
sao_paulo: [-7200, -10800, -11188],
|
||||
scoresbysund: [0, -3600, -5272, -7200],
|
||||
sitka: [53927, -25200, -28800, -32400, -32473],
|
||||
st_barthelemy: [-10800, -14400, -15865],
|
||||
st_johns: [-5400, -9000, -9052, -12600, -12652],
|
||||
st_kitts: [-10800, -14400, -15865],
|
||||
st_lucia: [-10800, -14400, -15865],
|
||||
st_thomas: [-10800, -14400, -15865],
|
||||
st_vincent: [-10800, -14400, -15865],
|
||||
swift_current: [-21600, -25200, -25880],
|
||||
tegucigalpa: [-18000, -20932, -21600],
|
||||
thule: [-10800, -14400, -16508],
|
||||
tijuana: [-25200, -28084, -28800],
|
||||
toronto: [-14400, -18000, -19052],
|
||||
tortola: [-10800, -14400, -15865],
|
||||
vancouver: [-25200, -28800, -29548],
|
||||
whitehorse: [-25200, -28800, -32400, -32412],
|
||||
winnipeg: [-18000, -21600, -23316],
|
||||
yakutat: [52865, -28800, -32400, -33535]
|
||||
},
|
||||
antarctica: {
|
||||
casey: [39600, 28800, 0],
|
||||
davis: [25200, 18000, 0],
|
||||
dumontdurville: [36000, 35320, 35312],
|
||||
macquarie: [39600, 36000, 0],
|
||||
mawson: [21600, 18000, 0],
|
||||
mcmurdo: [46800, 45000, 43200, 41944, 41400],
|
||||
palmer: [0, -7200, -10800, -14400],
|
||||
rothera: [0, -10800],
|
||||
syowa: [11212, 10800],
|
||||
troll: [7200, 0],
|
||||
vostok: [25200, 18000, 0]
|
||||
},
|
||||
arctic: { longyearbyen: [10800, 7200, 3600, 3208] },
|
||||
asia: {
|
||||
aden: [11212, 10800],
|
||||
almaty: [25200, 21600, 18468, 18000],
|
||||
amman: [10800, 8624, 7200],
|
||||
anadyr: [50400, 46800, 43200, 42596, 39600],
|
||||
aqtau: [21600, 18000, 14400, 12064],
|
||||
aqtobe: [21600, 18000, 14400, 13720],
|
||||
ashgabat: [21600, 18000, 14400, 14012],
|
||||
atyrau: [21600, 18000, 14400, 12464, 10800],
|
||||
baghdad: [14400, 10800, 10660, 10656],
|
||||
bahrain: [14400, 12368, 10800],
|
||||
baku: [18000, 14400, 11964, 10800],
|
||||
bangkok: [25200, 24124],
|
||||
barnaul: [28800, 25200, 21600, 20100],
|
||||
beirut: [10800, 8520, 7200],
|
||||
bishkek: [25200, 21600, 18000, 17904],
|
||||
brunei: [32400, 30000, 28800, 27000, 26480],
|
||||
chita: [36000, 32400, 28800, 27232],
|
||||
choibalsan: [36000, 32400, 28800, 27480, 25200],
|
||||
colombo: [23400, 21600, 19800, 19172, 19164],
|
||||
damascus: [10800, 8712, 7200],
|
||||
dhaka: [25200, 23400, 21700, 21600, 21200, 19800],
|
||||
dili: [32400, 30140, 28800],
|
||||
dubai: [14400, 13272],
|
||||
dushanbe: [25200, 21600, 18000, 16512],
|
||||
famagusta: [10800, 8148, 7200],
|
||||
gaza: [10800, 8272, 7200],
|
||||
hebron: [10800, 8423, 7200],
|
||||
ho_chi_minh: [32400, 28800, 25590, 25200],
|
||||
hong_kong: [32400, 30600, 28800, 27402],
|
||||
hovd: [28800, 25200, 21996, 21600],
|
||||
irkutsk: [32400, 28800, 25200, 25025],
|
||||
jakarta: [32400, 28800, 27000, 26400, 25632, 25200],
|
||||
jayapura: [34200, 33768, 32400],
|
||||
jerusalem: [14400, 10800, 8454, 8440, 7200],
|
||||
kabul: [16608, 16200, 14400],
|
||||
kamchatka: [46800, 43200, 39600, 38076],
|
||||
karachi: [23400, 21600, 19800, 18000, 16092],
|
||||
kathmandu: [20700, 20476, 19800],
|
||||
khandyga: [39600, 36000, 32533, 32400, 28800],
|
||||
kolkata: [23400, 21208, 21200, 19800, 19270],
|
||||
krasnoyarsk: [28800, 25200, 22286, 21600],
|
||||
kuala_lumpur: [32400, 28800, 27000, 26400, 25200, 24925],
|
||||
kuching: [32400, 30000, 28800, 27000, 26480],
|
||||
kuwait: [11212, 10800],
|
||||
macau: [36000, 32400, 28800, 27250],
|
||||
magadan: [43200, 39600, 36192, 36000],
|
||||
makassar: [32400, 28800, 28656],
|
||||
manila: [32400, 29040, 28800, -57360],
|
||||
muscat: [14400, 13272],
|
||||
nicosia: [10800, 8008, 7200],
|
||||
novokuznetsk: [28800, 25200, 21600, 20928],
|
||||
novosibirsk: [28800, 25200, 21600, 19900],
|
||||
omsk: [25200, 21600, 18000, 17610],
|
||||
oral: [21600, 18000, 14400, 12324, 10800],
|
||||
phnom_penh: [25200, 24124],
|
||||
pontianak: [32400, 28800, 27000, 26240, 25200],
|
||||
pyongyang: [32400, 30600, 30180],
|
||||
qatar: [14400, 12368, 10800],
|
||||
qostanay: [21600, 18000, 15268, 14400],
|
||||
qyzylorda: [21600, 18000, 15712, 14400],
|
||||
riyadh: [11212, 10800],
|
||||
sakhalin: [43200, 39600, 36000, 34248, 32400],
|
||||
samarkand: [21600, 18000, 16073, 14400],
|
||||
seoul: [36000, 34200, 32400, 30600, 30472],
|
||||
shanghai: [32400, 29143, 28800],
|
||||
singapore: [32400, 28800, 27000, 26400, 25200, 24925],
|
||||
srednekolymsk: [43200, 39600, 36892, 36000],
|
||||
taipei: [32400, 29160, 28800],
|
||||
tashkent: [25200, 21600, 18000, 16631],
|
||||
tbilisi: [18000, 14400, 10800, 10751],
|
||||
tehran: [18000, 16200, 14400, 12600, 12344],
|
||||
thimphu: [21600, 21516, 19800],
|
||||
tokyo: [36000, 33539, 32400],
|
||||
tomsk: [28800, 25200, 21600, 20391],
|
||||
ulaanbaatar: [32400, 28800, 25652, 25200],
|
||||
urumqi: [21600, 21020],
|
||||
'ust-nera': [43200, 39600, 36000, 34374, 32400, 28800],
|
||||
vientiane: [25200, 24124],
|
||||
vladivostok: [39600, 36000, 32400, 31651],
|
||||
yakutsk: [36000, 32400, 31138, 28800],
|
||||
yangon: [32400, 23400, 23087],
|
||||
yekaterinburg: [21600, 18000, 14553, 14400, 13505],
|
||||
yerevan: [18000, 14400, 10800, 10680]
|
||||
},
|
||||
atlantic: {
|
||||
azores: [0, -3600, -6160, -6872, -7200],
|
||||
bermuda: [-10800, -11958, -14400, -15558],
|
||||
canary: [3600, 0, -3600, -3696],
|
||||
cape_verde: [-3600, -5644, -7200],
|
||||
faroe: [3600, 0, -1624],
|
||||
madeira: [3600, 0, -3600, -4056],
|
||||
reykjavik: [0, -968],
|
||||
south_georgia: [-7200, -8768],
|
||||
stanley: [-7200, -10800, -13884, -14400],
|
||||
st_helena: [0, -968]
|
||||
},
|
||||
australia: {
|
||||
adelaide: [37800, 34200, 33260, 32400],
|
||||
brisbane: [39600, 36728, 36000],
|
||||
broken_hill: [37800, 36000, 34200, 33948, 32400],
|
||||
darwin: [37800, 34200, 32400, 31400],
|
||||
eucla: [35100, 31500, 30928],
|
||||
hobart: [39600, 36000, 35356],
|
||||
lindeman: [39600, 36000, 35756],
|
||||
lord_howe: [41400, 39600, 38180, 37800, 36000],
|
||||
melbourne: [39600, 36000, 34792],
|
||||
perth: [32400, 28800, 27804],
|
||||
sydney: [39600, 36292, 36000]
|
||||
},
|
||||
europe: {
|
||||
amsterdam: [7200, 3600, 1050, 0],
|
||||
andorra: [7200, 3600, 364, 0],
|
||||
astrakhan: [18000, 14400, 11532, 10800],
|
||||
athens: [10800, 7200, 5692, 3600],
|
||||
belgrade: [7200, 4920, 3600],
|
||||
berlin: [10800, 7200, 3600, 3208],
|
||||
bratislava: [7200, 3600, 3464, 0],
|
||||
brussels: [7200, 3600, 1050, 0],
|
||||
bucharest: [10800, 7200, 6264],
|
||||
budapest: [7200, 4580, 3600],
|
||||
busingen: [7200, 3600, 2048, 1786],
|
||||
chisinau: [14400, 10800, 7200, 6920, 6900, 6264, 3600],
|
||||
copenhagen: [10800, 7200, 3600, 3208],
|
||||
dublin: [3600, 2079, 0, -1521],
|
||||
gibraltar: [7200, 3600, 0, -1284],
|
||||
guernsey: [7200, 3600, 0, -75],
|
||||
helsinki: [10800, 7200, 5989],
|
||||
isle_of_man: [7200, 3600, 0, -75],
|
||||
istanbul: [14400, 10800, 7200, 7016, 6952],
|
||||
jersey: [7200, 3600, 0, -75],
|
||||
kaliningrad: [14400, 10800, 7200, 4920, 3600],
|
||||
kirov: [18000, 14400, 11928, 10800],
|
||||
kyiv: [14400, 10800, 7324, 7200, 3600],
|
||||
lisbon: [7200, 3600, 0, -2205],
|
||||
ljubljana: [7200, 4920, 3600],
|
||||
london: [7200, 3600, 0, -75],
|
||||
luxembourg: [7200, 3600, 1050, 0],
|
||||
madrid: [7200, 3600, 0, -884],
|
||||
malta: [7200, 3600, 3484],
|
||||
mariehamn: [10800, 7200, 5989],
|
||||
minsk: [14400, 10800, 7200, 6616, 6600, 3600],
|
||||
monaco: [7200, 3600, 561, 0],
|
||||
moscow: [18000, 16279, 14400, 12679, 10800, 9079, 9017, 7200],
|
||||
oslo: [10800, 7200, 3600, 3208],
|
||||
paris: [7200, 3600, 561, 0],
|
||||
podgorica: [7200, 4920, 3600],
|
||||
prague: [7200, 3600, 3464, 0],
|
||||
riga: [14400, 10800, 9394, 7200, 5794, 3600],
|
||||
rome: [7200, 3600, 2996],
|
||||
samara: [18000, 14400, 12020, 10800],
|
||||
san_marino: [7200, 3600, 2996],
|
||||
sarajevo: [7200, 4920, 3600],
|
||||
saratov: [18000, 14400, 11058, 10800],
|
||||
simferopol: [14400, 10800, 8184, 8160, 7200, 3600],
|
||||
skopje: [7200, 4920, 3600],
|
||||
sofia: [10800, 7200, 7016, 5596, 3600],
|
||||
stockholm: [10800, 7200, 3600, 3208],
|
||||
tallinn: [14400, 10800, 7200, 5940, 3600],
|
||||
tirane: [7200, 4760, 3600],
|
||||
ulyanovsk: [18000, 14400, 11616, 10800, 7200],
|
||||
vaduz: [7200, 3600, 2048, 1786],
|
||||
vatican: [7200, 3600, 2996],
|
||||
vienna: [7200, 3921, 3600],
|
||||
vilnius: [14400, 10800, 7200, 6076, 5736, 5040, 3600],
|
||||
volgograd: [18000, 14400, 10800, 10660],
|
||||
warsaw: [10800, 7200, 5040, 3600],
|
||||
zagreb: [7200, 4920, 3600],
|
||||
zurich: [7200, 3600, 2048, 1786]
|
||||
},
|
||||
indian: {
|
||||
antananarivo: [10800, 9900, 9000, 8836],
|
||||
chagos: [21600, 18000, 17380],
|
||||
christmas: [25200, 24124],
|
||||
cocos: [32400, 23400, 23087],
|
||||
comoro: [10800, 9900, 9000, 8836],
|
||||
kerguelen: [18000, 17640],
|
||||
mahe: [14400, 13272],
|
||||
maldives: [18000, 17640],
|
||||
mauritius: [18000, 14400, 13800],
|
||||
mayotte: [10800, 9900, 9000, 8836],
|
||||
reunion: [14400, 13272]
|
||||
},
|
||||
pacific: {
|
||||
apia: [50400, 46800, 45184, -36000, -39600, -41216, -41400],
|
||||
auckland: [46800, 45000, 43200, 41944, 41400],
|
||||
bougainville: [39600, 37336, 36000, 35312, 32400],
|
||||
chatham: [49500, 45900, 44100, 44028],
|
||||
chuuk: [36000, 35320, 35312],
|
||||
easter: [-18000, -21600, -25200, -26248],
|
||||
efate: [43200, 40396, 39600],
|
||||
fakaofo: [46800, -39600, -41096],
|
||||
fiji: [46800, 43200, 42944],
|
||||
funafuti: [43200, 41524],
|
||||
galapagos: [-18000, -21504, -21600],
|
||||
gambier: [-32388, -32400],
|
||||
guadalcanal: [39600, 38388],
|
||||
guam: [39600, 36000, 34740, 32400, -51660],
|
||||
honolulu: [-34200, -36000, -37800, -37886],
|
||||
kanton: [46800, 0, -39600, -43200],
|
||||
kiritimati: [50400, -36000, -37760, -38400],
|
||||
kosrae: [43200, 39600, 39116, 36000, 32400, -47284],
|
||||
kwajalein: [43200, 40160, 39600, 36000, 32400, -43200],
|
||||
majuro: [43200, 41524],
|
||||
marquesas: [-33480, -34200],
|
||||
midway: [45432, -39600, -40968],
|
||||
nauru: [43200, 41400, 40060, 32400],
|
||||
niue: [-39600, -40780, -40800],
|
||||
norfolk: [45000, 43200, 41400, 40320, 40312, 39600],
|
||||
noumea: [43200, 39948, 39600],
|
||||
pago_pago: [45432, -39600, -40968],
|
||||
palau: [32400, 32276, -54124],
|
||||
pitcairn: [-28800, -30600, -31220],
|
||||
pohnpei: [39600, 38388],
|
||||
port_moresby: [36000, 35320, 35312],
|
||||
rarotonga: [48056, -34200, -36000, -37800, -38344],
|
||||
saipan: [39600, 36000, 34740, 32400, -51660],
|
||||
tahiti: [-35896, -36000],
|
||||
tarawa: [43200, 41524],
|
||||
tongatapu: [50400, 46800, 44400, 44352],
|
||||
wake: [43200, 41524],
|
||||
wallis: [43200, 41524]
|
||||
}
|
||||
};
|
||||
var timeZoneNames = {
|
||||
'Acre Standard Time': 'ACT', 'Acre Summer Time': 'ACST', 'Afghanistan Time': 'AFT',
|
||||
'Alaska Daylight Time': 'AKDT', 'Alaska Standard Time': 'AKST', 'Almaty Standard Time': 'ALMT',
|
||||
'Almaty Summer Time': 'ALMST', 'Amazon Standard Time': 'AMT', 'Amazon Summer Time': 'AMST',
|
||||
'Anadyr Standard Time': 'ANAT', 'Anadyr Summer Time': 'ANAST', 'Apia Daylight Time': 'WSDT',
|
||||
'Apia Standard Time': 'WSST', 'Aqtau Standard Time': 'AQTT', 'Aqtau Summer Time': 'AQTST',
|
||||
'Aqtobe Standard Time': 'AQTT', 'Aqtobe Summer Time': 'AQST', 'Arabian Daylight Time': 'ADT',
|
||||
'Arabian Standard Time': 'AST', 'Argentina Standard Time': 'ART', 'Argentina Summer Time': 'ARST',
|
||||
'Armenia Standard Time': 'AMT', 'Armenia Summer Time': 'AMST', 'Atlantic Daylight Time': 'ADT',
|
||||
'Atlantic Standard Time': 'AST', 'Australian Central Daylight Time': 'ACDT', 'Australian Central Standard Time': 'ACST',
|
||||
'Australian Central Western Daylight Time': 'ACWDT', 'Australian Central Western Standard Time': 'ACWST', 'Australian Eastern Daylight Time': 'AEDT',
|
||||
'Australian Eastern Standard Time': 'AEST', 'Australian Western Daylight Time': 'AWDT', 'Australian Western Standard Time': 'AWST',
|
||||
'Azerbaijan Standard Time': 'AZT', 'Azerbaijan Summer Time': 'AZST', 'Azores Standard Time': 'AZOT',
|
||||
'Azores Summer Time': 'AZOST', 'Bangladesh Standard Time': 'BST', 'Bangladesh Summer Time': 'BDST',
|
||||
'Bhutan Time': 'BTT', 'Bolivia Time': 'BOT', 'Brasilia Standard Time': 'BRT',
|
||||
'Brasilia Summer Time': 'BRST', 'British Summer Time': 'BST', 'Brunei Darussalam Time': 'BNT',
|
||||
'Cape Verde Standard Time': 'CVT', 'Casey Time': 'CAST', 'Central Africa Time': 'CAT',
|
||||
'Central Daylight Time': 'CDT', 'Central European Standard Time': 'CET', 'Central European Summer Time': 'CEST',
|
||||
'Central Indonesia Time': 'WITA', 'Central Standard Time': 'CST', 'Chamorro Standard Time': 'ChST',
|
||||
'Chatham Daylight Time': 'CHADT', 'Chatham Standard Time': 'CHAST', 'Chile Standard Time': 'CLT',
|
||||
'Chile Summer Time': 'CLST', 'China Daylight Time': 'CDT', 'China Standard Time': 'CST',
|
||||
'Christmas Island Time': 'CXT', 'Chuuk Time': 'CHUT', 'Cocos Islands Time': 'CCT',
|
||||
'Colombia Standard Time': 'COT', 'Colombia Summer Time': 'COST', 'Cook Islands Half Summer Time': 'CKHST',
|
||||
'Cook Islands Standard Time': 'CKT', 'Coordinated Universal Time': 'UTC', 'Cuba Daylight Time': 'CDT',
|
||||
'Cuba Standard Time': 'CST', 'Davis Time': 'DAVT', 'Dumont-d’Urville Time': 'DDUT',
|
||||
'East Africa Time': 'EAT', 'East Greenland Standard Time': 'EGT', 'East Greenland Summer Time': 'EGST',
|
||||
'East Kazakhstan Time': 'ALMT', 'East Timor Time': 'TLT', 'Easter Island Standard Time': 'EAST',
|
||||
'Easter Island Summer Time': 'EASST', 'Eastern Daylight Time': 'EDT', 'Eastern European Standard Time': 'EET',
|
||||
'Eastern European Summer Time': 'EEST', 'Eastern Indonesia Time': 'WIT', 'Eastern Standard Time': 'EST',
|
||||
'Ecuador Time': 'ECT', 'Falkland Islands Standard Time': 'FKST', 'Falkland Islands Summer Time': 'FKDT',
|
||||
'Fernando de Noronha Standard Time': 'FNT', 'Fernando de Noronha Summer Time': 'FNST', 'Fiji Standard Time': 'FJT',
|
||||
'Fiji Summer Time': 'FJST', 'French Guiana Time': 'GFT', 'French Southern & Antarctic Time': 'TFT',
|
||||
'Further-eastern European Time': 'FET', 'Galapagos Time': 'GALT', 'Gambier Time': 'GAMT',
|
||||
'Georgia Standard Time': 'GET', 'Georgia Summer Time': 'GEST', 'Gilbert Islands Time': 'GILT',
|
||||
'Greenwich Mean Time': 'GMT', 'Guam Standard Time': 'ChST', 'Gulf Standard Time': 'GST',
|
||||
'Guyana Time': 'GYT', 'Hawaii-Aleutian Daylight Time': 'HADT', 'Hawaii-Aleutian Standard Time': 'HAST',
|
||||
'Hong Kong Standard Time': 'HKT', 'Hong Kong Summer Time': 'HKST', 'Hovd Standard Time': 'HOVT',
|
||||
'Hovd Summer Time': 'HOVST', 'India Standard Time': 'IST', 'Indian Ocean Time': 'IOT',
|
||||
'Indochina Time': 'ICT', 'Iran Daylight Time': 'IRDT', 'Iran Standard Time': 'IRST',
|
||||
'Irish Standard Time': 'IST', 'Irkutsk Standard Time': 'IRKT', 'Irkutsk Summer Time': 'IRKST',
|
||||
'Israel Daylight Time': 'IDT', 'Israel Standard Time': 'IST', 'Japan Standard Time': 'JST',
|
||||
'Korean Daylight Time': 'KDT', 'Korean Standard Time': 'KST', 'Kosrae Time': 'KOST',
|
||||
'Krasnoyarsk Standard Time': 'KRAT', 'Krasnoyarsk Summer Time': 'KRAST', 'Kyrgyzstan Time': 'KGT',
|
||||
'Lanka Time': 'LKT', 'Line Islands Time': 'LINT', 'Lord Howe Daylight Time': 'LHDT',
|
||||
'Lord Howe Standard Time': 'LHST', 'Macao Standard Time': 'CST', 'Macao Summer Time': 'CDT',
|
||||
'Magadan Standard Time': 'MAGT', 'Magadan Summer Time': 'MAGST', 'Malaysia Time': 'MYT',
|
||||
'Maldives Time': 'MVT', 'Marquesas Time': 'MART', 'Marshall Islands Time': 'MHT',
|
||||
'Mauritius Standard Time': 'MUT', 'Mauritius Summer Time': 'MUST', 'Mawson Time': 'MAWT',
|
||||
'Mexican Pacific Daylight Time': 'PDT', 'Mexican Pacific Standard Time': 'PST', 'Moscow Standard Time': 'MSK',
|
||||
'Moscow Summer Time': 'MSD', 'Mountain Daylight Time': 'MDT', 'Mountain Standard Time': 'MST',
|
||||
'Myanmar Time': 'MMT', 'Nauru Time': 'NRT', 'Nepal Time': 'NPT',
|
||||
'New Caledonia Standard Time': 'NCT', 'New Caledonia Summer Time': 'NCST', 'New Zealand Daylight Time': 'NZDT',
|
||||
'New Zealand Standard Time': 'NZST', 'Newfoundland Daylight Time': 'NDT', 'Newfoundland Standard Time': 'NST',
|
||||
'Niue Time': 'NUT', 'Norfolk Island Daylight Time': 'NFDT', 'Norfolk Island Standard Time': 'NFT',
|
||||
'North Mariana Islands Time': 'ChST', 'Novosibirsk Standard Time': 'NOVT', 'Novosibirsk Summer Time': 'NOVST',
|
||||
'Omsk Standard Time': 'OMST', 'Omsk Summer Time': 'OMSST', 'Pacific Daylight Time': 'PDT',
|
||||
'Pacific Standard Time': 'PST', 'Pakistan Standard Time': 'PKT', 'Pakistan Summer Time': 'PKST',
|
||||
'Palau Time': 'PWT', 'Papua New Guinea Time': 'PGT', 'Paraguay Standard Time': 'PYT',
|
||||
'Paraguay Summer Time': 'PYST', 'Peru Standard Time': 'PET', 'Peru Summer Time': 'PEST',
|
||||
'Petropavlovsk-Kamchatski Standard Time': 'PETT', 'Petropavlovsk-Kamchatski Summer Time': 'PETST', 'Philippine Standard Time': 'PST',
|
||||
'Philippine Summer Time': 'PHST', 'Phoenix Islands Time': 'PHOT', 'Pitcairn Time': 'PIT',
|
||||
'Ponape Time': 'PONT', 'Pyongyang Time': 'KST', 'Qyzylorda Standard Time': 'QYZT',
|
||||
'Qyzylorda Summer Time': 'QYZST', 'Rothera Time': 'ROOTT', 'Réunion Time': 'RET',
|
||||
'Sakhalin Standard Time': 'SAKT', 'Sakhalin Summer Time': 'SAKST', 'Samara Standard Time': 'SAMT',
|
||||
'Samara Summer Time': 'SAMST', 'Samoa Standard Time': 'SST', 'Seychelles Time': 'SCT',
|
||||
'Singapore Standard Time': 'SGT', 'Solomon Islands Time': 'SBT', 'South Africa Standard Time': 'SAST',
|
||||
'South Georgia Time': 'GST', 'St. Pierre & Miquelon Daylight Time': 'PMDT', 'St. Pierre & Miquelon Standard Time': 'PMST',
|
||||
'Suriname Time': 'SRT', 'Syowa Time': 'SYOT', 'Tahiti Time': 'TAHT',
|
||||
'Taipei Daylight Time': 'CDT', 'Taipei Standard Time': 'CST', 'Tajikistan Time': 'TJT',
|
||||
'Tokelau Time': 'TKT', 'Tonga Standard Time': 'TOT', 'Tonga Summer Time': 'TOST',
|
||||
'Turkmenistan Standard Time': 'TMT', 'Tuvalu Time': 'TVT', 'Ulaanbaatar Standard Time': 'ULAT',
|
||||
'Ulaanbaatar Summer Time': 'ULAST', 'Uruguay Standard Time': 'UYT', 'Uruguay Summer Time': 'UYST',
|
||||
'Uzbekistan Standard Time': 'UZT', 'Uzbekistan Summer Time': 'UZST', 'Vanuatu Standard Time': 'VUT',
|
||||
'Vanuatu Summer Time': 'VUST', 'Venezuela Time': 'VET', 'Vladivostok Standard Time': 'VLAT',
|
||||
'Vladivostok Summer Time': 'VLAST', 'Volgograd Standard Time': 'VOLT', 'Volgograd Summer Time': 'VOLST',
|
||||
'Vostok Time': 'VOST', 'Wake Island Time': 'WAKT', 'Wallis & Futuna Time': 'WFT',
|
||||
'West Africa Standard Time': 'WAT', 'West Africa Summer Time': 'WAST', 'West Greenland Standard Time': 'WGST',
|
||||
'West Greenland Summer Time': 'WGST', 'West Kazakhstan Time': 'AQTT', 'Western Argentina Standard Time': 'ART',
|
||||
'Western Argentina Summer Time': 'ARST', 'Western European Standard Time': 'WET', 'Western European Summer Time': 'WEST',
|
||||
'Western Indonesia Time': 'WIB', 'Yakutsk Standard Time': 'YAKT', 'Yakutsk Summer Time': 'YAKST',
|
||||
'Yekaterinburg Standard Time': 'YEKT', 'Yekaterinburg Summer Time': 'YEKST', 'Yukon Time': 'YT'
|
||||
};
|
||||
var options = {
|
||||
hour12: false, weekday: 'short', year: 'numeric', month: 'numeric', day: 'numeric',
|
||||
hour: 'numeric', minute: 'numeric', second: 'numeric', fractionalSecondDigits: 3,
|
||||
timeZone: 'UTC'
|
||||
};
|
||||
var cache = {
|
||||
utc: new Intl.DateTimeFormat('en-US', options)
|
||||
};
|
||||
var getDateTimeFormat = function (timeZone) {
|
||||
if (timeZone) {
|
||||
var tz = timeZone.toLowerCase();
|
||||
|
||||
if (!cache[tz]) {
|
||||
options.timeZone = timeZone;
|
||||
cache[tz] = new Intl.DateTimeFormat('en-US', options);
|
||||
}
|
||||
return cache[tz];
|
||||
}
|
||||
options.timeZone = undefined;
|
||||
return new Intl.DateTimeFormat('en-US', options);
|
||||
};
|
||||
var formatToParts = function (dateTimeFormat, dateObjOrTime) {
|
||||
var array = dateTimeFormat.formatToParts(dateObjOrTime),
|
||||
values = {};
|
||||
|
||||
for (var i = 0, len = array.length; i < len; i++) {
|
||||
var type = array[i].type,
|
||||
value = array[i].value;
|
||||
|
||||
switch (type) {
|
||||
case 'weekday':
|
||||
values[type] = 'SunMonTueWedThuFriSat'.indexOf(value) / 3;
|
||||
break;
|
||||
case 'hour':
|
||||
values[type] = value % 24;
|
||||
break;
|
||||
case 'year':
|
||||
case 'month':
|
||||
case 'day':
|
||||
case 'minute':
|
||||
case 'second':
|
||||
case 'fractionalSecond':
|
||||
values[type] = value | 0;
|
||||
}
|
||||
}
|
||||
return values;
|
||||
};
|
||||
var getTimeFromParts = function (parts) {
|
||||
return Date.UTC(
|
||||
parts.year, parts.month - (parts.year < 100 ? 1900 * 12 + 1 : 1), parts.day,
|
||||
parts.hour, parts.minute, parts.second, parts.fractionalSecond
|
||||
);
|
||||
};
|
||||
var formatTZ = function (dateObj, arg, timeZone) {
|
||||
var parts = formatToParts(getDateTimeFormat(timeZone), dateObj);
|
||||
|
||||
return date.format({
|
||||
getFullYear: function () { return parts.year; },
|
||||
getMonth: function () { return parts.month - 1; },
|
||||
getDate: function () { return parts.day; },
|
||||
getHours: function () { return parts.hour; },
|
||||
getMinutes: function () { return parts.minute; },
|
||||
getSeconds: function () { return parts.second; },
|
||||
getMilliseconds: function () { return parts.fractionalSecond; },
|
||||
getDay: function () { return parts.weekday; },
|
||||
getTime: function () { return dateObj.getTime(); },
|
||||
getTimezoneOffset: function () {
|
||||
return (dateObj.getTime() - getTimeFromParts(parts)) / 60000 | 0;
|
||||
},
|
||||
getTimezoneName: function () { return timeZone || undefined; }
|
||||
}, arg);
|
||||
};
|
||||
var parseTZ = function (arg1, arg2, timeZone) {
|
||||
var pattern = typeof arg2 === 'string' ? date.compile(arg2) : arg2;
|
||||
var time = typeof arg1 === 'string' ? date.parse(arg1, pattern, !!timeZone).getTime() : arg1;
|
||||
var hasZ = function (array) {
|
||||
for (var i = 1, len = array.length; i < len; i++) {
|
||||
if (!array[i].indexOf('Z')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
if (!timeZone || hasZ(pattern) || timeZone.toUpperCase() === 'UTC' || isNaN(time)) {
|
||||
return new Date(time);
|
||||
}
|
||||
|
||||
var getOffset = function (timeZoneName) {
|
||||
var keys = (timeZoneName || '').toLowerCase().split('/');
|
||||
var value = timeZones[keys[0]] || {};
|
||||
|
||||
for (var i = 1, len = keys.length; i < len; i++) {
|
||||
value = value[keys[i]] || {};
|
||||
}
|
||||
return Array.isArray(value) ? value : [];
|
||||
};
|
||||
|
||||
var utc = getDateTimeFormat('UTC');
|
||||
var tz = getDateTimeFormat(timeZone);
|
||||
var offset = getOffset(timeZone);
|
||||
|
||||
for (var i = 0; i < 2; i++) {
|
||||
var targetString = utc.format(time - i * 24 * 60 * 60 * 1000);
|
||||
|
||||
for (var j = 0, len = offset.length; j < len; j++) {
|
||||
if (tz.format(time - (offset[j] + i * 24 * 60 * 60) * 1000) === targetString) {
|
||||
return new Date(time - offset[j] * 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Date(NaN);
|
||||
};
|
||||
var transformTZ = function (dateString, arg1, arg2, timeZone) {
|
||||
return formatTZ(date.parse(dateString, arg1), arg2, timeZone);
|
||||
};
|
||||
var normalizeDateParts = function (parts, adjustEOM) {
|
||||
var d = new Date(Date.UTC(
|
||||
parts.year, parts.month - (parts.year < 100 ? 1900 * 12 + 1 : 1), parts.day
|
||||
));
|
||||
|
||||
if (adjustEOM && d.getUTCDate() < parts.day) {
|
||||
d.setUTCDate(0);
|
||||
}
|
||||
parts.year = d.getUTCFullYear();
|
||||
parts.month = d.getUTCMonth() + 1;
|
||||
parts.day = d.getUTCDate();
|
||||
|
||||
return parts;
|
||||
};
|
||||
var addYearsTZ = function (dateObj, years, timeZone) {
|
||||
return addMonthsTZ(dateObj, years * 12, timeZone);
|
||||
};
|
||||
var addMonthsTZ = function (dateObj, months, timeZone) {
|
||||
var parts = formatToParts(getDateTimeFormat(timeZone), dateObj);
|
||||
|
||||
parts.month += months;
|
||||
var dateObj2 = parseTZ(getTimeFromParts(normalizeDateParts(parts, true)), [], timeZone);
|
||||
|
||||
return isNaN(dateObj2.getTime()) ? date.addMonths(dateObj, months, true) : dateObj2;
|
||||
};
|
||||
var addDaysTZ = function (dateObj, days, timeZone) {
|
||||
var parts = formatToParts(getDateTimeFormat(timeZone), dateObj);
|
||||
|
||||
parts.day += days;
|
||||
var dateObj2 = parseTZ(getTimeFromParts(normalizeDateParts(parts, false)), [], timeZone);
|
||||
|
||||
return isNaN(dateObj2.getTime()) ? date.addDays(dateObj, days, true) : dateObj2;
|
||||
};
|
||||
|
||||
var name = 'timezone';
|
||||
|
||||
var getName = function (d) {
|
||||
var parts = new Intl.DateTimeFormat('en-US', {
|
||||
timeZone: typeof d.getTimezoneName === 'function' ? d.getTimezoneName() : undefined,
|
||||
timeZoneName: 'long'
|
||||
}).formatToParts(d.getTime());
|
||||
|
||||
for (var i = 0, len = parts.length; i < len; i++) {
|
||||
if (parts[i].type === 'timeZoneName') {
|
||||
return parts[i].value;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
};
|
||||
|
||||
proto.plugin(name, {
|
||||
formatter: {
|
||||
z: function (d) {
|
||||
var name = getName(d);
|
||||
return timeZoneNames[name] || '';
|
||||
},
|
||||
zz: function (d) {
|
||||
var name = getName(d);
|
||||
return /^GMT[+-].+$/.test(name) ? '' : name;
|
||||
}
|
||||
},
|
||||
extender: {
|
||||
formatTZ: formatTZ,
|
||||
parseTZ: parseTZ,
|
||||
transformTZ: transformTZ,
|
||||
addYearsTZ: addYearsTZ,
|
||||
addMonthsTZ: addMonthsTZ,
|
||||
addDaysTZ: addDaysTZ
|
||||
}
|
||||
});
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
21
node_modules/date-and-time/esm/plugin/two-digit-year.es.js
generated
vendored
Normal file
21
node_modules/date-and-time/esm/plugin/two-digit-year.es.js
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve two-digit-year
|
||||
*/
|
||||
|
||||
var plugin = function (date) {
|
||||
var name = 'two-digit-year';
|
||||
|
||||
date.plugin(name, {
|
||||
parser: {
|
||||
YY: function (str) {
|
||||
var result = this.exec(/^\d\d/, str);
|
||||
result.value += result.value < 70 ? 2000 : 1900;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
21
node_modules/date-and-time/esm/plugin/two-digit-year.mjs
generated
vendored
Normal file
21
node_modules/date-and-time/esm/plugin/two-digit-year.mjs
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @preserve date-and-time.js plugin
|
||||
* @preserve two-digit-year
|
||||
*/
|
||||
|
||||
var plugin = function (date) {
|
||||
var name = 'two-digit-year';
|
||||
|
||||
date.plugin(name, {
|
||||
parser: {
|
||||
YY: function (str) {
|
||||
var result = this.exec(/^\d\d/, str);
|
||||
result.value += result.value < 70 ? 2000 : 1900;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
return name;
|
||||
};
|
||||
|
||||
export { plugin as default };
|
||||
1
node_modules/date-and-time/locale/ar.d.ts
generated
vendored
Normal file
1
node_modules/date-and-time/locale/ar.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export default function (date: unknown): string;
|
||||
47
node_modules/date-and-time/locale/ar.js
generated
vendored
Normal file
47
node_modules/date-and-time/locale/ar.js
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.ar = factory()));
|
||||
})(this, (function () { 'use strict';
|
||||
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Arabic (ar)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var ar = function (date) {
|
||||
var code = 'ar';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['كانون الثاني يناير', 'شباط فبراير', 'آذار مارس', 'نيسان أبريل', 'أيار مايو', 'حزيران يونيو', 'تموز يوليو', 'آب أغسطس', 'أيلول سبتمبر', 'تشرين الأول أكتوبر', 'تشرين الثاني نوفمبر', 'كانون الأول ديسمبر'],
|
||||
MMM: ['كانون الثاني يناير', 'شباط فبراير', 'آذار مارس', 'نيسان أبريل', 'أيار مايو', 'حزيران يونيو', 'تموز يوليو', 'آب أغسطس', 'أيلول سبتمبر', 'تشرين الأول أكتوبر', 'تشرين الثاني نوفمبر', 'كانون الأول ديسمبر'],
|
||||
dddd: ['الأحد', 'الإثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
|
||||
ddd: ['أحد', 'إثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],
|
||||
dd: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
|
||||
A: ['ص', 'م']
|
||||
},
|
||||
formatter: {
|
||||
post: function (str) {
|
||||
var num = ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'];
|
||||
return str.replace(/\d/g, function (i) {
|
||||
return num[i | 0];
|
||||
});
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
pre: function (str) {
|
||||
var map = { '٠': 0, '١': 1, '٢': 2, '٣': 3, '٤': 4, '٥': 5, '٦': 6, '٧': 7, '٨': 8, '٩': 9 };
|
||||
return str.replace(/[٠١٢٣٤٥٦٧٨٩]/g, function (i) {
|
||||
return '' + map[i];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
return ar;
|
||||
|
||||
}));
|
||||
1
node_modules/date-and-time/locale/az.d.ts
generated
vendored
Normal file
1
node_modules/date-and-time/locale/az.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export default function (date: unknown): string;
|
||||
52
node_modules/date-and-time/locale/az.js
generated
vendored
Normal file
52
node_modules/date-and-time/locale/az.js
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (global.date = global.date || {}, global.date.locale = global.date.locale || {}, global.date.locale.az = factory()));
|
||||
})(this, (function () { 'use strict';
|
||||
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Azerbaijani (az)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
|
||||
var az = function (date) {
|
||||
var code = 'az';
|
||||
|
||||
date.locale(code, {
|
||||
res: {
|
||||
MMMM: ['yanvar', 'fevral', 'mart', 'aprel', 'may', 'iyun', 'iyul', 'avqust', 'sentyabr', 'oktyabr', 'noyabr', 'dekabr'],
|
||||
MMM: ['yan', 'fev', 'mar', 'apr', 'may', 'iyn', 'iyl', 'avq', 'sen', 'okt', 'noy', 'dek'],
|
||||
dddd: ['Bazar', 'Bazar ertəsi', 'Çərşənbə axşamı', 'Çərşənbə', 'Cümə axşamı', 'Cümə', 'Şənbə'],
|
||||
ddd: ['Baz', 'BzE', 'ÇAx', 'Çər', 'CAx', 'Cüm', 'Şən'],
|
||||
dd: ['Bz', 'BE', 'ÇA', 'Çə', 'CA', 'Cü', 'Şə'],
|
||||
A: ['gecə', 'səhər', 'gündüz', 'axşam']
|
||||
},
|
||||
formatter: {
|
||||
A: function (d) {
|
||||
var h = d.getHours();
|
||||
if (h < 4) {
|
||||
return this.res.A[0]; // gecə
|
||||
} else if (h < 12) {
|
||||
return this.res.A[1]; // səhər
|
||||
} else if (h < 17) {
|
||||
return this.res.A[2]; // gündüz
|
||||
}
|
||||
return this.res.A[3]; // axşam
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 2) {
|
||||
return h; // gecə, səhər
|
||||
}
|
||||
return h > 11 ? h : h + 12; // gündüz, axşam
|
||||
}
|
||||
}
|
||||
});
|
||||
return code;
|
||||
};
|
||||
|
||||
return az;
|
||||
|
||||
}));
|
||||
1
node_modules/date-and-time/locale/bn.d.ts
generated
vendored
Normal file
1
node_modules/date-and-time/locale/bn.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export default function (date: unknown): string;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user