mirror of
https://github.com/musix-org/musix-oss
synced 2025-08-01 14:34:35 +00:00
Modules
This commit is contained in:
89
node_modules/date-and-time/EXTEND.md
generated
vendored
Normal file
89
node_modules/date-and-time/EXTEND.md
generated
vendored
Normal file
@@ -0,0 +1,89 @@
|
||||
# Extension
|
||||
|
||||
By using `extend()`, you could add your own tokens or modify behavior of existing tokens. This is equivalent to define a new plugin without name.
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
- To the parser, it is not able to add token of new alphabet.
|
||||
|
||||
```javascript
|
||||
'EEE' // This is not able to add because `E` is not an existing token in the parser.
|
||||
'YYY' // This is OK because `Y` token is existing in the parser.
|
||||
'SSS' // This is modifying, not adding. Because exactly the same token is existing.
|
||||
```
|
||||
|
||||
## 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
|
||||
|
||||
In the parser, modify `MMM` token to ignore case:
|
||||
|
||||
```javascript
|
||||
date.parse('Dec 25 2019', 'MMM DD YYYY'); // => December 25, 2019
|
||||
date.parse('dec 25 2019', 'MMM DD YYYY'); // => December 25, 2019
|
||||
date.parse('DEC 25 2019', 'MMM DD YYYY'); // => December 25, 2019
|
||||
```
|
||||
|
||||
Source code example is here:
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
|
||||
date.extend({
|
||||
parser: {
|
||||
MMM: function (str) {
|
||||
const mmm = this.res.MMM.map(m => m.toLowerCase());
|
||||
const result = this.find(mmm, str.toLowerCase());
|
||||
result.value++;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
Modifying the parser may be a bit difficult. Refer to the library source code to grasp the default behavior.
|
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.
|
||||
|
85
node_modules/date-and-time/LOCALE.md
generated
vendored
Normal file
85
node_modules/date-and-time/LOCALE.md
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
# Locale
|
||||
|
||||
Month, day of week, and meridiem (am / pm) the `format()` outputs are usually in English, and the `parse()` also assumes that a passed date string is English.
|
||||
|
||||
## Usage
|
||||
|
||||
If you would like to use any other language in these functions, switch as follows:
|
||||
|
||||
- Node.js:
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
require('date-and-time/locale/fr');
|
||||
|
||||
date.locale('fr'); // French
|
||||
date.format(new Date(), 'dddd D MMMM'); // => 'lundi 11 janvier'
|
||||
```
|
||||
|
||||
- With a transpiler:
|
||||
|
||||
```javascript
|
||||
import date from 'date-and-time';
|
||||
import 'date-and-time/locale/it';
|
||||
|
||||
date.locale('it'); // Italian
|
||||
date.format(new Date(), 'dddd D MMMM'); // => 'Lunedì 11 gennaio'
|
||||
```
|
||||
|
||||
- With an 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
|
||||
|
||||
- You have to import (or require) in advance the all locale modules that you are going to switch to.
|
||||
- The locale will be actually switched after executing `locale('xx')`.
|
||||
- You could return the locale to English by executing `locale ('en')`.
|
||||
|
||||
## Supported List
|
||||
|
||||
For now, it supports the following languages:
|
||||
|
||||
```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)
|
||||
Korean (ko)
|
||||
Persian (fa)
|
||||
Polish (pl)
|
||||
Portuguese (pt)
|
||||
Punjabi (pa-in)
|
||||
Romanian (ro)
|
||||
Russian (ru)
|
||||
Serbian (sr)
|
||||
Spanish (es)
|
||||
Thai (th)
|
||||
Turkish (tr)
|
||||
Ukrainian (uk)
|
||||
Uzbek (uz)
|
||||
Vietnamese (vi)
|
||||
```
|
154
node_modules/date-and-time/PLUGINS.md
generated
vendored
Normal file
154
node_modules/date-and-time/PLUGINS.md
generated
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
# Plugins
|
||||
|
||||
As this library is oriented toward minimalism, it may seem like a lack of functionality. We think plugin is the most realistic solution for solving such dissatisfaction. By importing the plugins, you could extend the functionality of this library, mainly the formatter and the parser.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
- Node.js:
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import a plugin "foobar".
|
||||
require('date-and-time/plugin/foobar');
|
||||
|
||||
// Apply the plugin to "date-and-time".
|
||||
date.plugin('foobar');
|
||||
```
|
||||
|
||||
- With a transpiler:
|
||||
|
||||
```javascript
|
||||
import date from 'date-and-time';
|
||||
// Import a plugin "foobar".
|
||||
import 'date-and-time/plugin/foobar';
|
||||
|
||||
// Apply the plugin to "date-and-time".
|
||||
date.plugin('foobar');
|
||||
```
|
||||
|
||||
- The browser:
|
||||
|
||||
```html
|
||||
<script src="/path/to/date-and-time.min.js"></script>
|
||||
<!-- Import a plugin "foobar". -->
|
||||
<script src="/path/to/plugin/foobar.js"></script>
|
||||
|
||||
<script>
|
||||
// Apply the plugin to "date-and-time".
|
||||
date.plugin('foobar');
|
||||
</script>
|
||||
```
|
||||
|
||||
## Plugin List
|
||||
|
||||
- meridiem
|
||||
- It extends `A` token.
|
||||
|
||||
- ordinal
|
||||
- It adds ordinal notation of date to the formatter.
|
||||
|
||||
- two-digit-year
|
||||
- It adds two-digit year notation to the parser.
|
||||
|
||||
## Plugin Details
|
||||
|
||||
### meridiem
|
||||
|
||||
It adds `AA`, `a` and `aa` token to the formatter. These meanings are as follows:
|
||||
|
||||
| token | meaning | examples of output | added or modified |
|
||||
|:------|:-----------------------------------|:-------------------|:------------------|
|
||||
| A | meridiem (uppercase) | AM, PM | |
|
||||
| AA | meridiem (uppercase with ellipsis) | A.M., P.M. | ✔ |
|
||||
| a | meridiem (lowercase) | am, pm | ✔ |
|
||||
| aa | meridiem (lowercase with ellipsis) | a.m., p.m. | ✔ |
|
||||
|
||||
It also extends `A` token of the parser as follows:
|
||||
|
||||
| token | meaning | examples of acceptable form | added or modified |
|
||||
|:------|:---------------------------------|:---------------------------------------|:------------------|
|
||||
| A | all the above notations | AM, PM, A.M., P.M., am, pm, a.m., p.m. | ✔ |
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import "meridiem" plugin.
|
||||
require('date-and-time/plugin/meridiem');
|
||||
|
||||
// Apply "medidiem" plugin to `date-and-time`.
|
||||
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.'
|
||||
|
||||
// The parser will be acceptable all the above notations with only `A` token.
|
||||
date.parse('12:34 PM', 'hh:mm A'); // => Jan 1 1970 12:34:00
|
||||
date.parse('12:34 P.M.', 'hh:mm A'); // => 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 A'); // => Jan 1 1970 12:34:00
|
||||
```
|
||||
|
||||
### ordinal
|
||||
|
||||
It adds `DDD` token to the formatter. This meaning is as follows:
|
||||
|
||||
| token | meaning | examples of output | added or modified |
|
||||
|:------|:-------------------------|:--------------------|:------------------|
|
||||
| D | date | 1, 2, 3, 31 | |
|
||||
| DD | date with zero-padding | 01, 02, 03, 31 | |
|
||||
| DDD | ordinal notation of date | 1st, 2nd, 3rd, 31th | ✔ |
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import "ordinal" plugin.
|
||||
require('date-and-time/plugin/ordinal');
|
||||
|
||||
// Apply "ordinal" plugin to `date-and-time`.
|
||||
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
|
||||
```
|
||||
|
||||
### two-digit-year
|
||||
|
||||
It adds `YY` token to the parser and also changes behavior of `Y` token. These meanings are as follows:
|
||||
|
||||
| token | meaning | examples of acceptable form | added or modified |
|
||||
|:------|:------------------------------------|:----------------------------|:------------------|
|
||||
| YYYY | four-digit year | 2019, 0123, 0001 | |
|
||||
| YY | two-digit year | 90, 00, 08, 19 | ✔ |
|
||||
| Y | two-digit year without zero-padding | 90, 0, 8, 19 | ✔ |
|
||||
|
||||
`YY` and `Y` token will convert the year 69 or earlier to 2000s, the year 70 or later to 1900s. By this change, `Y` token will no longer acceptable the year 100 or later, so use `YYYY` token instead if necessary.
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
// Import "two-digit-year" plugin.
|
||||
require('date-and-time/plugin/two-digit-year');
|
||||
|
||||
// These are default behavior of the parser.
|
||||
date.parse('Dec 25 69', 'MMM D YY'); // => Invalid Date
|
||||
date.parse('Dec 25 70', 'MMM D Y'); // => 70 AD (ancient times)
|
||||
|
||||
// Apply "two-digit-year" plugin to `date-and-time`.
|
||||
date.plugin('two-digit-year');
|
||||
|
||||
// These 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 Y'); // => Dec 25 1970
|
||||
|
||||
// `Y` token will no longer acceptable the year 100 or later.
|
||||
date.parse('Dec 25 2019', 'MMM D Y'); // => Invalid Date
|
||||
// Use `YYYY` token instead if necessary.
|
||||
date.parse('Dec 25 2019', 'MMM D YYYY'); // => Dec 25 2019
|
||||
```
|
590
node_modules/date-and-time/README.md
generated
vendored
Normal file
590
node_modules/date-and-time/README.md
generated
vendored
Normal file
@@ -0,0 +1,590 @@
|
||||
# date-and-time
|
||||
|
||||
[](https://circleci.com/gh/knowledgecode/date-and-time)
|
||||
|
||||
This library is a minimalist collection of functions for manipulating JS date and time. It's tiny, simple, easy to learn.
|
||||
|
||||
## Why
|
||||
|
||||
JS modules nowadays are getting more huge and complex, and there are also many dependencies. Trying to keep each module simple and small is meaningful.
|
||||
|
||||
## Features
|
||||
|
||||
- Minimalist. Less than 2k. (minified and gzipped)
|
||||
- Extensible. Plugin system support.
|
||||
- Multi language support.
|
||||
- Universal / Isomorphic. Wherever JS runtime works.
|
||||
- Older browser support. Even works on IE6. :)
|
||||
|
||||
## Install
|
||||
|
||||
- via npm:
|
||||
|
||||
```shell
|
||||
npm install date-and-time --save
|
||||
```
|
||||
|
||||
- local:
|
||||
|
||||
```html
|
||||
<script src="/path/to/date-and-time.min.js"></script>
|
||||
```
|
||||
|
||||
## Recent Changes
|
||||
|
||||
- 0.12.0
|
||||
- The parser now supports `Z` token to parse timezone offset.
|
||||
- (**Breaking Change**) **Excleded `YY` token from the parser**, added it as `two-digit-year` plugin.
|
||||
- (**Breaking Change**) Decided to **change the default behavior of `A` token** to fix the non-intuitive definition. Sepcifically, in the `format()` it now outputs `AM` / `PM` instead of `a.m.` / `p.m.`, and in the `parse()` it recognizes `AM` / `PM` only. Other `A` tokens are supported as `meridiem` plugin.
|
||||
|
||||
| token | new meaning | example | default |
|
||||
|:------|:-----------------------------------|:-----------|:--------|
|
||||
| A | meridiem (uppercase) | AM, PM | ✔️ |
|
||||
| AA | meridiem (uppercase with ellipsis) | A.M., P.M. | |
|
||||
| a | meridiem (lowercase) | am, pm | |
|
||||
| aa | meridiem (lowercase with ellipsis) | a.m., p.m. | |
|
||||
|
||||
- 0.11.0
|
||||
- Added compile() function that precompiling a date-time string for the parser. If you need to process many date-time string with one format, you could get results faster than before by precompiling the format string with this function.
|
||||
|
||||
```javascript
|
||||
// We have passed a string format at the 2nd parameter each time when calling the parse() function.
|
||||
date.parse('Mar 22 2019 2:54:21 PM', 'MMM D YYYY h:m:s A');
|
||||
date.parse('Jul 27 2019 4:15:24 AM', 'MMM D YYYY h:m:s A');
|
||||
date.parse('Dec 25 2019 3:51:11 AM', 'MMM D YYYY h:m:s A');
|
||||
|
||||
// You can precompile the string format.
|
||||
const pattern = date.compile('MMM D YYYY h:m:s A');
|
||||
|
||||
// The parse() will be able to finish faster than passing the format string each time.
|
||||
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);
|
||||
```
|
||||
|
||||
```javascript
|
||||
const pattern = date.compile('MMM D YYYY h:m:s A');
|
||||
|
||||
// The isValid() will also too.
|
||||
date.isValid('Mar 22 2019 2:54:21 PM', pattern);
|
||||
```
|
||||
|
||||
- 0.10.0
|
||||
- (**Breaking Change**) `YYYY` token now requires 4 digits in the `parse()`, `preparse()` and `isValid()`.
|
||||
|
||||
```javascript
|
||||
date.parse('31-12-0123', 'DD-MM-YYYY'); // Good
|
||||
date.parse('31-12-123', 'DD-MM-YYYY'); // Not good
|
||||
```
|
||||
|
||||
- (**Breaking Change**) `YY` token now requires 2 digits in the same functions.
|
||||
|
||||
```javascript
|
||||
date.parse('31-12-03', 'DD-MM-YY'); // Good, but it assumes the year is 2003.
|
||||
date.parse('31-12-3', 'DD-MM-YY'); // Not good
|
||||
```
|
||||
|
||||
- Added `Y` token to support year without zero-padding in the same functions.
|
||||
|
||||
```javascript
|
||||
date.parse('31-12-123', 'DD-MM-Y'); // Good, 123 AD.
|
||||
date.parse('31-12-3', 'DD-MM-Y'); // Good, 3 AD.
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
- Node.js:
|
||||
|
||||
```javascript
|
||||
const date = require('date-and-time');
|
||||
```
|
||||
|
||||
- With a transpiler:
|
||||
|
||||
```javascript
|
||||
import date from 'date-and-time';
|
||||
```
|
||||
|
||||
- The browser:
|
||||
|
||||
```javascript
|
||||
window.date; // global object
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### format(dateObj, formatString[, utc])
|
||||
|
||||
- Formatting a date.
|
||||
- @param {**Date**} dateObj - a Date object
|
||||
- @param {**string**} formatString - a format string
|
||||
- @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'
|
||||
```
|
||||
|
||||
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 | timezone offset | +0100, -0800 |
|
||||
|
||||
You could 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. |
|
||||
|
||||
#### NOTE 1. Comments
|
||||
|
||||
String in parenthese `[...]` in the `formatString` will be ignored as comments:
|
||||
|
||||
```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 usually outputs a local date-time string. Set to true the `utc` option (the 3rd parameter) if you would like to get a UTC date-time string.
|
||||
|
||||
```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 could also define your own tokens. See [EXTEND.md](./EXTEND.md) for details.
|
||||
|
||||
---
|
||||
|
||||
### parse(dateString, arg[, utc])
|
||||
|
||||
- Parsing a date string.
|
||||
- @param {**string**} dateString - a date string
|
||||
- @param {**string|Array.\<string\>**} arg - a format string or a compiled object
|
||||
- @param {**boolean**} [utc] - input as UTC
|
||||
- @returns {**Date**} a constructed date
|
||||
|
||||
```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 | timezone offset | +0100, -0800 |
|
||||
|
||||
You could 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 |
|
||||
| Y | two-digit year without zero-padding | 90, 0, 8, 19 |
|
||||
| A | meridiem | AM, PM, A.M., P.M., am, pm, a.m., p.m. |
|
||||
|
||||
#### NOTE 1. Invalid Date
|
||||
|
||||
If the function fails to parse, it will return `Invalid Date`. Notice that the `Invalid Date` is a Date object, not `NaN` or `null`. You could tell whether the Date object is invalid as follows:
|
||||
|
||||
```javascript
|
||||
const today = date.parse('Jam 1 2017', 'MMM D YYYY');
|
||||
|
||||
if (isNaN(today)) {
|
||||
// Failure
|
||||
}
|
||||
```
|
||||
|
||||
#### NOTE 2. Input as UTC
|
||||
|
||||
This function usually assumes the `dateString` is a local date-time. Set to true the `utc` option (the 3rd parameter) if it is a UTC date-time.
|
||||
|
||||
```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. Comments
|
||||
|
||||
String in parenthese `[...]` in the `formatString` will be ignored as comments:
|
||||
|
||||
```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
|
||||
|
||||
A white space works as a wildcard token. This token is not interpret into anything. This means it can be ignored a specific variable string. For example, when you would like to ignore a time part from a date string, you can write as follows:
|
||||
|
||||
```javascript
|
||||
// This will be an error.
|
||||
date.parse('2015/01/02 11:14:05', 'YYYY/MM/DD'); // => Invalid Date
|
||||
// Append the same length white spaces behind the formatString.
|
||||
date.parse('2015/01/02 11:14:05', 'YYYY/MM/DD '); // => Jan 2 2015 00:00:00 GMT-0800
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### compile(formatString)
|
||||
|
||||
- Compiling a format string for the parser.
|
||||
- @param {**string**} formatString - a format string
|
||||
- @returns {**Array.\<string\>**} a compiled object
|
||||
|
||||
```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);
|
||||
```
|
||||
|
||||
If you are going to call the `parse()` or the `isValid()` many times with one string format, recommended to precompile and reuse it for performance.
|
||||
|
||||
---
|
||||
|
||||
### preparse(dateString, arg)
|
||||
|
||||
- Pre-parsing a date string.
|
||||
- @param {**string**} dateString - a date string
|
||||
- @param {**string|Array.\<string\>**} arg - a format string or a compiled object
|
||||
- @returns {**Object**} a date structure
|
||||
|
||||
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 would be able to tell from it how the date string was parsed(, or why the parsing was failed).
|
||||
|
||||
---
|
||||
|
||||
### isValid(arg1[, arg2])
|
||||
|
||||
- Validation.
|
||||
- @param {**Object|string**} arg1 - a date structure or a date string
|
||||
- @param {**string|Array.\<string\>**} [arg2] - a format string or a compiled object
|
||||
- @returns {**boolean**} whether the date string is a valid date
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### addYears(dateObj, years)
|
||||
|
||||
- Adding years.
|
||||
- @param {**Date**} dateObj - a Date object
|
||||
- @param {**number**} years - number of years to add
|
||||
- @returns {**Date**} a date after adding the value
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const next_year = date.addYears(now, 1);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### addMonths(dateObj, months)
|
||||
|
||||
- Adding months.
|
||||
- @param {**Date**} dateObj - a Date object
|
||||
- @param {**number**} months - number of months to add
|
||||
- @returns {**Date**} a date after adding the value
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const next_month = date.addMonths(now, 1);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### addDays(dateObj, days)
|
||||
|
||||
- Adding days.
|
||||
- @param {**Date**} dateObj - a Date object
|
||||
- @param {**number**} days - number of days to add
|
||||
- @returns {**Date**} a date after adding the value
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const yesterday = date.addDays(now, -1);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### addHours(dateObj, hours)
|
||||
|
||||
- Adding hours.
|
||||
- @param {**Date**} dateObj - a Date object
|
||||
- @param {**number**} hours - number of hours to add
|
||||
- @returns {**Date**} a date after adding the value
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const an_hour_ago = date.addHours(now, -1);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### addMinutes(dateObj, minutes)
|
||||
|
||||
- Adding minutes.
|
||||
- @param {**Date**} dateObj - a Date object
|
||||
- @param {**number**} minutes - number of minutes to add
|
||||
- @returns {**Date**} a date after adding the value
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const two_minutes_later = date.addMinutes(now, 2);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### addSeconds(dateObj, seconds)
|
||||
|
||||
- Adding seconds.
|
||||
- @param {**Date**} dateObj - a Date object
|
||||
- @param {**number**} seconds - number of seconds to add
|
||||
- @returns {**Date**} a date after adding the value
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const three_seconds_ago = date.addSeconds(now, -3);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### addMilliseconds(dateObj, milliseconds)
|
||||
|
||||
- Adding milliseconds.
|
||||
- @param {**Date**} dateObj - a Date object
|
||||
- @param {**number**} milliseconds - number of milliseconds to add
|
||||
- @returns {**Date**} a date after adding the value
|
||||
|
||||
```javascript
|
||||
const now = new Date();
|
||||
const a_millisecond_later = date.addMilliseconds(now, 1);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### subtract(date1, date2)
|
||||
|
||||
- Subtracting.
|
||||
- @param {**Date**} date1 - a Date object
|
||||
- @param {**Date**} date2 - a Date object
|
||||
- @returns {**Object**} a result object 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)
|
||||
|
||||
- Leap year.
|
||||
- @param {**number**} y - year
|
||||
- @returns {**boolean**} whether the year is a leap year
|
||||
|
||||
```javascript
|
||||
date.isLeapYear(2015); // => false
|
||||
date.isLeapYear(2012); // => true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### isSameDay(date1, date2)
|
||||
|
||||
- Comparison of two dates.
|
||||
- @param {**Date**} date1 - a Date object
|
||||
- @param {**Date**} date2 - a Date object
|
||||
- @returns {**boolean**} whether the dates are the same day (times are 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([code[, locale]])
|
||||
|
||||
- Change locale or setting a new locale definition.
|
||||
- @param {**string**} [code] - language code
|
||||
- @param {**Object**} [locale] - locale definition
|
||||
- @returns {**string**} current language code
|
||||
|
||||
It returns a current language code if called without any parameters.
|
||||
|
||||
```javascript
|
||||
date.locale(); // => "en"
|
||||
```
|
||||
|
||||
To switch to any other language, call it with a language code.
|
||||
|
||||
```javascript
|
||||
date.locale('es'); // Switch to Spanish
|
||||
```
|
||||
|
||||
See [LOCALE.md](./LOCALE.md) for details.
|
||||
|
||||
---
|
||||
|
||||
### extend(extension)
|
||||
|
||||
- Locale extension.
|
||||
- @param {**Object**} extension - locale definition
|
||||
- @returns {**void**}
|
||||
|
||||
Extend a current locale. See [EXTEND.md](./EXTEND.md) for details.
|
||||
|
||||
---
|
||||
|
||||
### plugin(name[, extension])
|
||||
|
||||
- Plugin import or definition.
|
||||
- @param {**string**} name - plugin name
|
||||
- @param {**Object**} [extension] - locale definition
|
||||
- @returns {**void**}
|
||||
|
||||
Plugin is a named locale definition defined with the `extend()`. See [PLUGINS.md](./PLUGINS.md) for details.
|
||||
|
||||
---
|
||||
|
||||
## Browser Support
|
||||
|
||||
Chrome, Firefox, Safari, Edge, and Internet Explorer 6+.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
414
node_modules/date-and-time/date-and-time.js
generated
vendored
Normal file
414
node_modules/date-and-time/date-and-time.js
generated
vendored
Normal file
@@ -0,0 +1,414 @@
|
||||
/**
|
||||
* @preserve date-and-time.js (c) KNOWLEDGECODE | MIT
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var date = {},
|
||||
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*/) { return d.utc ? '+0000' : /[\+-]\d{4}/.exec(d.toTimeString())[0]; },
|
||||
post: function (str) { return str; }
|
||||
},
|
||||
_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;
|
||||
},
|
||||
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; }
|
||||
},
|
||||
customize = function (code, base, locale) {
|
||||
var extend = function (proto, props, res) {
|
||||
var Locale = function (r) {
|
||||
if (r) { this.res = r; }
|
||||
};
|
||||
|
||||
Locale.prototype = proto;
|
||||
Locale.prototype.constructor = Locale;
|
||||
|
||||
var newLocale = new Locale(res),
|
||||
value;
|
||||
|
||||
for (var key in props || {}) {
|
||||
if (props.hasOwnProperty(key)) {
|
||||
value = props[key];
|
||||
newLocale[key] = value.slice ? value.slice() : value;
|
||||
}
|
||||
}
|
||||
return newLocale;
|
||||
},
|
||||
loc = { res: extend(base.res, locale.res) };
|
||||
|
||||
loc.formatter = extend(base.formatter, locale.formatter, loc.res);
|
||||
loc.parser = extend(base.parser, locale.parser, loc.res);
|
||||
locales[code] = loc;
|
||||
};
|
||||
|
||||
/**
|
||||
* formatting a date
|
||||
* @param {Date} dateObj - a Date object
|
||||
* @param {string} formatString - a format string
|
||||
* @param {boolean} [utc] - output as UTC
|
||||
* @returns {string} a formatted string
|
||||
*/
|
||||
date.format = function (dateObj, formatString, utc) {
|
||||
var d = date.addMinutes(dateObj, utc ? dateObj.getTimezoneOffset() : 0),
|
||||
formatter = locales[lang].formatter;
|
||||
|
||||
d.utc = utc;
|
||||
return formatString.replace(/\[[^\[\]]*]|\[.*\][^\[]*\]|([A-Za-z])\1*|./g, function (token) {
|
||||
return formatter[token] ? formatter.post(formatter[token](d, formatString)) : token.replace(/\[(.*)]/, '$1');
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* compiling a format string for the parser
|
||||
* @param {string} formatString - a format string
|
||||
* @returns {Array.<string>} a compiled object
|
||||
*/
|
||||
date.compile = function (formatString) {
|
||||
var re = /([A-Za-z])\1*|./g, keys, pattern = [formatString];
|
||||
|
||||
formatString = formatString.replace(/\[[^\[\]]*]|\[.*\][^\[]*\]/g, function (str) {
|
||||
return str.replace(/./g, ' ').slice(2);
|
||||
});
|
||||
while ((keys = re.exec(formatString))) {
|
||||
pattern[pattern.length] = keys[0];
|
||||
}
|
||||
return pattern;
|
||||
};
|
||||
|
||||
/**
|
||||
* pre-parsing a date string
|
||||
* @param {string} dateString - a date string
|
||||
* @param {string|Array.<string>} arg - a format string or a compiled object
|
||||
* @returns {Object} a date structure
|
||||
*/
|
||||
date.preparse = function (dateString, arg) {
|
||||
var parser = locales[lang].parser, token, result, offset = 0,
|
||||
pattern = typeof arg === 'string' ? date.compile(arg) : arg, formatString = pattern[0],
|
||||
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 };
|
||||
|
||||
dateString = parser.pre(dateString);
|
||||
for (var i = 1, len = pattern.length; i < len; i++) {
|
||||
token = pattern[i];
|
||||
if (parser[token]) {
|
||||
result = parser[token](dateString.slice(offset), formatString);
|
||||
if (!result.length) {
|
||||
break;
|
||||
}
|
||||
offset += result.length;
|
||||
dt[token.charAt(0)] = result.value;
|
||||
dt._match++;
|
||||
} else if (token === dateString.charAt(offset) || token === ' ') {
|
||||
offset++;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
dt.H = dt.H || parser.h12(dt.h, dt.A);
|
||||
dt._index = offset;
|
||||
dt._length = dateString.length;
|
||||
return dt;
|
||||
};
|
||||
|
||||
/**
|
||||
* validation
|
||||
* @param {Object|string} arg1 - a date structure or a date string
|
||||
* @param {string|Array.<string>} [arg2] - a format string or a compiled object
|
||||
* @returns {boolean} whether the date string is a valid date
|
||||
*/
|
||||
date.isValid = function (arg1, arg2) {
|
||||
var dt = typeof arg1 === 'string' ? date.preparse(arg1, arg2) : arg1,
|
||||
last = [31, 28 + date.isLeapYear(dt.Y) | 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][dt.M - 1];
|
||||
|
||||
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 > last ||
|
||||
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 < -720 || dt.Z > 840
|
||||
);
|
||||
};
|
||||
|
||||
/**
|
||||
* parsing a date string
|
||||
* @param {string} dateString - a date string
|
||||
* @param {string|Array.<string>} arg - a format string or a compiled object
|
||||
* @param {boolean} [utc] - input as UTC
|
||||
* @returns {Date} a constructed date
|
||||
*/
|
||||
date.parse = function (dateString, arg, utc) {
|
||||
var dt = date.preparse(dateString, arg);
|
||||
|
||||
if (date.isValid(dt)) {
|
||||
dt.M -= dt.Y < 100 ? 22801 : 1; // 22801 = 1900 * 12 + 1
|
||||
if (utc || dt.Z) {
|
||||
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);
|
||||
};
|
||||
|
||||
/**
|
||||
* adding years
|
||||
* @param {Date} dateObj - a date object
|
||||
* @param {number} years - number of years to add
|
||||
* @returns {Date} a date after adding the value
|
||||
*/
|
||||
date.addYears = function (dateObj, years) {
|
||||
return date.addMonths(dateObj, years * 12);
|
||||
};
|
||||
|
||||
/**
|
||||
* adding months
|
||||
* @param {Date} dateObj - a date object
|
||||
* @param {number} months - number of months to add
|
||||
* @returns {Date} a date after adding the value
|
||||
*/
|
||||
date.addMonths = function (dateObj, months) {
|
||||
var d = new Date(dateObj.getTime());
|
||||
|
||||
d.setMonth(d.getMonth() + months);
|
||||
return d;
|
||||
};
|
||||
|
||||
/**
|
||||
* adding days
|
||||
* @param {Date} dateObj - a date object
|
||||
* @param {number} days - number of days to add
|
||||
* @returns {Date} a date after adding the value
|
||||
*/
|
||||
date.addDays = function (dateObj, days) {
|
||||
var d = new Date(dateObj.getTime());
|
||||
|
||||
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} a date after adding the value
|
||||
*/
|
||||
date.addHours = function (dateObj, hours) {
|
||||
return date.addMilliseconds(dateObj, hours * 3600000);
|
||||
};
|
||||
|
||||
/**
|
||||
* adding minutes
|
||||
* @param {Date} dateObj - a date object
|
||||
* @param {number} minutes - number of minutes to add
|
||||
* @returns {Date} a date after adding the value
|
||||
*/
|
||||
date.addMinutes = function (dateObj, minutes) {
|
||||
return date.addMilliseconds(dateObj, minutes * 60000);
|
||||
};
|
||||
|
||||
/**
|
||||
* adding seconds
|
||||
* @param {Date} dateObj - a date object
|
||||
* @param {number} seconds - number of seconds to add
|
||||
* @returns {Date} a date after adding the value
|
||||
*/
|
||||
date.addSeconds = function (dateObj, seconds) {
|
||||
return date.addMilliseconds(dateObj, seconds * 1000);
|
||||
};
|
||||
|
||||
/**
|
||||
* adding milliseconds
|
||||
* @param {Date} dateObj - a date object
|
||||
* @param {number} milliseconds - number of milliseconds to add
|
||||
* @returns {Date} a date after adding the value
|
||||
*/
|
||||
date.addMilliseconds = function (dateObj, milliseconds) {
|
||||
return new Date(dateObj.getTime() + milliseconds);
|
||||
};
|
||||
|
||||
/**
|
||||
* subtracting
|
||||
* @param {Date} date1 - a Date object
|
||||
* @param {Date} date2 - a Date object
|
||||
* @returns {Object} a result object subtracting date2 from date1
|
||||
*/
|
||||
date.subtract = function (date1, date2) {
|
||||
var delta = date1.getTime() - date2.getTime();
|
||||
|
||||
return {
|
||||
toMilliseconds: function () {
|
||||
return delta;
|
||||
},
|
||||
toSeconds: function () {
|
||||
return delta / 1000 | 0;
|
||||
},
|
||||
toMinutes: function () {
|
||||
return delta / 60000 | 0;
|
||||
},
|
||||
toHours: function () {
|
||||
return delta / 3600000 | 0;
|
||||
},
|
||||
toDays: function () {
|
||||
return delta / 86400000 | 0;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* leap year
|
||||
* @param {number} y - year
|
||||
* @returns {boolean} whether the year is a leap year
|
||||
*/
|
||||
date.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 dates are the same day (times are ignored)
|
||||
*/
|
||||
date.isSameDay = function (date1, date2) {
|
||||
return date1.toDateString() === date2.toDateString();
|
||||
};
|
||||
|
||||
/**
|
||||
* change locale or setting a new locale definition
|
||||
* @param {string} [code] - language code
|
||||
* @param {Object} [locale] - locale definition
|
||||
* @returns {string} current language code
|
||||
*/
|
||||
date.locale = function (code, locale) {
|
||||
if (locale) {
|
||||
customize(code, { res: _res, formatter: _formatter, parser: _parser }, locale);
|
||||
} else if (code) {
|
||||
lang = code;
|
||||
}
|
||||
return lang;
|
||||
};
|
||||
|
||||
/**
|
||||
* locale extension
|
||||
* @param {Object} extension - locale extension
|
||||
* @returns {void}
|
||||
*/
|
||||
date.extend = function (extension) {
|
||||
customize(lang, locales[lang], extension);
|
||||
};
|
||||
|
||||
/**
|
||||
* plugin import or definition
|
||||
* @param {string} name - plugin name
|
||||
* @param {Object} [extension] - locale extension
|
||||
* @returns {void}
|
||||
*/
|
||||
date.plugin = function (name, extension) {
|
||||
plugins[name] = plugins[name] || extension;
|
||||
if (!extension && plugins[name]) {
|
||||
date.extend(plugins[name]);
|
||||
}
|
||||
};
|
||||
|
||||
// Create default locale (English)
|
||||
date.locale(lang, {});
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
module.exports = date;
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define([], function () {
|
||||
return date;
|
||||
});
|
||||
} else {
|
||||
global.date = date;
|
||||
}
|
||||
|
||||
}(this));
|
15
node_modules/date-and-time/date-and-time.min.js
generated
vendored
Normal file
15
node_modules/date-and-time/date-and-time.min.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
date-and-time.js (c) KNOWLEDGECODE | MIT
|
||||
*/
|
||||
(function(r){var d={},m={},k={},h="en",t={MMMM:"January February March April May June July August September October November December".split(" "),MMM:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),dddd:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ddd:"Sun Mon Tue Wed Thu Fri Sat".split(" "),dd:"Su Mo Tu We Th Fr Sa".split(" "),A:["AM","PM"]},u={YYYY:function(a){return("000"+a.getFullYear()).slice(-4)},YY:function(a){return("0"+a.getFullYear()).slice(-2)},Y:function(a){return""+
|
||||
a.getFullYear()},MMMM:function(a){return this.res.MMMM[a.getMonth()]},MMM:function(a){return this.res.MMM[a.getMonth()]},MM:function(a){return("0"+(a.getMonth()+1)).slice(-2)},M:function(a){return""+(a.getMonth()+1)},DD:function(a){return("0"+a.getDate()).slice(-2)},D:function(a){return""+a.getDate()},HH:function(a){return("0"+a.getHours()).slice(-2)},H:function(a){return""+a.getHours()},A:function(a){return this.res.A[11<a.getHours()|0]},hh:function(a){return("0"+(a.getHours()%12||12)).slice(-2)},
|
||||
h:function(a){return""+(a.getHours()%12||12)},mm:function(a){return("0"+a.getMinutes()).slice(-2)},m:function(a){return""+a.getMinutes()},ss:function(a){return("0"+a.getSeconds()).slice(-2)},s:function(a){return""+a.getSeconds()},SSS:function(a){return("00"+a.getMilliseconds()).slice(-3)},SS:function(a){return("0"+(a.getMilliseconds()/10|0)).slice(-2)},S:function(a){return""+(a.getMilliseconds()/100|0)},dddd:function(a){return this.res.dddd[a.getDay()]},ddd:function(a){return this.res.ddd[a.getDay()]},
|
||||
dd:function(a){return this.res.dd[a.getDay()]},Z:function(a){return a.utc?"+0000":/[\+-]\d{4}/.exec(a.toTimeString())[0]},post:function(a){return a}},w={YYYY:function(a){return this.exec(/^\d{4}/,a)},Y:function(a){return this.exec(/^\d{1,4}/,a)},MMMM:function(a){a=this.find(this.res.MMMM,a);a.value++;return a},MMM:function(a){a=this.find(this.res.MMM,a);a.value++;return a},MM:function(a){return this.exec(/^\d\d/,a)},M:function(a){return this.exec(/^\d\d?/,a)},DD:function(a){return this.exec(/^\d\d/,
|
||||
a)},D:function(a){return this.exec(/^\d\d?/,a)},HH:function(a){return this.exec(/^\d\d/,a)},H:function(a){return this.exec(/^\d\d?/,a)},A:function(a){return this.find(this.res.A,a)},hh:function(a){return this.exec(/^\d\d/,a)},h:function(a){return this.exec(/^\d\d?/,a)},mm:function(a){return this.exec(/^\d\d/,a)},m:function(a){return this.exec(/^\d\d?/,a)},ss:function(a){return this.exec(/^\d\d/,a)},s:function(a){return this.exec(/^\d\d?/,a)},SSS:function(a){return this.exec(/^\d{1,3}/,a)},SS:function(a){a=
|
||||
this.exec(/^\d\d?/,a);a.value*=10;return a},S:function(a){a=this.exec(/^\d/,a);a.value*=100;return a},Z:function(a){a=this.exec(/^[\+-]\d{2}[0-5]\d/,a);a.value=-60*(a.value/100|0)-a.value%100;return a},h12:function(a,c){return(12===a?0:a)+12*c},exec:function(a,c){var b=(a.exec(c)||[""])[0];return{value:b|0,length:b.length}},find:function(a,c){for(var b=-1,d=0,e=0,v=a.length,f;e<v;e++)f=a[e],!c.indexOf(f)&&f.length>d&&(b=e,d=f.length);return{value:b,length:d}},pre:function(a){return a}},n=function(a,
|
||||
c,b){var d=function(a,b,c){var d=function(a){a&&(this.res=a)};d.prototype=a;d.prototype.constructor=d;a=new d(c);for(var e in b||{})b.hasOwnProperty(e)&&(c=b[e],a[e]=c.slice?c.slice():c);return a},e={res:d(c.res,b.res)};e.formatter=d(c.formatter,b.formatter,e.res);e.parser=d(c.parser,b.parser,e.res);m[a]=e};d.format=function(a,c,b){var g=d.addMinutes(a,b?a.getTimezoneOffset():0),e=m[h].formatter;g.utc=b;return c.replace(/\[[^\[\]]*]|\[.*\][^\[]*\]|([A-Za-z])\1*|./g,function(a){return e[a]?e.post(e[a](g,
|
||||
c)):a.replace(/\[(.*)]/,"$1")})};d.compile=function(a){var c=/([A-Za-z])\1*|./g,b,d=[a];for(a=a.replace(/\[[^\[\]]*]|\[.*\][^\[]*\]/g,function(a){return a.replace(/./g," ").slice(2)});b=c.exec(a);)d[d.length]=b[0];return d};d.preparse=function(a,c){var b=m[h].parser,g=0,e="string"===typeof c?d.compile(c):c,k=e[0],f={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};a=b.pre(a);for(var p=1,n=e.length;p<n;p++){var l=e[p];if(b[l]){var q=b[l](a.slice(g),k);if(!q.length)break;g+=q.length;
|
||||
f[l.charAt(0)]=q.value;f._match++}else if(l===a.charAt(g)||" "===l)g++;else break}f.H=f.H||b.h12(f.h,f.A);f._index=g;f._length=a.length;return f};d.isValid=function(a,c){var b="string"===typeof a?d.preparse(a,c):a,g=[31,28+d.isLeapYear(b.Y)|0,31,30,31,30,31,31,30,31,30,31][b.M-1];return!(1>b._index||1>b._length||b._index-b._length||1>b._match||1>b.Y||9999<b.Y||1>b.M||12<b.M||1>b.D||b.D>g||0>b.H||23<b.H||0>b.m||59<b.m||0>b.s||59<b.s||0>b.S||999<b.S||-720>b.Z||840<b.Z)};d.parse=function(a,c,b){a=d.preparse(a,
|
||||
c);return d.isValid(a)?(a.M-=100>a.Y?22801:1,b||a.Z?new Date(Date.UTC(a.Y,a.M,a.D,a.H,a.m+a.Z,a.s,a.S)):new Date(a.Y,a.M,a.D,a.H,a.m,a.s,a.S)):new Date(NaN)};d.addYears=function(a,c){return d.addMonths(a,12*c)};d.addMonths=function(a,c){var b=new Date(a.getTime());b.setMonth(b.getMonth()+c);return b};d.addDays=function(a,c){var b=new Date(a.getTime());b.setDate(b.getDate()+c);return b};d.addHours=function(a,c){return d.addMilliseconds(a,36E5*c)};d.addMinutes=function(a,c){return d.addMilliseconds(a,
|
||||
6E4*c)};d.addSeconds=function(a,c){return d.addMilliseconds(a,1E3*c)};d.addMilliseconds=function(a,c){return new Date(a.getTime()+c)};d.subtract=function(a,c){var b=a.getTime()-c.getTime();return{toMilliseconds:function(){return b},toSeconds:function(){return b/1E3|0},toMinutes:function(){return b/6E4|0},toHours:function(){return b/36E5|0},toDays:function(){return b/864E5|0}}};d.isLeapYear=function(a){return!(a%4)&&!!(a%100)||!(a%400)};d.isSameDay=function(a,c){return a.toDateString()===c.toDateString()};
|
||||
d.locale=function(a,c){c?n(a,{res:t,formatter:u,parser:w},c):a&&(h=a);return h};d.extend=function(a){n(h,m[h],a)};d.plugin=function(a,c){k[a]=k[a]||c;!c&&k[a]&&d.extend(k[a])};d.locale(h,{});"object"===typeof module&&"object"===typeof module.exports?module.exports=d:"function"===typeof define&&define.amd?define([],function(){return d}):r.date=d})(this);
|
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 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Arabic (ar)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('ar', {
|
||||
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];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
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 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Azerbaijani (az)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('az', {
|
||||
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
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
58
node_modules/date-and-time/locale/bn.js
generated
vendored
Normal file
58
node_modules/date-and-time/locale/bn.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Bengali (bn)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('bn', {
|
||||
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; // বিকাল
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
30
node_modules/date-and-time/locale/cs.js
generated
vendored
Normal file
30
node_modules/date-and-time/locale/cs.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Czech (cs)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('cs', {
|
||||
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']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
31
node_modules/date-and-time/locale/de.js
generated
vendored
Normal file
31
node_modules/date-and-time/locale/de.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve German (de)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('de', {
|
||||
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']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
30
node_modules/date-and-time/locale/dk.js
generated
vendored
Normal file
30
node_modules/date-and-time/locale/dk.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Danish (DK)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('dk', {
|
||||
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ø']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
50
node_modules/date-and-time/locale/el.js
generated
vendored
Normal file
50
node_modules/date-and-time/locale/el.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Greek (el)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('el', {
|
||||
res: {
|
||||
MMMM_nominative: ['Ιανουάριος', 'Φεβρουάριος', 'Μάρτιος', 'Απρίλιος', 'Μάιος', 'Ιούνιος', 'Ιούλιος', 'Αύγουστος', 'Σεπτέμβριος', 'Οκτώβριος', 'Νοέμβριος', 'Δεκέμβριος'],
|
||||
MMMM_genitive: ['Ιανουαρίου', 'Φεβρουαρίου', 'Μαρτίου', 'Απριλίου', 'Μαΐου', 'Ιουνίου', 'Ιουλίου', 'Αυγούστου', 'Σεπτεμβρίου', 'Οκτωβρίου', 'Νοεμβρίου', 'Δεκεμβρίου'],
|
||||
MMM: ['Ιαν', 'Φεβ', 'Μαρ', 'Απρ', 'Μαϊ', 'Ιουν', 'Ιουλ', 'Αυγ', 'Σεπ', 'Οκτ', 'Νοε', 'Δεκ'],
|
||||
dddd: ['Κυριακή', 'Δευτέρα', 'Τρίτη', 'Τετάρτη', 'Πέμπτη', 'Παρασκευή', 'Σάββατο'],
|
||||
ddd: ['Κυρ', 'Δευ', 'Τρι', 'Τετ', 'Πεμ', 'Παρ', 'Σαβ'],
|
||||
dd: ['Κυ', 'Δε', 'Τρ', 'Τε', 'Πε', 'Πα', 'Σα'],
|
||||
A: ['πμ', 'μμ']
|
||||
},
|
||||
formatter: {
|
||||
MMMM: function (d, formatString) {
|
||||
return this.res['MMMM_' + (/D.*MMMM/.test(formatString) ? 'genitive' : 'nominative')][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) ? 'genitive' : 'nominative')], str);
|
||||
result.value++;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
50
node_modules/date-and-time/locale/es.js
generated
vendored
Normal file
50
node_modules/date-and-time/locale/es.js
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Spanish (es)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('es', {
|
||||
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
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
47
node_modules/date-and-time/locale/fa.js
generated
vendored
Normal file
47
node_modules/date-and-time/locale/fa.js
generated
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Persian (fa)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('fa', {
|
||||
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];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
31
node_modules/date-and-time/locale/fr.js
generated
vendored
Normal file
31
node_modules/date-and-time/locale/fr.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve French (fr)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('fr', {
|
||||
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']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
58
node_modules/date-and-time/locale/hi.js
generated
vendored
Normal file
58
node_modules/date-and-time/locale/hi.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Hindi (hi)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('hi', {
|
||||
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; // शाम
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
31
node_modules/date-and-time/locale/hu.js
generated
vendored
Normal file
31
node_modules/date-and-time/locale/hu.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Hungarian (hu)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('hu', {
|
||||
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']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
54
node_modules/date-and-time/locale/id.js
generated
vendored
Normal file
54
node_modules/date-and-time/locale/id.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Indonesian (id)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('id', {
|
||||
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
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
31
node_modules/date-and-time/locale/it.js
generated
vendored
Normal file
31
node_modules/date-and-time/locale/it.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Italian (it)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('it', {
|
||||
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']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
39
node_modules/date-and-time/locale/ja.js
generated
vendored
Normal file
39
node_modules/date-and-time/locale/ja.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Japanese (ja)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('ja', {
|
||||
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;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
54
node_modules/date-and-time/locale/jv.js
generated
vendored
Normal file
54
node_modules/date-and-time/locale/jv.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Javanese (jv)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('jv', {
|
||||
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
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
31
node_modules/date-and-time/locale/ko.js
generated
vendored
Normal file
31
node_modules/date-and-time/locale/ko.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Korean (ko)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('ko', {
|
||||
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: ['오전', '오후']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
46
node_modules/date-and-time/locale/my.js
generated
vendored
Normal file
46
node_modules/date-and-time/locale/my.js
generated
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Burmese (my)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('my', {
|
||||
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];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
43
node_modules/date-and-time/locale/nl.js
generated
vendored
Normal file
43
node_modules/date-and-time/locale/nl.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Dutch (nl)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('nl', {
|
||||
res: {
|
||||
MMMM: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
|
||||
MMM_withdots: ['jan.', 'feb.', 'mrt.', 'apr.', 'mei', 'jun.', 'jul.', 'aug.', 'sep.', 'okt.', 'nov.', 'dec.'],
|
||||
MMM_withoutdots: ['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) ? 'withoutdots' : 'withdots')][d.getMonth()];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
MMM: function (str, formatString) {
|
||||
var result = this.find(this.res['MMM_' + (/-MMM-/.test(formatString) ? 'withoutdots' : 'withdots')], str);
|
||||
result.value++;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
70
node_modules/date-and-time/locale/pa-in.js
generated
vendored
Normal file
70
node_modules/date-and-time/locale/pa-in.js
generated
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Punjabi (pa-in)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('pa-in', {
|
||||
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];
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
43
node_modules/date-and-time/locale/pl.js
generated
vendored
Normal file
43
node_modules/date-and-time/locale/pl.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Polish (pl)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('pl', {
|
||||
res: {
|
||||
MMMM_nominative: ['styczeń', 'luty', 'marzec', 'kwiecień', 'maj', 'czerwiec', 'lipiec', 'sierpień', 'wrzesień', 'październik', 'listopad', 'grudzień'],
|
||||
MMMM_subjective: ['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) ? 'subjective' : 'nominative')][d.getMonth()];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
MMMM: function (str, formatString) {
|
||||
var result = this.find(this.res['MMMM_' + (/D MMMM/.test(formatString) ? 'subjective' : 'nominative')], str);
|
||||
result.value++;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
52
node_modules/date-and-time/locale/pt.js
generated
vendored
Normal file
52
node_modules/date-and-time/locale/pt.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Portuguese (pt)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('pt', {
|
||||
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
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
30
node_modules/date-and-time/locale/ro.js
generated
vendored
Normal file
30
node_modules/date-and-time/locale/ro.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Romanian (ro)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('ro', {
|
||||
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â']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
52
node_modules/date-and-time/locale/ru.js
generated
vendored
Normal file
52
node_modules/date-and-time/locale/ru.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Russian (ru)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('ru', {
|
||||
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; // дня, вечера
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
30
node_modules/date-and-time/locale/sr.js
generated
vendored
Normal file
30
node_modules/date-and-time/locale/sr.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Serbian (sr)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('sr', {
|
||||
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']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
31
node_modules/date-and-time/locale/th.js
generated
vendored
Normal file
31
node_modules/date-and-time/locale/th.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Thai (th)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('th', {
|
||||
res: {
|
||||
MMMM: ['มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'],
|
||||
MMM: ['ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.', 'ก.ค.', 'ส.ค.', 'ก.ย.', 'ต.ค.', 'พ.ย.', 'ธ.ค.'],
|
||||
dddd: ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัสบดี', 'ศุกร์', 'เสาร์'],
|
||||
ddd: ['อาทิตย์', 'จันทร์', 'อังคาร', 'พุธ', 'พฤหัส', 'ศุกร์', 'เสาร์'],
|
||||
dd: ['อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'],
|
||||
A: ['ก่อนเที่ยง', 'หลังเที่ยง']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
30
node_modules/date-and-time/locale/tr.js
generated
vendored
Normal file
30
node_modules/date-and-time/locale/tr.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Turkish (tr)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('tr', {
|
||||
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']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
63
node_modules/date-and-time/locale/uk.js
generated
vendored
Normal file
63
node_modules/date-and-time/locale/uk.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Ukrainian (uk)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('uk', {
|
||||
res: {
|
||||
MMMM: ['січня', 'лютого', 'березня', 'квітня', 'травня', 'червня', 'липня', 'серпня', 'вересня', 'жовтня', 'листопада', 'грудня'],
|
||||
MMM: ['січ', 'лют', 'бер', 'квіт', 'трав', 'черв', 'лип', 'серп', 'вер', 'жовт', 'лист', 'груд'],
|
||||
dddd_nominative: ['неділя', 'понеділок', 'вівторок', 'середа', 'четвер', 'п’ятниця', 'субота'],
|
||||
dddd_accusative: ['неділю', 'понеділок', 'вівторок', 'середу', 'четвер', 'п’ятницю', 'суботу'],
|
||||
dddd_genitive: ['неділі', 'понеділка', 'вівторка', 'середи', 'четверга', 'п’ятниці', 'суботи'],
|
||||
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 = 'nominative';
|
||||
if (/(\[[ВвУу]\]) ?dddd/.test(formatString)) {
|
||||
type = 'accusative';
|
||||
} else if (/\[?(?:минулої|наступної)? ?\] ?dddd/.test(formatString)) {
|
||||
type = 'genitive';
|
||||
}
|
||||
return this.res['dddd_' + type][d.getDay()];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
h12: function (h, a) {
|
||||
if (a < 2) {
|
||||
return h; // ночі, ранку
|
||||
}
|
||||
return h > 11 ? h : h + 12; // дня, вечора
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
30
node_modules/date-and-time/locale/uz.js
generated
vendored
Normal file
30
node_modules/date-and-time/locale/uz.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Uzbek (uz)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('uz', {
|
||||
res: {
|
||||
MMMM: ['январ', 'феврал', 'март', 'апрел', 'май', 'июн', 'июл', 'август', 'сентябр', 'октябр', 'ноябр', 'декабр'],
|
||||
MMM: ['янв', 'фев', 'мар', 'апр', 'май', 'июн', 'июл', 'авг', 'сен', 'окт', 'ноя', 'дек'],
|
||||
dddd: ['Якшанба', 'Душанба', 'Сешанба', 'Чоршанба', 'Пайшанба', 'Жума', 'Шанба'],
|
||||
ddd: ['Якш', 'Душ', 'Сеш', 'Чор', 'Пай', 'Жум', 'Шан'],
|
||||
dd: ['Як', 'Ду', 'Се', 'Чо', 'Па', 'Жу', 'Ша']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
31
node_modules/date-and-time/locale/vi.js
generated
vendored
Normal file
31
node_modules/date-and-time/locale/vi.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Vietnamese (vi)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('vi', {
|
||||
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']
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
56
node_modules/date-and-time/locale/zh-cn.js
generated
vendored
Normal file
56
node_modules/date-and-time/locale/zh-cn.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Chinese (zh-cn)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('zh-cn', {
|
||||
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; // 下午, 晚上
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
54
node_modules/date-and-time/locale/zh-tw.js
generated
vendored
Normal file
54
node_modules/date-and-time/locale/zh-tw.js
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* @preserve date-and-time.js locale configuration
|
||||
* @preserve Chinese (zh-tw)
|
||||
* @preserve It is using moment.js locale configuration as a reference.
|
||||
*/
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.locale('zh-tw', {
|
||||
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; // 下午, 晚上
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
65
node_modules/date-and-time/package.json
generated
vendored
Normal file
65
node_modules/date-and-time/package.json
generated
vendored
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"_from": "date-and-time@^0.12.0",
|
||||
"_id": "date-and-time@0.12.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-n2RJIAp93AucgF/U/Rz5WRS2Hjg5Z+QxscaaMCi6pVZT1JpJKRH+C08vyH/lRR1kxNXnPxgo3lWfd+jCb/UcuQ==",
|
||||
"_location": "/date-and-time",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "date-and-time@^0.12.0",
|
||||
"name": "date-and-time",
|
||||
"escapedName": "date-and-time",
|
||||
"rawSpec": "^0.12.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^0.12.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@google-cloud/storage"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/date-and-time/-/date-and-time-0.12.0.tgz",
|
||||
"_shasum": "6d30c91c47fa72edadd628b71ec2ac46909b9267",
|
||||
"_spec": "date-and-time@^0.12.0",
|
||||
"_where": "C:\\Users\\matia\\Documents\\GitHub\\Musix-V3\\node_modules\\@google-cloud\\storage",
|
||||
"author": {
|
||||
"name": "KNOWLEDGECODE"
|
||||
},
|
||||
"browser": {
|
||||
"date-and-time": "./date-and-time.js"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/knowledgecode/date-and-time/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"deprecated": false,
|
||||
"description": "A Minimalist DateTime utility for Node.js and the browser",
|
||||
"devDependencies": {
|
||||
"babel-preset-env": "^1.7.0",
|
||||
"babelify": "^7.3.0",
|
||||
"browserify": "^16.5.0",
|
||||
"expect.js": "^0.3.1",
|
||||
"mocha": "^6.2.2",
|
||||
"mocha-headless-chrome": "^2.0.3"
|
||||
},
|
||||
"homepage": "https://github.com/knowledgecode/date-and-time",
|
||||
"keywords": [
|
||||
"date",
|
||||
"time",
|
||||
"format",
|
||||
"parse",
|
||||
"utility"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "date-and-time.js",
|
||||
"name": "date-and-time",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/knowledgecode/date-and-time.git"
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "./compile.sh date-and-time.js date-and-time.min.js",
|
||||
"test": "./test.sh"
|
||||
},
|
||||
"version": "0.12.0"
|
||||
}
|
42
node_modules/date-and-time/plugin/meridiem.js
generated
vendored
Normal file
42
node_modules/date-and-time/plugin/meridiem.js
generated
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.plugin('meridiem', {
|
||||
res: {
|
||||
A: ['AM', 'PM', 'A.M.', 'P.M.', 'am', 'pm', 'a.m.', 'p.m.']
|
||||
},
|
||||
formatter: {
|
||||
AA: function (d) {
|
||||
// A.M. / P.M.
|
||||
return this.res.A[d.getHours() > 11 | 0 + 2];
|
||||
},
|
||||
a: function (d) {
|
||||
// am / pm
|
||||
return this.res.A[d.getHours() > 11 | 0 + 4];
|
||||
},
|
||||
aa: function (d) {
|
||||
// a.m. / p.m.
|
||||
return this.res.A[d.getHours() > 11 | 0 + 6];
|
||||
}
|
||||
},
|
||||
parser: {
|
||||
A: function (str) {
|
||||
var result = this.find(this.res.A, str);
|
||||
result.value %= 2;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
38
node_modules/date-and-time/plugin/ordinal.js
generated
vendored
Normal file
38
node_modules/date-and-time/plugin/ordinal.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.plugin('ordinal', {
|
||||
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';
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
30
node_modules/date-and-time/plugin/two-digit-year.js
generated
vendored
Normal file
30
node_modules/date-and-time/plugin/two-digit-year.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
(function (global) {
|
||||
'use strict';
|
||||
|
||||
var exec = function (date) {
|
||||
date.plugin('two-digit-year', {
|
||||
parser: {
|
||||
YY: function (str) {
|
||||
var result = this.exec(/^\d\d/, str);
|
||||
result.value += result.value < 70 ? 2000 : 1900;
|
||||
return result;
|
||||
},
|
||||
Y: function (str) {
|
||||
var result = this.exec(/^\d\d?/, str);
|
||||
result.value += result.value < 70 ? 2000 : 1900;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||||
(module.paths || []).push('./');
|
||||
exec(require('date-and-time'));
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
define(['date-and-time'], exec);
|
||||
} else {
|
||||
exec(global.date);
|
||||
}
|
||||
|
||||
}(this));
|
Reference in New Issue
Block a user