Edit File by line
/home/barbar84/www/wp-inclu.../js/dist/vendor
File: moment.js
if (typeof input !== 'string') {
[1500] Fix | Delete
return input;
[1501] Fix | Delete
}
[1502] Fix | Delete
[1503] Fix | Delete
if (!isNaN(input)) {
[1504] Fix | Delete
return parseInt(input, 10);
[1505] Fix | Delete
}
[1506] Fix | Delete
[1507] Fix | Delete
input = locale.weekdaysParse(input);
[1508] Fix | Delete
if (typeof input === 'number') {
[1509] Fix | Delete
return input;
[1510] Fix | Delete
}
[1511] Fix | Delete
[1512] Fix | Delete
return null;
[1513] Fix | Delete
}
[1514] Fix | Delete
[1515] Fix | Delete
function parseIsoWeekday(input, locale) {
[1516] Fix | Delete
if (typeof input === 'string') {
[1517] Fix | Delete
return locale.weekdaysParse(input) % 7 || 7;
[1518] Fix | Delete
}
[1519] Fix | Delete
return isNaN(input) ? null : input;
[1520] Fix | Delete
}
[1521] Fix | Delete
[1522] Fix | Delete
// LOCALES
[1523] Fix | Delete
function shiftWeekdays(ws, n) {
[1524] Fix | Delete
return ws.slice(n, 7).concat(ws.slice(0, n));
[1525] Fix | Delete
}
[1526] Fix | Delete
[1527] Fix | Delete
var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
[1528] Fix | Delete
'_'
[1529] Fix | Delete
),
[1530] Fix | Delete
defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
[1531] Fix | Delete
defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
[1532] Fix | Delete
defaultWeekdaysRegex = matchWord,
[1533] Fix | Delete
defaultWeekdaysShortRegex = matchWord,
[1534] Fix | Delete
defaultWeekdaysMinRegex = matchWord;
[1535] Fix | Delete
[1536] Fix | Delete
function localeWeekdays(m, format) {
[1537] Fix | Delete
var weekdays = isArray(this._weekdays)
[1538] Fix | Delete
? this._weekdays
[1539] Fix | Delete
: this._weekdays[
[1540] Fix | Delete
m && m !== true && this._weekdays.isFormat.test(format)
[1541] Fix | Delete
? 'format'
[1542] Fix | Delete
: 'standalone'
[1543] Fix | Delete
];
[1544] Fix | Delete
return m === true
[1545] Fix | Delete
? shiftWeekdays(weekdays, this._week.dow)
[1546] Fix | Delete
: m
[1547] Fix | Delete
? weekdays[m.day()]
[1548] Fix | Delete
: weekdays;
[1549] Fix | Delete
}
[1550] Fix | Delete
[1551] Fix | Delete
function localeWeekdaysShort(m) {
[1552] Fix | Delete
return m === true
[1553] Fix | Delete
? shiftWeekdays(this._weekdaysShort, this._week.dow)
[1554] Fix | Delete
: m
[1555] Fix | Delete
? this._weekdaysShort[m.day()]
[1556] Fix | Delete
: this._weekdaysShort;
[1557] Fix | Delete
}
[1558] Fix | Delete
[1559] Fix | Delete
function localeWeekdaysMin(m) {
[1560] Fix | Delete
return m === true
[1561] Fix | Delete
? shiftWeekdays(this._weekdaysMin, this._week.dow)
[1562] Fix | Delete
: m
[1563] Fix | Delete
? this._weekdaysMin[m.day()]
[1564] Fix | Delete
: this._weekdaysMin;
[1565] Fix | Delete
}
[1566] Fix | Delete
[1567] Fix | Delete
function handleStrictParse$1(weekdayName, format, strict) {
[1568] Fix | Delete
var i,
[1569] Fix | Delete
ii,
[1570] Fix | Delete
mom,
[1571] Fix | Delete
llc = weekdayName.toLocaleLowerCase();
[1572] Fix | Delete
if (!this._weekdaysParse) {
[1573] Fix | Delete
this._weekdaysParse = [];
[1574] Fix | Delete
this._shortWeekdaysParse = [];
[1575] Fix | Delete
this._minWeekdaysParse = [];
[1576] Fix | Delete
[1577] Fix | Delete
for (i = 0; i < 7; ++i) {
[1578] Fix | Delete
mom = createUTC([2000, 1]).day(i);
[1579] Fix | Delete
this._minWeekdaysParse[i] = this.weekdaysMin(
[1580] Fix | Delete
mom,
[1581] Fix | Delete
''
[1582] Fix | Delete
).toLocaleLowerCase();
[1583] Fix | Delete
this._shortWeekdaysParse[i] = this.weekdaysShort(
[1584] Fix | Delete
mom,
[1585] Fix | Delete
''
[1586] Fix | Delete
).toLocaleLowerCase();
[1587] Fix | Delete
this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
[1588] Fix | Delete
}
[1589] Fix | Delete
}
[1590] Fix | Delete
[1591] Fix | Delete
if (strict) {
[1592] Fix | Delete
if (format === 'dddd') {
[1593] Fix | Delete
ii = indexOf.call(this._weekdaysParse, llc);
[1594] Fix | Delete
return ii !== -1 ? ii : null;
[1595] Fix | Delete
} else if (format === 'ddd') {
[1596] Fix | Delete
ii = indexOf.call(this._shortWeekdaysParse, llc);
[1597] Fix | Delete
return ii !== -1 ? ii : null;
[1598] Fix | Delete
} else {
[1599] Fix | Delete
ii = indexOf.call(this._minWeekdaysParse, llc);
[1600] Fix | Delete
return ii !== -1 ? ii : null;
[1601] Fix | Delete
}
[1602] Fix | Delete
} else {
[1603] Fix | Delete
if (format === 'dddd') {
[1604] Fix | Delete
ii = indexOf.call(this._weekdaysParse, llc);
[1605] Fix | Delete
if (ii !== -1) {
[1606] Fix | Delete
return ii;
[1607] Fix | Delete
}
[1608] Fix | Delete
ii = indexOf.call(this._shortWeekdaysParse, llc);
[1609] Fix | Delete
if (ii !== -1) {
[1610] Fix | Delete
return ii;
[1611] Fix | Delete
}
[1612] Fix | Delete
ii = indexOf.call(this._minWeekdaysParse, llc);
[1613] Fix | Delete
return ii !== -1 ? ii : null;
[1614] Fix | Delete
} else if (format === 'ddd') {
[1615] Fix | Delete
ii = indexOf.call(this._shortWeekdaysParse, llc);
[1616] Fix | Delete
if (ii !== -1) {
[1617] Fix | Delete
return ii;
[1618] Fix | Delete
}
[1619] Fix | Delete
ii = indexOf.call(this._weekdaysParse, llc);
[1620] Fix | Delete
if (ii !== -1) {
[1621] Fix | Delete
return ii;
[1622] Fix | Delete
}
[1623] Fix | Delete
ii = indexOf.call(this._minWeekdaysParse, llc);
[1624] Fix | Delete
return ii !== -1 ? ii : null;
[1625] Fix | Delete
} else {
[1626] Fix | Delete
ii = indexOf.call(this._minWeekdaysParse, llc);
[1627] Fix | Delete
if (ii !== -1) {
[1628] Fix | Delete
return ii;
[1629] Fix | Delete
}
[1630] Fix | Delete
ii = indexOf.call(this._weekdaysParse, llc);
[1631] Fix | Delete
if (ii !== -1) {
[1632] Fix | Delete
return ii;
[1633] Fix | Delete
}
[1634] Fix | Delete
ii = indexOf.call(this._shortWeekdaysParse, llc);
[1635] Fix | Delete
return ii !== -1 ? ii : null;
[1636] Fix | Delete
}
[1637] Fix | Delete
}
[1638] Fix | Delete
}
[1639] Fix | Delete
[1640] Fix | Delete
function localeWeekdaysParse(weekdayName, format, strict) {
[1641] Fix | Delete
var i, mom, regex;
[1642] Fix | Delete
[1643] Fix | Delete
if (this._weekdaysParseExact) {
[1644] Fix | Delete
return handleStrictParse$1.call(this, weekdayName, format, strict);
[1645] Fix | Delete
}
[1646] Fix | Delete
[1647] Fix | Delete
if (!this._weekdaysParse) {
[1648] Fix | Delete
this._weekdaysParse = [];
[1649] Fix | Delete
this._minWeekdaysParse = [];
[1650] Fix | Delete
this._shortWeekdaysParse = [];
[1651] Fix | Delete
this._fullWeekdaysParse = [];
[1652] Fix | Delete
}
[1653] Fix | Delete
[1654] Fix | Delete
for (i = 0; i < 7; i++) {
[1655] Fix | Delete
// make the regex if we don't have it already
[1656] Fix | Delete
[1657] Fix | Delete
mom = createUTC([2000, 1]).day(i);
[1658] Fix | Delete
if (strict && !this._fullWeekdaysParse[i]) {
[1659] Fix | Delete
this._fullWeekdaysParse[i] = new RegExp(
[1660] Fix | Delete
'^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
[1661] Fix | Delete
'i'
[1662] Fix | Delete
);
[1663] Fix | Delete
this._shortWeekdaysParse[i] = new RegExp(
[1664] Fix | Delete
'^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
[1665] Fix | Delete
'i'
[1666] Fix | Delete
);
[1667] Fix | Delete
this._minWeekdaysParse[i] = new RegExp(
[1668] Fix | Delete
'^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
[1669] Fix | Delete
'i'
[1670] Fix | Delete
);
[1671] Fix | Delete
}
[1672] Fix | Delete
if (!this._weekdaysParse[i]) {
[1673] Fix | Delete
regex =
[1674] Fix | Delete
'^' +
[1675] Fix | Delete
this.weekdays(mom, '') +
[1676] Fix | Delete
'|^' +
[1677] Fix | Delete
this.weekdaysShort(mom, '') +
[1678] Fix | Delete
'|^' +
[1679] Fix | Delete
this.weekdaysMin(mom, '');
[1680] Fix | Delete
this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
[1681] Fix | Delete
}
[1682] Fix | Delete
// test the regex
[1683] Fix | Delete
if (
[1684] Fix | Delete
strict &&
[1685] Fix | Delete
format === 'dddd' &&
[1686] Fix | Delete
this._fullWeekdaysParse[i].test(weekdayName)
[1687] Fix | Delete
) {
[1688] Fix | Delete
return i;
[1689] Fix | Delete
} else if (
[1690] Fix | Delete
strict &&
[1691] Fix | Delete
format === 'ddd' &&
[1692] Fix | Delete
this._shortWeekdaysParse[i].test(weekdayName)
[1693] Fix | Delete
) {
[1694] Fix | Delete
return i;
[1695] Fix | Delete
} else if (
[1696] Fix | Delete
strict &&
[1697] Fix | Delete
format === 'dd' &&
[1698] Fix | Delete
this._minWeekdaysParse[i].test(weekdayName)
[1699] Fix | Delete
) {
[1700] Fix | Delete
return i;
[1701] Fix | Delete
} else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
[1702] Fix | Delete
return i;
[1703] Fix | Delete
}
[1704] Fix | Delete
}
[1705] Fix | Delete
}
[1706] Fix | Delete
[1707] Fix | Delete
// MOMENTS
[1708] Fix | Delete
[1709] Fix | Delete
function getSetDayOfWeek(input) {
[1710] Fix | Delete
if (!this.isValid()) {
[1711] Fix | Delete
return input != null ? this : NaN;
[1712] Fix | Delete
}
[1713] Fix | Delete
var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
[1714] Fix | Delete
if (input != null) {
[1715] Fix | Delete
input = parseWeekday(input, this.localeData());
[1716] Fix | Delete
return this.add(input - day, 'd');
[1717] Fix | Delete
} else {
[1718] Fix | Delete
return day;
[1719] Fix | Delete
}
[1720] Fix | Delete
}
[1721] Fix | Delete
[1722] Fix | Delete
function getSetLocaleDayOfWeek(input) {
[1723] Fix | Delete
if (!this.isValid()) {
[1724] Fix | Delete
return input != null ? this : NaN;
[1725] Fix | Delete
}
[1726] Fix | Delete
var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
[1727] Fix | Delete
return input == null ? weekday : this.add(input - weekday, 'd');
[1728] Fix | Delete
}
[1729] Fix | Delete
[1730] Fix | Delete
function getSetISODayOfWeek(input) {
[1731] Fix | Delete
if (!this.isValid()) {
[1732] Fix | Delete
return input != null ? this : NaN;
[1733] Fix | Delete
}
[1734] Fix | Delete
[1735] Fix | Delete
// behaves the same as moment#day except
[1736] Fix | Delete
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
[1737] Fix | Delete
// as a setter, sunday should belong to the previous week.
[1738] Fix | Delete
[1739] Fix | Delete
if (input != null) {
[1740] Fix | Delete
var weekday = parseIsoWeekday(input, this.localeData());
[1741] Fix | Delete
return this.day(this.day() % 7 ? weekday : weekday - 7);
[1742] Fix | Delete
} else {
[1743] Fix | Delete
return this.day() || 7;
[1744] Fix | Delete
}
[1745] Fix | Delete
}
[1746] Fix | Delete
[1747] Fix | Delete
function weekdaysRegex(isStrict) {
[1748] Fix | Delete
if (this._weekdaysParseExact) {
[1749] Fix | Delete
if (!hasOwnProp(this, '_weekdaysRegex')) {
[1750] Fix | Delete
computeWeekdaysParse.call(this);
[1751] Fix | Delete
}
[1752] Fix | Delete
if (isStrict) {
[1753] Fix | Delete
return this._weekdaysStrictRegex;
[1754] Fix | Delete
} else {
[1755] Fix | Delete
return this._weekdaysRegex;
[1756] Fix | Delete
}
[1757] Fix | Delete
} else {
[1758] Fix | Delete
if (!hasOwnProp(this, '_weekdaysRegex')) {
[1759] Fix | Delete
this._weekdaysRegex = defaultWeekdaysRegex;
[1760] Fix | Delete
}
[1761] Fix | Delete
return this._weekdaysStrictRegex && isStrict
[1762] Fix | Delete
? this._weekdaysStrictRegex
[1763] Fix | Delete
: this._weekdaysRegex;
[1764] Fix | Delete
}
[1765] Fix | Delete
}
[1766] Fix | Delete
[1767] Fix | Delete
function weekdaysShortRegex(isStrict) {
[1768] Fix | Delete
if (this._weekdaysParseExact) {
[1769] Fix | Delete
if (!hasOwnProp(this, '_weekdaysRegex')) {
[1770] Fix | Delete
computeWeekdaysParse.call(this);
[1771] Fix | Delete
}
[1772] Fix | Delete
if (isStrict) {
[1773] Fix | Delete
return this._weekdaysShortStrictRegex;
[1774] Fix | Delete
} else {
[1775] Fix | Delete
return this._weekdaysShortRegex;
[1776] Fix | Delete
}
[1777] Fix | Delete
} else {
[1778] Fix | Delete
if (!hasOwnProp(this, '_weekdaysShortRegex')) {
[1779] Fix | Delete
this._weekdaysShortRegex = defaultWeekdaysShortRegex;
[1780] Fix | Delete
}
[1781] Fix | Delete
return this._weekdaysShortStrictRegex && isStrict
[1782] Fix | Delete
? this._weekdaysShortStrictRegex
[1783] Fix | Delete
: this._weekdaysShortRegex;
[1784] Fix | Delete
}
[1785] Fix | Delete
}
[1786] Fix | Delete
[1787] Fix | Delete
function weekdaysMinRegex(isStrict) {
[1788] Fix | Delete
if (this._weekdaysParseExact) {
[1789] Fix | Delete
if (!hasOwnProp(this, '_weekdaysRegex')) {
[1790] Fix | Delete
computeWeekdaysParse.call(this);
[1791] Fix | Delete
}
[1792] Fix | Delete
if (isStrict) {
[1793] Fix | Delete
return this._weekdaysMinStrictRegex;
[1794] Fix | Delete
} else {
[1795] Fix | Delete
return this._weekdaysMinRegex;
[1796] Fix | Delete
}
[1797] Fix | Delete
} else {
[1798] Fix | Delete
if (!hasOwnProp(this, '_weekdaysMinRegex')) {
[1799] Fix | Delete
this._weekdaysMinRegex = defaultWeekdaysMinRegex;
[1800] Fix | Delete
}
[1801] Fix | Delete
return this._weekdaysMinStrictRegex && isStrict
[1802] Fix | Delete
? this._weekdaysMinStrictRegex
[1803] Fix | Delete
: this._weekdaysMinRegex;
[1804] Fix | Delete
}
[1805] Fix | Delete
}
[1806] Fix | Delete
[1807] Fix | Delete
function computeWeekdaysParse() {
[1808] Fix | Delete
function cmpLenRev(a, b) {
[1809] Fix | Delete
return b.length - a.length;
[1810] Fix | Delete
}
[1811] Fix | Delete
[1812] Fix | Delete
var minPieces = [],
[1813] Fix | Delete
shortPieces = [],
[1814] Fix | Delete
longPieces = [],
[1815] Fix | Delete
mixedPieces = [],
[1816] Fix | Delete
i,
[1817] Fix | Delete
mom,
[1818] Fix | Delete
minp,
[1819] Fix | Delete
shortp,
[1820] Fix | Delete
longp;
[1821] Fix | Delete
for (i = 0; i < 7; i++) {
[1822] Fix | Delete
// make the regex if we don't have it already
[1823] Fix | Delete
mom = createUTC([2000, 1]).day(i);
[1824] Fix | Delete
minp = regexEscape(this.weekdaysMin(mom, ''));
[1825] Fix | Delete
shortp = regexEscape(this.weekdaysShort(mom, ''));
[1826] Fix | Delete
longp = regexEscape(this.weekdays(mom, ''));
[1827] Fix | Delete
minPieces.push(minp);
[1828] Fix | Delete
shortPieces.push(shortp);
[1829] Fix | Delete
longPieces.push(longp);
[1830] Fix | Delete
mixedPieces.push(minp);
[1831] Fix | Delete
mixedPieces.push(shortp);
[1832] Fix | Delete
mixedPieces.push(longp);
[1833] Fix | Delete
}
[1834] Fix | Delete
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
[1835] Fix | Delete
// will match the longer piece.
[1836] Fix | Delete
minPieces.sort(cmpLenRev);
[1837] Fix | Delete
shortPieces.sort(cmpLenRev);
[1838] Fix | Delete
longPieces.sort(cmpLenRev);
[1839] Fix | Delete
mixedPieces.sort(cmpLenRev);
[1840] Fix | Delete
[1841] Fix | Delete
this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
[1842] Fix | Delete
this._weekdaysShortRegex = this._weekdaysRegex;
[1843] Fix | Delete
this._weekdaysMinRegex = this._weekdaysRegex;
[1844] Fix | Delete
[1845] Fix | Delete
this._weekdaysStrictRegex = new RegExp(
[1846] Fix | Delete
'^(' + longPieces.join('|') + ')',
[1847] Fix | Delete
'i'
[1848] Fix | Delete
);
[1849] Fix | Delete
this._weekdaysShortStrictRegex = new RegExp(
[1850] Fix | Delete
'^(' + shortPieces.join('|') + ')',
[1851] Fix | Delete
'i'
[1852] Fix | Delete
);
[1853] Fix | Delete
this._weekdaysMinStrictRegex = new RegExp(
[1854] Fix | Delete
'^(' + minPieces.join('|') + ')',
[1855] Fix | Delete
'i'
[1856] Fix | Delete
);
[1857] Fix | Delete
}
[1858] Fix | Delete
[1859] Fix | Delete
// FORMATTING
[1860] Fix | Delete
[1861] Fix | Delete
function hFormat() {
[1862] Fix | Delete
return this.hours() % 12 || 12;
[1863] Fix | Delete
}
[1864] Fix | Delete
[1865] Fix | Delete
function kFormat() {
[1866] Fix | Delete
return this.hours() || 24;
[1867] Fix | Delete
}
[1868] Fix | Delete
[1869] Fix | Delete
addFormatToken('H', ['HH', 2], 0, 'hour');
[1870] Fix | Delete
addFormatToken('h', ['hh', 2], 0, hFormat);
[1871] Fix | Delete
addFormatToken('k', ['kk', 2], 0, kFormat);
[1872] Fix | Delete
[1873] Fix | Delete
addFormatToken('hmm', 0, 0, function () {
[1874] Fix | Delete
return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
[1875] Fix | Delete
});
[1876] Fix | Delete
[1877] Fix | Delete
addFormatToken('hmmss', 0, 0, function () {
[1878] Fix | Delete
return (
[1879] Fix | Delete
'' +
[1880] Fix | Delete
hFormat.apply(this) +
[1881] Fix | Delete
zeroFill(this.minutes(), 2) +
[1882] Fix | Delete
zeroFill(this.seconds(), 2)
[1883] Fix | Delete
);
[1884] Fix | Delete
});
[1885] Fix | Delete
[1886] Fix | Delete
addFormatToken('Hmm', 0, 0, function () {
[1887] Fix | Delete
return '' + this.hours() + zeroFill(this.minutes(), 2);
[1888] Fix | Delete
});
[1889] Fix | Delete
[1890] Fix | Delete
addFormatToken('Hmmss', 0, 0, function () {
[1891] Fix | Delete
return (
[1892] Fix | Delete
'' +
[1893] Fix | Delete
this.hours() +
[1894] Fix | Delete
zeroFill(this.minutes(), 2) +
[1895] Fix | Delete
zeroFill(this.seconds(), 2)
[1896] Fix | Delete
);
[1897] Fix | Delete
});
[1898] Fix | Delete
[1899] Fix | Delete
function meridiem(token, lowercase) {
[1900] Fix | Delete
addFormatToken(token, 0, 0, function () {
[1901] Fix | Delete
return this.localeData().meridiem(
[1902] Fix | Delete
this.hours(),
[1903] Fix | Delete
this.minutes(),
[1904] Fix | Delete
lowercase
[1905] Fix | Delete
);
[1906] Fix | Delete
});
[1907] Fix | Delete
}
[1908] Fix | Delete
[1909] Fix | Delete
meridiem('a', true);
[1910] Fix | Delete
meridiem('A', false);
[1911] Fix | Delete
[1912] Fix | Delete
// ALIASES
[1913] Fix | Delete
[1914] Fix | Delete
addUnitAlias('hour', 'h');
[1915] Fix | Delete
[1916] Fix | Delete
// PRIORITY
[1917] Fix | Delete
addUnitPriority('hour', 13);
[1918] Fix | Delete
[1919] Fix | Delete
// PARSING
[1920] Fix | Delete
[1921] Fix | Delete
function matchMeridiem(isStrict, locale) {
[1922] Fix | Delete
return locale._meridiemParse;
[1923] Fix | Delete
}
[1924] Fix | Delete
[1925] Fix | Delete
addRegexToken('a', matchMeridiem);
[1926] Fix | Delete
addRegexToken('A', matchMeridiem);
[1927] Fix | Delete
addRegexToken('H', match1to2);
[1928] Fix | Delete
addRegexToken('h', match1to2);
[1929] Fix | Delete
addRegexToken('k', match1to2);
[1930] Fix | Delete
addRegexToken('HH', match1to2, match2);
[1931] Fix | Delete
addRegexToken('hh', match1to2, match2);
[1932] Fix | Delete
addRegexToken('kk', match1to2, match2);
[1933] Fix | Delete
[1934] Fix | Delete
addRegexToken('hmm', match3to4);
[1935] Fix | Delete
addRegexToken('hmmss', match5to6);
[1936] Fix | Delete
addRegexToken('Hmm', match3to4);
[1937] Fix | Delete
addRegexToken('Hmmss', match5to6);
[1938] Fix | Delete
[1939] Fix | Delete
addParseToken(['H', 'HH'], HOUR);
[1940] Fix | Delete
addParseToken(['k', 'kk'], function (input, array, config) {
[1941] Fix | Delete
var kInput = toInt(input);
[1942] Fix | Delete
array[HOUR] = kInput === 24 ? 0 : kInput;
[1943] Fix | Delete
});
[1944] Fix | Delete
addParseToken(['a', 'A'], function (input, array, config) {
[1945] Fix | Delete
config._isPm = config._locale.isPM(input);
[1946] Fix | Delete
config._meridiem = input;
[1947] Fix | Delete
});
[1948] Fix | Delete
addParseToken(['h', 'hh'], function (input, array, config) {
[1949] Fix | Delete
array[HOUR] = toInt(input);
[1950] Fix | Delete
getParsingFlags(config).bigHour = true;
[1951] Fix | Delete
});
[1952] Fix | Delete
addParseToken('hmm', function (input, array, config) {
[1953] Fix | Delete
var pos = input.length - 2;
[1954] Fix | Delete
array[HOUR] = toInt(input.substr(0, pos));
[1955] Fix | Delete
array[MINUTE] = toInt(input.substr(pos));
[1956] Fix | Delete
getParsingFlags(config).bigHour = true;
[1957] Fix | Delete
});
[1958] Fix | Delete
addParseToken('hmmss', function (input, array, config) {
[1959] Fix | Delete
var pos1 = input.length - 4,
[1960] Fix | Delete
pos2 = input.length - 2;
[1961] Fix | Delete
array[HOUR] = toInt(input.substr(0, pos1));
[1962] Fix | Delete
array[MINUTE] = toInt(input.substr(pos1, 2));
[1963] Fix | Delete
array[SECOND] = toInt(input.substr(pos2));
[1964] Fix | Delete
getParsingFlags(config).bigHour = true;
[1965] Fix | Delete
});
[1966] Fix | Delete
addParseToken('Hmm', function (input, array, config) {
[1967] Fix | Delete
var pos = input.length - 2;
[1968] Fix | Delete
array[HOUR] = toInt(input.substr(0, pos));
[1969] Fix | Delete
array[MINUTE] = toInt(input.substr(pos));
[1970] Fix | Delete
});
[1971] Fix | Delete
addParseToken('Hmmss', function (input, array, config) {
[1972] Fix | Delete
var pos1 = input.length - 4,
[1973] Fix | Delete
pos2 = input.length - 2;
[1974] Fix | Delete
array[HOUR] = toInt(input.substr(0, pos1));
[1975] Fix | Delete
array[MINUTE] = toInt(input.substr(pos1, 2));
[1976] Fix | Delete
array[SECOND] = toInt(input.substr(pos2));
[1977] Fix | Delete
});
[1978] Fix | Delete
[1979] Fix | Delete
// LOCALES
[1980] Fix | Delete
[1981] Fix | Delete
function localeIsPM(input) {
[1982] Fix | Delete
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
[1983] Fix | Delete
// Using charAt should be more compatible.
[1984] Fix | Delete
return (input + '').toLowerCase().charAt(0) === 'p';
[1985] Fix | Delete
}
[1986] Fix | Delete
[1987] Fix | Delete
var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
[1988] Fix | Delete
// Setting the hour should keep the time, because the user explicitly
[1989] Fix | Delete
// specified which hour they want. So trying to maintain the same hour (in
[1990] Fix | Delete
// a new timezone) makes sense. Adding/subtracting hours does not follow
[1991] Fix | Delete
// this rule.
[1992] Fix | Delete
getSetHour = makeGetSet('Hours', true);
[1993] Fix | Delete
[1994] Fix | Delete
function localeMeridiem(hours, minutes, isLower) {
[1995] Fix | Delete
if (hours > 11) {
[1996] Fix | Delete
return isLower ? 'pm' : 'PM';
[1997] Fix | Delete
} else {
[1998] Fix | Delete
return isLower ? 'am' : 'AM';
[1999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function