diff --git a/.gitignore b/.gitignore index e246a0165..7beb8cc46 100644 --- a/.gitignore +++ b/.gitignore @@ -13,12 +13,13 @@ yarn.lock coverage # build -/locale -/plugin -/dayjs.min.js -/esm -/index.d.ts -locale.json +# ccmmented out for installation from github +# /locale +# /plugin +# /dayjs.min.js +# /esm +# /index.d.ts +# locale.json #dev demo.js diff --git a/dayjs.min.js b/dayjs.min.js new file mode 100644 index 000000000..0b96caa58 --- /dev/null +++ b/dayjs.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){"use strict";function t(t,e){for(var n=0;n=e?t:""+Array(e+1-i.length).join(n)+t},g={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),i=Math.floor(n/60),r=n%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(r,2,"0")},m:function t(e,n){if(e.date()1)return t(c[0])}else{var a=e.name;S[a]=e,r=a}return!i&&r&&(M=r),r||!i&&M},w=function(t,e){if(p(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new k(n)},b=g;b.l=O,b.i=p,b.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var k=function(){function _(t){this.$L=O(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[D]=!0}var m,g,M,p=_.prototype;return p.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(v);if(i){var r=i[2]-1||0,s=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(e)}(t),this.init()},p.init=function(){this.cached_y=void 0,this.cached_M=void 0,this.cached_D=void 0,this.cached_W=void 0,this.cached_H=void 0,this.cached_m=void 0,this.cached_s=void 0,this.cached_ms=void 0,this.cached_timezoneOffset=void 0},p.$utils=function(){return b},p.isValid=function(){return!(this.$d.toString()===$)},p.isSame=function(t,e){var n=w(t);return void 0===e?!(!this.isValid()||!n.isValid())&&this.toISOString()===n.toISOString():this.startOf(e)<=n&&n<=this.endOf(e)},p.isAfter=function(t,e){if(void 0===e){var n=w(t);return!(!this.isValid()||!n.isValid())&&this.toISOString()>n.toISOString()}return w(t) + +export = dayjs; + +declare function dayjs (date?: dayjs.ConfigType): dayjs.Dayjs + +declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, strict?: boolean): dayjs.Dayjs + +declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, locale?: string, strict?: boolean): dayjs.Dayjs + +declare namespace dayjs { + interface ConfigTypeMap { + default: string | number | Date | Dayjs | null | undefined + } + + export type ConfigType = ConfigTypeMap[keyof ConfigTypeMap] + + export interface FormatObject { locale?: string, format?: string, utc?: boolean } + + export type OptionType = FormatObject | string | string[] + + export type UnitTypeShort = 'd' | 'D' | 'M' | 'y' | 'h' | 'm' | 's' | 'ms' + + export type UnitTypeLong = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | 'date' + + export type UnitTypeLongPlural = 'milliseconds' | 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'years' | 'dates' + + export type UnitType = UnitTypeLong | UnitTypeLongPlural | UnitTypeShort; + + export type OpUnitType = UnitType | "week" | "weeks" | 'w'; + export type QUnitType = UnitType | "quarter" | "quarters" | 'Q'; + export type ManipulateType = Exclude; + class Dayjs { + constructor (config?: ConfigType) + /** + * All Day.js objects are immutable. Still, `dayjs#clone` can create a clone of the current object if you need one. + * ``` + * dayjs().clone()// => Dayjs + * dayjs(dayjs('2019-01-25')) // passing a Dayjs object to a constructor will also clone it + * ``` + * Docs: https://day.js.org/docs/en/parse/dayjs-clone + */ + clone(): Dayjs + /** + * This returns a `boolean` indicating whether the Day.js object contains a valid date or not. + * ``` + * dayjs().isValid()// => boolean + * ``` + * Docs: https://day.js.org/docs/en/parse/is-valid + */ + isValid(): boolean + /** + * Get the year. + * ``` + * dayjs().year()// => 2020 + * ``` + * Docs: https://day.js.org/docs/en/get-set/year + */ + year(): number + /** + * Set the year. + * ``` + * dayjs().year(2000)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/year + */ + year(value: number): Dayjs + /** + * Get the month. + * + * Months are zero indexed, so January is month 0. + * ``` + * dayjs().month()// => 0-11 + * ``` + * Docs: https://day.js.org/docs/en/get-set/month + */ + month(): number + /** + * Set the month. + * + * Months are zero indexed, so January is month 0. + * + * Accepts numbers from 0 to 11. If the range is exceeded, it will bubble up to the next year. + * ``` + * dayjs().month(0)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/month + */ + month(value: number): Dayjs + /** + * Get the date of the month. + * ``` + * dayjs().date()// => 1-31 + * ``` + * Docs: https://day.js.org/docs/en/get-set/date + */ + date(): number + /** + * Set the date of the month. + * + * Accepts numbers from 1 to 31. If the range is exceeded, it will bubble up to the next months. + * ``` + * dayjs().date(1)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/date + */ + date(value: number): Dayjs + /** + * Get the day of the week. + * + * Returns numbers from 0 (Sunday) to 6 (Saturday). + * ``` + * dayjs().day()// 0-6 + * ``` + * Docs: https://day.js.org/docs/en/get-set/day + */ + day(): 0 | 1 | 2 | 3 | 4 | 5 | 6 + /** + * Set the day of the week. + * + * Accepts numbers from 0 (Sunday) to 6 (Saturday). If the range is exceeded, it will bubble up to next weeks. + * ``` + * dayjs().day(0)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/day + */ + day(value: number): Dayjs + /** + * Get the hour. + * ``` + * dayjs().hour()// => 0-23 + * ``` + * Docs: https://day.js.org/docs/en/get-set/hour + */ + hour(): number + /** + * Set the hour. + * + * Accepts numbers from 0 to 23. If the range is exceeded, it will bubble up to the next day. + * ``` + * dayjs().hour(12)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/hour + */ + hour(value: number): Dayjs + /** + * Get the minutes. + * ``` + * dayjs().minute()// => 0-59 + * ``` + * Docs: https://day.js.org/docs/en/get-set/minute + */ + minute(): number + /** + * Set the minutes. + * + * Accepts numbers from 0 to 59. If the range is exceeded, it will bubble up to the next hour. + * ``` + * dayjs().minute(59)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/minute + */ + minute(value: number): Dayjs + /** + * Get the seconds. + * ``` + * dayjs().second()// => 0-59 + * ``` + * Docs: https://day.js.org/docs/en/get-set/second + */ + second(): number + /** + * Set the seconds. + * + * Accepts numbers from 0 to 59. If the range is exceeded, it will bubble up to the next minutes. + * ``` + * dayjs().second(1)// Dayjs + * ``` + */ + second(value: number): Dayjs + /** + * Get the milliseconds. + * ``` + * dayjs().millisecond()// => 0-999 + * ``` + * Docs: https://day.js.org/docs/en/get-set/millisecond + */ + millisecond(): number + /** + * Set the milliseconds. + * + * Accepts numbers from 0 to 999. If the range is exceeded, it will bubble up to the next seconds. + * ``` + * dayjs().millisecond(1)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/millisecond + */ + millisecond(value: number): Dayjs + /** + * Generic setter, accepting unit as first argument, and value as second, returns a new instance with the applied changes. + * + * In general: + * ``` + * dayjs().set(unit, value) === dayjs()[unit](value) + * ``` + * Units are case insensitive, and support plural and short forms. + * ``` + * dayjs().set('date', 1) + * dayjs().set('month', 3) // April + * dayjs().set('second', 30) + * ``` + * Docs: https://day.js.org/docs/en/get-set/set + */ + set(unit: UnitType, value: number): Dayjs + /** + * String getter, returns the corresponding information getting from Day.js object. + * + * In general: + * ``` + * dayjs().get(unit) === dayjs()[unit]() + * ``` + * Units are case insensitive, and support plural and short forms. + * ``` + * dayjs().get('year') + * dayjs().get('month') // start 0 + * dayjs().get('date') + * ``` + * Docs: https://day.js.org/docs/en/get-set/get + */ + get(unit: UnitType): number + /** + * Returns a cloned Day.js object with a specified amount of time added. + * ``` + * dayjs().add(7, 'day')// => Dayjs + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/manipulate/add + */ + add(value: number, unit?: ManipulateType): Dayjs + /** + * Returns a cloned Day.js object with a specified amount of time subtracted. + * ``` + * dayjs().subtract(7, 'year')// => Dayjs + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/manipulate/subtract + */ + subtract(value: number, unit?: ManipulateType): Dayjs + /** + * Returns a cloned Day.js object and set it to the start of a unit of time. + * ``` + * dayjs().startOf('year')// => Dayjs + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/manipulate/start-of + */ + startOf(unit: OpUnitType): Dayjs + /** + * Returns a cloned Day.js object and set it to the end of a unit of time. + * ``` + * dayjs().endOf('month')// => Dayjs + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/manipulate/end-of + */ + endOf(unit: OpUnitType): Dayjs + /** + * Get the formatted date according to the string of tokens passed in. + * + * To escape characters, wrap them in square brackets (e.g. [MM]). + * ``` + * dayjs().format()// => current date in ISO8601, without fraction seconds e.g. '2020-04-02T08:02:17-05:00' + * dayjs('2019-01-25').format('[YYYYescape] YYYY-MM-DDTHH:mm:ssZ[Z]')// 'YYYYescape 2019-01-25T00:00:00-02:00Z' + * dayjs('2019-01-25').format('DD/MM/YYYY') // '25/01/2019' + * ``` + * Docs: https://day.js.org/docs/en/display/format + */ + format(template?: string): string + /** + * This indicates the difference between two date-time in the specified unit. + * + * To get the difference in milliseconds, use `dayjs#diff` + * ``` + * const date1 = dayjs('2019-01-25') + * const date2 = dayjs('2018-06-05') + * date1.diff(date2) // 20214000000 default milliseconds + * date1.diff() // milliseconds to current time + * ``` + * + * To get the difference in another unit of measurement, pass that measurement as the second argument. + * ``` + * const date1 = dayjs('2019-01-25') + * date1.diff('2018-06-05', 'month') // 7 + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/display/difference + */ + diff(date?: ConfigType, unit?: QUnitType | OpUnitType, float?: boolean): number + /** + * This returns the number of **milliseconds** since the Unix Epoch of the Day.js object. + * ``` + * dayjs('2019-01-25').valueOf() // 1548381600000 + * +dayjs(1548381600000) // 1548381600000 + * ``` + * To get a Unix timestamp (the number of seconds since the epoch) from a Day.js object, you should use Unix Timestamp `dayjs#unix()`. + * + * Docs: https://day.js.org/docs/en/display/unix-timestamp-milliseconds + */ + valueOf(): number + /** + * This returns the Unix timestamp (the number of **seconds** since the Unix Epoch) of the Day.js object. + * ``` + * dayjs('2019-01-25').unix() // 1548381600 + * ``` + * This value is floored to the nearest second, and does not include a milliseconds component. + * + * Docs: https://day.js.org/docs/en/display/unix-timestamp + */ + unix(): number + /** + * Get the number of days in the current month. + * ``` + * dayjs('2019-01-25').daysInMonth() // 31 + * ``` + * Docs: https://day.js.org/docs/en/display/days-in-month + */ + daysInMonth(): number + /** + * To get a copy of the native `Date` object parsed from the Day.js object use `dayjs#toDate`. + * ``` + * dayjs('2019-01-25').toDate()// => Date + * ``` + */ + toDate(): Date + /** + * To serialize as an ISO 8601 string. + * ``` + * dayjs('2019-01-25').toJSON() // '2019-01-25T02:00:00.000Z' + * ``` + * Docs: https://day.js.org/docs/en/display/as-json + */ + toJSON(): string + /** + * To format as an ISO 8601 string. + * ``` + * dayjs('2019-01-25').toISOString() // '2019-01-25T02:00:00.000Z' + * ``` + * Docs: https://day.js.org/docs/en/display/as-iso-string + */ + toISOString(): string + /** + * Returns a string representation of the date. + * ``` + * dayjs('2019-01-25').toString() // 'Fri, 25 Jan 2019 02:00:00 GMT' + * ``` + * Docs: https://day.js.org/docs/en/display/as-string + */ + toString(): string + /** + * Get the UTC offset in minutes. + * ``` + * dayjs().utcOffset() + * ``` + * Docs: https://day.js.org/docs/en/manipulate/utc-offset + */ + utcOffset(): number + /** + * This indicates whether the Day.js object is before the other supplied date-time. + * ``` + * dayjs().isBefore(dayjs('2011-01-01')) // default milliseconds + * ``` + * If you want to limit the granularity to a unit other than milliseconds, pass it as the second parameter. + * ``` + * dayjs().isBefore('2011-01-01', 'year')// => boolean + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/query/is-before + */ + isBefore(date?: ConfigType, unit?: OpUnitType): boolean + /** + * This indicates whether the Day.js object is the same as the other supplied date-time. + * ``` + * dayjs().isSame(dayjs('2011-01-01')) // default milliseconds + * ``` + * If you want to limit the granularity to a unit other than milliseconds, pass it as the second parameter. + * ``` + * dayjs().isSame('2011-01-01', 'year')// => boolean + * ``` + * Docs: https://day.js.org/docs/en/query/is-same + */ + isSame(date?: ConfigType, unit?: OpUnitType): boolean + /** + * This indicates whether the Day.js object is after the other supplied date-time. + * ``` + * dayjs().isAfter(dayjs('2011-01-01')) // default milliseconds + * ``` + * If you want to limit the granularity to a unit other than milliseconds, pass it as the second parameter. + * ``` + * dayjs().isAfter('2011-01-01', 'year')// => boolean + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/query/is-after + */ + isAfter(date?: ConfigType, unit?: OpUnitType): boolean + + locale(): string + + locale(preset: string | ILocale, object?: Partial): Dayjs + } + + export type PluginFunc = (option: T, c: typeof Dayjs, d: typeof dayjs) => void + + export function extend(plugin: PluginFunc, option?: T): Dayjs + + export function locale(preset?: string | ILocale, object?: Partial, isLocal?: boolean): string + + export function isDayjs(d: any): d is Dayjs + + export function unix(t: number): Dayjs + + const Ls : { [key: string] : ILocale } +} diff --git a/esm/index.js b/esm/index.js new file mode 100644 index 000000000..e53ad5767 --- /dev/null +++ b/esm/index.js @@ -0,0 +1,685 @@ +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } + +import * as C from './constant'; +import en from './locale/en'; +import U from './utils'; +var L = 'en'; // global locale + +var Ls = {}; // global loaded locale + +Ls[L] = en; +var IS_DAYJS = '$isDayjsObject'; // eslint-disable-next-line no-use-before-define + +var isDayjs = function isDayjs(d) { + return d instanceof Dayjs || !!(d && d[IS_DAYJS]); +}; + +var parseLocale = function parseLocale(preset, object, isLocal) { + var l; + if (!preset) return L; + + if (typeof preset === 'string') { + var presetLower = preset.toLowerCase(); + + if (Ls[presetLower]) { + l = presetLower; + } + + if (object) { + Ls[presetLower] = object; + l = presetLower; + } + + var presetSplit = preset.split('-'); + + if (!l && presetSplit.length > 1) { + return parseLocale(presetSplit[0]); + } + } else { + var name = preset.name; + Ls[name] = preset; + l = name; + } + + if (!isLocal && l) L = l; + return l || !isLocal && L; +}; + +var dayjs = function dayjs(date, c) { + if (isDayjs(date)) { + return date.clone(); + } // eslint-disable-next-line no-nested-ternary + + + var cfg = typeof c === 'object' ? c : {}; + cfg.date = date; + cfg.args = arguments; // eslint-disable-line prefer-rest-params + + return new Dayjs(cfg); // eslint-disable-line no-use-before-define +}; + +var wrapper = function wrapper(date, instance) { + return dayjs(date, { + locale: instance.$L, + utc: instance.$u, + x: instance.$x, + $offset: instance.$offset // todo: refactor; do not use this.$offset in you code + + }); +}; + +var Utils = U; // for plugin use + +Utils.l = parseLocale; +Utils.i = isDayjs; +Utils.w = wrapper; + +var parseDate = function parseDate(cfg) { + var date = cfg.date, + utc = cfg.utc; + if (date === null) return new Date(NaN); // null is invalid + + if (Utils.u(date)) return new Date(); // today + + if (date instanceof Date) return new Date(date); + + if (typeof date === 'string' && !/Z$/i.test(date)) { + var d = date.match(C.REGEX_PARSE); + + if (d) { + var m = d[2] - 1 || 0; + var ms = (d[7] || '0').substring(0, 3); + + if (utc) { + return new Date(Date.UTC(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms)); + } + + return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms); + } + } + + return new Date(date); // everything else +}; + +var Dayjs = /*#__PURE__*/function () { + function Dayjs(cfg) { + this.$L = parseLocale(cfg.locale, null, true); + this.parse(cfg); // for plugin + + this.$x = this.$x || cfg.x || {}; + this[IS_DAYJS] = true; + } + + var _proto = Dayjs.prototype; + + _proto.parse = function parse(cfg) { + this.$d = parseDate(cfg); + this.init(); + } // Based onhttps://github.com/facebook/hermes/issues/930#issuecomment-2027601318 + ; + + _proto.init = function init() { + this.cached_y = undefined; + this.cached_M = undefined; + this.cached_D = undefined; + this.cached_W = undefined; + this.cached_H = undefined; + this.cached_m = undefined; + this.cached_s = undefined; + this.cached_ms = undefined; + this.cached_timezoneOffset = undefined; + }; + + // eslint-disable-next-line class-methods-use-this + _proto.$utils = function $utils() { + return Utils; + }; + + _proto.isValid = function isValid() { + return !(this.$d.toString() === C.INVALID_DATE_STRING); + }; + + _proto.isSame = function isSame(that, units) { + var other = dayjs(that); + + if (units === undefined) { + if (!this.isValid() || !other.isValid()) { + return false; + } + + return this.toISOString() === other.toISOString(); + } + + return this.startOf(units) <= other && other <= this.endOf(units); + }; + + _proto.isAfter = function isAfter(that, units) { + if (units === undefined) { + var other = dayjs(that); + + if (!this.isValid() || !other.isValid()) { + return false; + } + + return this.toISOString() > other.toISOString(); + } + + return dayjs(that) < this.startOf(units); + }; + + _proto.isBefore = function isBefore(that, units) { + if (units === undefined) { + var other = dayjs(that); + + if (!this.isValid() || !other.isValid()) { + return false; + } + + return this.toISOString() < other.toISOString(); + } + + return this.endOf(units) < dayjs(that); + }; + + _proto.$g = function $g(input, get, set) { + if (Utils.u(input)) return this[get]; + return this.set(set, input); + }; + + _proto.unix = function unix() { + return Math.floor(this.valueOf() / 1000); + }; + + _proto.valueOf = function valueOf() { + // timezone(hour) * 60 * 60 * 1000 => ms + return this.$d.getTime(); + }; + + _proto.startOf = function startOf(units, _startOf) { + var _this = this; + + // startOf -> endOf + var isStartOf = !Utils.u(_startOf) ? _startOf : true; + var unit = Utils.p(units); + + var instanceFactory = function instanceFactory(d, m) { + var ins = Utils.w(_this.$u ? Date.UTC(_this.$y, m, d) : new Date(_this.$y, m, d), _this); + return isStartOf ? ins : ins.endOf(C.D); + }; + + var instanceFactorySet = function instanceFactorySet(method, slice) { + var argumentStart = [0, 0, 0, 0]; + var argumentEnd = [23, 59, 59, 999]; + return Utils.w(_this.toDate()[method].apply( // eslint-disable-line prefer-spread + _this.toDate('s'), (isStartOf ? argumentStart : argumentEnd).slice(slice)), _this); + }; + + var $W = this.$W, + $M = this.$M, + $D = this.$D; + var utcPad = "set" + (this.$u ? 'UTC' : ''); + + switch (unit) { + case C.Y: + return isStartOf ? instanceFactory(1, 0) : instanceFactory(31, 11); + + case C.M: + return isStartOf ? instanceFactory(1, $M) : instanceFactory(0, $M + 1); + + case C.W: + { + var weekStart = this.$locale().weekStart || 0; + var gap = ($W < weekStart ? $W + 7 : $W) - weekStart; + return instanceFactory(isStartOf ? $D - gap : $D + (6 - gap), $M); + } + + case C.D: + case C.DATE: + return instanceFactorySet(utcPad + "Hours", 0); + + case C.H: + return instanceFactorySet(utcPad + "Minutes", 1); + + case C.MIN: + return instanceFactorySet(utcPad + "Seconds", 2); + + case C.S: + return instanceFactorySet(utcPad + "Milliseconds", 3); + + default: + return this.clone(); + } + }; + + _proto.endOf = function endOf(arg) { + return this.startOf(arg, false); + }; + + _proto.$set = function $set(units, _int) { + var _C$D$C$DATE$C$M$C$Y$C; + + // private set + var unit = Utils.p(units); + var utcPad = "set" + (this.$u ? 'UTC' : ''); + var name = (_C$D$C$DATE$C$M$C$Y$C = {}, _C$D$C$DATE$C$M$C$Y$C[C.D] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[C.DATE] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[C.M] = utcPad + "Month", _C$D$C$DATE$C$M$C$Y$C[C.Y] = utcPad + "FullYear", _C$D$C$DATE$C$M$C$Y$C[C.H] = utcPad + "Hours", _C$D$C$DATE$C$M$C$Y$C[C.MIN] = utcPad + "Minutes", _C$D$C$DATE$C$M$C$Y$C[C.S] = utcPad + "Seconds", _C$D$C$DATE$C$M$C$Y$C[C.MS] = utcPad + "Milliseconds", _C$D$C$DATE$C$M$C$Y$C)[unit]; + var arg = unit === C.D ? this.$D + (_int - this.$W) : _int; + + if (unit === C.M || unit === C.Y) { + // clone is for badMutable plugin + var date = this.clone().set(C.DATE, 1); + date.$d[name](arg); + date.init(); + this.$d = date.set(C.DATE, Math.min(this.$D, date.daysInMonth())).$d; + } else if (name) this.$d[name](arg); + + this.init(); + return this; + }; + + _proto.set = function set(string, _int2) { + return this.clone().$set(string, _int2); + }; + + _proto.get = function get(unit) { + return this[Utils.p(unit)](); + }; + + _proto.add = function add(number, units) { + var _this2 = this, + _C$MIN$C$H$C$S$unit; + + number = Number(number); // eslint-disable-line no-param-reassign + + var unit = Utils.p(units); + + var instanceFactorySet = function instanceFactorySet(n) { + var d = dayjs(_this2); + return Utils.w(d.date(d.date() + Math.round(n * number)), _this2); + }; + + if (unit === C.M) { + return this.set(C.M, this.$M + number); + } + + if (unit === C.Y) { + return this.set(C.Y, this.$y + number); + } + + if (unit === C.D) { + return instanceFactorySet(1); + } + + if (unit === C.W) { + return instanceFactorySet(7); + } + + var step = (_C$MIN$C$H$C$S$unit = {}, _C$MIN$C$H$C$S$unit[C.MIN] = C.MILLISECONDS_A_MINUTE, _C$MIN$C$H$C$S$unit[C.H] = C.MILLISECONDS_A_HOUR, _C$MIN$C$H$C$S$unit[C.S] = C.MILLISECONDS_A_SECOND, _C$MIN$C$H$C$S$unit)[unit] || 1; // ms + + var nextTimeStamp = this.$d.getTime() + number * step; + return Utils.w(nextTimeStamp, this); + }; + + _proto.subtract = function subtract(number, string) { + return this.add(number * -1, string); + }; + + _proto.format = function format(formatStr) { + var _this3 = this; + + var locale = this.$locale(); + if (!this.isValid()) return locale.invalidDate || C.INVALID_DATE_STRING; + var str = formatStr || C.FORMAT_DEFAULT; + var zoneStr = Utils.z(this); + var $H = this.$H, + $m = this.$m, + $M = this.$M; + var weekdays = locale.weekdays, + months = locale.months, + meridiem = locale.meridiem; + + var getShort = function getShort(arr, index, full, length) { + return arr && (arr[index] || arr(_this3, str)) || full[index].slice(0, length); + }; + + var get$H = function get$H(num) { + return Utils.s($H % 12 || 12, num, '0'); + }; + + var meridiemFunc = meridiem || function (hour, minute, isLowercase) { + var m = hour < 12 ? 'AM' : 'PM'; + return isLowercase ? m.toLowerCase() : m; + }; + + var matches = function matches(match) { + switch (match) { + case 'YY': + return String(_this3.$y).slice(-2); + + case 'YYYY': + return Utils.s(_this3.$y, 4, '0'); + + case 'M': + return $M + 1; + + case 'MM': + return Utils.s($M + 1, 2, '0'); + + case 'MMM': + return getShort(locale.monthsShort, $M, months, 3); + + case 'MMMM': + return getShort(months, $M); + + case 'D': + return _this3.$D; + + case 'DD': + return Utils.s(_this3.$D, 2, '0'); + + case 'd': + return String(_this3.$W); + + case 'dd': + return getShort(locale.weekdaysMin, _this3.$W, weekdays, 2); + + case 'ddd': + return getShort(locale.weekdaysShort, _this3.$W, weekdays, 3); + + case 'dddd': + return weekdays[_this3.$W]; + + case 'H': + return String($H); + + case 'HH': + return Utils.s($H, 2, '0'); + + case 'h': + return get$H(1); + + case 'hh': + return get$H(2); + + case 'a': + return meridiemFunc($H, $m, true); + + case 'A': + return meridiemFunc($H, $m, false); + + case 'm': + return String($m); + + case 'mm': + return Utils.s($m, 2, '0'); + + case 's': + return String(_this3.$s); + + case 'ss': + return Utils.s(_this3.$s, 2, '0'); + + case 'SSS': + return Utils.s(_this3.$ms, 3, '0'); + + case 'Z': + return zoneStr; + // 'ZZ' logic below + + default: + break; + } + + return null; + }; + + return str.replace(C.REGEX_FORMAT, function (match, $1) { + return $1 || matches(match) || zoneStr.replace(':', ''); + }); // 'ZZ' + }; + + _proto.utcOffset = function utcOffset() { + // Because a bug at FF24, we're rounding the timezone offset around 15 minutes + // https://github.com/moment/moment/pull/1871 + return -Math.round(this.$d.getTimezoneOffset() / 15) * 15; + }; + + _proto.diff = function diff(input, units, _float) { + var _this4 = this; + + var unit = Utils.p(units); + var that = dayjs(input); + var zoneDelta = (that.utcOffset() - this.utcOffset()) * C.MILLISECONDS_A_MINUTE; + var diff = this - that; + + var getMonth = function getMonth() { + return Utils.m(_this4, that); + }; + + var result; + + switch (unit) { + case C.Y: + result = getMonth() / 12; + break; + + case C.M: + result = getMonth(); + break; + + case C.Q: + result = getMonth() / 3; + break; + + case C.W: + result = (diff - zoneDelta) / C.MILLISECONDS_A_WEEK; + break; + + case C.D: + result = (diff - zoneDelta) / C.MILLISECONDS_A_DAY; + break; + + case C.H: + result = diff / C.MILLISECONDS_A_HOUR; + break; + + case C.MIN: + result = diff / C.MILLISECONDS_A_MINUTE; + break; + + case C.S: + result = diff / C.MILLISECONDS_A_SECOND; + break; + + default: + result = diff; // milliseconds + + break; + } + + return _float ? result : Utils.a(result); + }; + + _proto.daysInMonth = function daysInMonth() { + return this.endOf(C.M).$D; + }; + + _proto.$locale = function $locale() { + // get locale object + return Ls[this.$L]; + }; + + _proto.locale = function locale(preset, object) { + if (!preset) return this.$L; + var that = this.clone(); + var nextLocaleName = parseLocale(preset, object, true); + if (nextLocaleName) that.$L = nextLocaleName; + return that; + }; + + _proto.clone = function clone() { + return Utils.w(this.$d, this); + }; + + _proto.toDate = function toDate() { + return new Date(this.valueOf()); + }; + + _proto.toJSON = function toJSON() { + return this.isValid() ? this.toISOString() : null; + }; + + _proto.toISOString = function toISOString() { + // ie 8 return + // new Dayjs(this.valueOf() + this.$d.getTimezoneOffset() * 60000) + // .format('YYYY-MM-DDTHH:mm:ss.SSS[Z]') + return this.$d.toISOString(); + }; + + _proto.toString = function toString() { + return this.$d.toUTCString(); + }; + + _createClass(Dayjs, [{ + key: "$y", + get: function get() { + if (this.cached_y === undefined) { + this.cached_y = this.$d.getFullYear(); + } + + return this.cached_y; + }, + set: function set(value) { + this.cached_y = value; + } + }, { + key: "$M", + get: function get() { + if (this.cached_M === undefined) { + this.cached_M = this.$d.getMonth(); + } + + return this.cached_M; + }, + set: function set(value) { + this.cached_M = value; + } + }, { + key: "$D", + get: function get() { + if (this.cached_D === undefined) { + this.cached_D = this.$d.getDate(); + } + + return this.cached_D; + }, + set: function set(value) { + this.cached_D = value; + } + }, { + key: "$W", + get: function get() { + if (this.cached_W === undefined) { + this.cached_W = this.$d.getDay(); + } + + return this.cached_W; + }, + set: function set(value) { + this.cached_W = value; + } + }, { + key: "$H", + get: function get() { + if (this.cached_H === undefined) { + this.cached_H = this.$d.getHours(); + } + + return this.cached_H; + }, + set: function set(value) { + this.cached_H = value; + } + }, { + key: "$m", + get: function get() { + if (this.cached_m === undefined) { + this.cached_m = this.$d.getMinutes(); + } + + return this.cached_m; + }, + set: function set(value) { + this.cached_m = value; + } + }, { + key: "$s", + get: function get() { + if (this.cached_s === undefined) { + this.cached_s = this.$d.getSeconds(); + } + + return this.cached_s; + }, + set: function set(value) { + this.cached_s = value; + } + }, { + key: "$ms", + get: function get() { + if (this.cached_ms === undefined) { + this.cached_ms = this.$d.getMilliseconds(); + } + + return this.cached_ms; + }, + set: function set(value) { + this.cached_ms = value; + } + }, { + key: "$timezoneOffset", + get: function get() { + if (this.cached_timezoneOffset === undefined) { + this.cached_timezoneOffset = this.$d.getTimezoneOffset(); + } + + return this.cached_timezoneOffset; + }, + set: function set(value) { + this.cached_timezoneOffset = value; + } + }]); + + return Dayjs; +}(); + +var proto = Dayjs.prototype; +dayjs.prototype = proto; +[['$ms', C.MS], ['$s', C.S], ['$m', C.MIN], ['$H', C.H], ['$W', C.D], ['$M', C.M], ['$y', C.Y], ['$D', C.DATE]].forEach(function (g) { + proto[g[1]] = function (input) { + return this.$g(input, g[0], g[1]); + }; +}); + +dayjs.extend = function (plugin, option) { + if (!plugin.$i) { + // install plugin only once + plugin(option, Dayjs, dayjs); + plugin.$i = true; + } + + return dayjs; +}; + +dayjs.locale = parseLocale; +dayjs.isDayjs = isDayjs; + +dayjs.unix = function (timestamp) { + return dayjs(timestamp * 1e3); +}; + +dayjs.en = Ls[L]; +dayjs.Ls = Ls; +dayjs.p = {}; +export default dayjs; \ No newline at end of file diff --git a/esm/locale/af.js b/esm/locale/af.js new file mode 100644 index 000000000..ce0c2855f --- /dev/null +++ b/esm/locale/af.js @@ -0,0 +1,39 @@ +// Afrikaans [af] +import dayjs from '../index'; +var locale = { + name: 'af', + weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'), + months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'), + weekStart: 1, + weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), + monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), + weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'oor %s', + past: '%s gelede', + s: "'n paar sekondes", + m: "'n minuut", + mm: '%d minute', + h: "'n uur", + hh: '%d ure', + d: "'n dag", + dd: '%d dae', + M: "'n maand", + MM: '%d maande', + y: "'n jaar", + yy: '%d jaar' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/am.js b/esm/locale/am.js new file mode 100644 index 000000000..cf25510c7 --- /dev/null +++ b/esm/locale/am.js @@ -0,0 +1,40 @@ +// Amharic [am] +import dayjs from '../index'; +var locale = { + name: 'am', + weekdays: 'እሑድ_ሰኞ_ማክሰኞ_ረቡዕ_ሐሙስ_አርብ_ቅዳሜ'.split('_'), + weekdaysShort: 'እሑድ_ሰኞ_ማክሰ_ረቡዕ_ሐሙስ_አርብ_ቅዳሜ'.split('_'), + weekdaysMin: 'እሑ_ሰኞ_ማክ_ረቡ_ሐሙ_አር_ቅዳ'.split('_'), + months: 'ጃንዋሪ_ፌብሯሪ_ማርች_ኤፕሪል_ሜይ_ጁን_ጁላይ_ኦገስት_ሴፕቴምበር_ኦክቶበር_ኖቬምበር_ዲሴምበር'.split('_'), + monthsShort: 'ጃንዋ_ፌብሯ_ማርች_ኤፕሪ_ሜይ_ጁን_ጁላይ_ኦገስ_ሴፕቴ_ኦክቶ_ኖቬም_ዲሴም'.split('_'), + weekStart: 1, + yearStart: 4, + relativeTime: { + future: 'በ%s', + past: '%s በፊት', + s: 'ጥቂት ሰከንዶች', + m: 'አንድ ደቂቃ', + mm: '%d ደቂቃዎች', + h: 'አንድ ሰዓት', + hh: '%d ሰዓታት', + d: 'አንድ ቀን', + dd: '%d ቀናት', + M: 'አንድ ወር', + MM: '%d ወራት', + y: 'አንድ ዓመት', + yy: '%d ዓመታት' + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'MMMM D ፣ YYYY', + LLL: 'MMMM D ፣ YYYY HH:mm', + LLLL: 'dddd ፣ MMMM D ፣ YYYY HH:mm' + }, + ordinal: function ordinal(n) { + return n + "\u129B"; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ar-dz.js b/esm/locale/ar-dz.js new file mode 100644 index 000000000..3ecc04fca --- /dev/null +++ b/esm/locale/ar-dz.js @@ -0,0 +1,41 @@ +// Arabic (Algeria) [ar-dz] +import dayjs from '../index'; +var locale = { + name: 'ar-dz', + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdaysMin: 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + meridiem: function meridiem(hour) { + return hour > 12 ? 'م' : 'ص'; + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ar-iq.js b/esm/locale/ar-iq.js new file mode 100644 index 000000000..dfe31bf22 --- /dev/null +++ b/esm/locale/ar-iq.js @@ -0,0 +1,42 @@ +// Arabic (Iraq) [ar-iq] +import dayjs from '../index'; +var locale = { + name: 'ar-iq', + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + months: 'كانون الثاني_شباط_آذار_نيسان_أيار_حزيران_تموز_آب_أيلول_تشرين الأول_ تشرين الثاني_كانون الأول'.split('_'), + weekStart: 1, + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + monthsShort: 'كانون الثاني_شباط_آذار_نيسان_أيار_حزيران_تموز_آب_أيلول_تشرين الأول_ تشرين الثاني_كانون الأول'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + meridiem: function meridiem(hour) { + return hour > 12 ? 'م' : 'ص'; + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ar-kw.js b/esm/locale/ar-kw.js new file mode 100644 index 000000000..73bf90a7a --- /dev/null +++ b/esm/locale/ar-kw.js @@ -0,0 +1,41 @@ +// Arabic (Kuwait) [ar-kw] +import dayjs from '../index'; +var locale = { + name: 'ar-kw', + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + meridiem: function meridiem(hour) { + return hour > 12 ? 'م' : 'ص'; + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ar-ly.js b/esm/locale/ar-ly.js new file mode 100644 index 000000000..5caa86980 --- /dev/null +++ b/esm/locale/ar-ly.js @@ -0,0 +1,27 @@ +// Arabic (Lybia) [ar-ly] +import dayjs from '../index'; +var locale = { + name: 'ar-ly', + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekStart: 6, + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + meridiem: function meridiem(hour) { + return hour > 12 ? 'م' : 'ص'; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/‏M/‏YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ar-ma.js b/esm/locale/ar-ma.js new file mode 100644 index 000000000..ed6dfef07 --- /dev/null +++ b/esm/locale/ar-ma.js @@ -0,0 +1,42 @@ +// Arabic (Morocco) [ar-ma] +import dayjs from '../index'; +var locale = { + name: 'ar-ma', + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + weekStart: 6, + weekdaysShort: 'احد_إثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + meridiem: function meridiem(hour) { + return hour > 12 ? 'م' : 'ص'; + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ar-sa.js b/esm/locale/ar-sa.js new file mode 100644 index 000000000..8eb9687e1 --- /dev/null +++ b/esm/locale/ar-sa.js @@ -0,0 +1,41 @@ +// Arabic (Saudi Arabia) [ar-sa] +import dayjs from '../index'; +var locale = { + name: 'ar-sa', + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + meridiem: function meridiem(hour) { + return hour > 12 ? 'م' : 'ص'; + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ar-tn.js b/esm/locale/ar-tn.js new file mode 100644 index 000000000..3c1f2b01d --- /dev/null +++ b/esm/locale/ar-tn.js @@ -0,0 +1,42 @@ +// Arabic (Tunisia) [ar-tn] +import dayjs from '../index'; +var locale = { + name: 'ar-tn', + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekStart: 1, + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + meridiem: function meridiem(hour) { + return hour > 12 ? 'م' : 'ص'; + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ar.js b/esm/locale/ar.js new file mode 100644 index 000000000..78b99b8bf --- /dev/null +++ b/esm/locale/ar.js @@ -0,0 +1,77 @@ +// Arabic [ar] +import dayjs from '../index'; +var months = 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'); +var symbolMap = { + 1: '١', + 2: '٢', + 3: '٣', + 4: '٤', + 5: '٥', + 6: '٦', + 7: '٧', + 8: '٨', + 9: '٩', + 0: '٠' +}; +var numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' +}; +var locale = { + name: 'ar', + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + months: months, + monthsShort: months, + weekStart: 6, + meridiem: function meridiem(hour) { + return hour > 12 ? 'م' : 'ص'; + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: 'ثانية واحدة', + m: 'دقيقة واحدة', + mm: '%d دقائق', + h: 'ساعة واحدة', + hh: '%d ساعات', + d: 'يوم واحد', + dd: '%d أيام', + M: 'شهر واحد', + MM: '%d أشهر', + y: 'عام واحد', + yy: '%d أعوام' + }, + preparse: function preparse(string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }).replace(/،/g, ','); + }, + postformat: function postformat(string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }).replace(/,/g, '،'); + }, + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/‏M/‏YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/az.js b/esm/locale/az.js new file mode 100644 index 000000000..3505c8a75 --- /dev/null +++ b/esm/locale/az.js @@ -0,0 +1,39 @@ +// Azerbaijani [az] +import dayjs from '../index'; +var locale = { + name: 'az', + weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'), + weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), + weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), + months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'), + monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), + weekStart: 1, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY г.', + LLL: 'D MMMM YYYY г., H:mm', + LLLL: 'dddd, D MMMM YYYY г., H:mm' + }, + relativeTime: { + future: '%s sonra', + past: '%s əvvəl', + s: 'bir neçə saniyə', + m: 'bir dəqiqə', + mm: '%d dəqiqə', + h: 'bir saat', + hh: '%d saat', + d: 'bir gün', + dd: '%d gün', + M: 'bir ay', + MM: '%d ay', + y: 'bir il', + yy: '%d il' + }, + ordinal: function ordinal(n) { + return n; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/be.js b/esm/locale/be.js new file mode 100644 index 000000000..5642e397f --- /dev/null +++ b/esm/locale/be.js @@ -0,0 +1,24 @@ +// Belarusian [be] +import dayjs from '../index'; +var locale = { + name: 'be', + weekdays: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), + months: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'), + weekStart: 1, + weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'), + weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY г.', + LLL: 'D MMMM YYYY г., HH:mm', + LLLL: 'dddd, D MMMM YYYY г., HH:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/bg.js b/esm/locale/bg.js new file mode 100644 index 000000000..e4e2a34ad --- /dev/null +++ b/esm/locale/bg.js @@ -0,0 +1,55 @@ +// Bulgarian [bg] +import dayjs from '../index'; +var locale = { + name: 'bg', + weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'), + weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'), + weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'), + monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), + weekStart: 1, + ordinal: function ordinal(n) { + var last2Digits = n % 100; + + if (last2Digits > 10 && last2Digits < 20) { + return n + "-\u0442\u0438"; + } + + var lastDigit = n % 10; + + if (lastDigit === 1) { + return n + "-\u0432\u0438"; + } else if (lastDigit === 2) { + return n + "-\u0440\u0438"; + } else if (lastDigit === 7 || lastDigit === 8) { + return n + "-\u043C\u0438"; + } + + return n + "-\u0442\u0438"; + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'D.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm' + }, + relativeTime: { + future: 'след %s', + past: 'преди %s', + s: 'няколко секунди', + m: 'минута', + mm: '%d минути', + h: 'час', + hh: '%d часа', + d: 'ден', + dd: '%d дена', + M: 'месец', + MM: '%d месеца', + y: 'година', + yy: '%d години' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/bi.js b/esm/locale/bi.js new file mode 100644 index 000000000..6230f251f --- /dev/null +++ b/esm/locale/bi.js @@ -0,0 +1,39 @@ +// Bislama [bi] +import dayjs from '../index'; +var locale = { + name: 'bi', + weekdays: 'Sande_Mande_Tusde_Wenesde_Tosde_Fraede_Sarade'.split('_'), + months: 'Januari_Februari_Maj_Eprel_Mei_Jun_Julae_Okis_Septemba_Oktoba_Novemba_Disemba'.split('_'), + weekStart: 1, + weekdaysShort: 'San_Man_Tus_Wen_Tos_Frae_Sar'.split('_'), + monthsShort: 'Jan_Feb_Maj_Epr_Mai_Jun_Jul_Oki_Sep_Okt_Nov_Dis'.split('_'), + weekdaysMin: 'San_Ma_Tu_We_To_Fr_Sar'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A' + }, + relativeTime: { + future: 'lo %s', + past: '%s bifo', + s: 'sam seken', + m: 'wan minit', + mm: '%d minit', + h: 'wan haoa', + hh: '%d haoa', + d: 'wan dei', + dd: '%d dei', + M: 'wan manis', + MM: '%d manis', + y: 'wan yia', + yy: '%d yia' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/bm.js b/esm/locale/bm.js new file mode 100644 index 000000000..0d6109309 --- /dev/null +++ b/esm/locale/bm.js @@ -0,0 +1,39 @@ +// Bambara [bm] +import dayjs from '../index'; +var locale = { + name: 'bm', + weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), + months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'), + weekStart: 1, + weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'), + monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'), + weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'MMMM [tile] D [san] YYYY', + LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm' + }, + relativeTime: { + future: '%s kɔnɔ', + past: 'a bɛ %s bɔ', + s: 'sanga dama dama', + m: 'miniti kelen', + mm: 'miniti %d', + h: 'lɛrɛ kelen', + hh: 'lɛrɛ %d', + d: 'tile kelen', + dd: 'tile %d', + M: 'kalo kelen', + MM: 'kalo %d', + y: 'san kelen', + yy: 'san %d' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/bn-bd.js b/esm/locale/bn-bd.js new file mode 100644 index 000000000..f13b660ba --- /dev/null +++ b/esm/locale/bn-bd.js @@ -0,0 +1,81 @@ +// Bengali (Bangladesh) [bn-bd] +import dayjs from '../index'; +var symbolMap = { + 1: '১', + 2: '২', + 3: '৩', + 4: '৪', + 5: '৫', + 6: '৬', + 7: '৭', + 8: '৮', + 9: '৯', + 0: '০' +}; +var numberMap = { + '১': '1', + '২': '2', + '৩': '3', + '৪': '4', + '৫': '5', + '৬': '6', + '৭': '7', + '৮': '8', + '৯': '9', + '০': '0' +}; +var locale = { + name: 'bn-bd', + weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'), + months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'), + weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), + monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'), + weekdaysMin: 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'), + weekStart: 0, + preparse: function preparse(string) { + return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function postformat(string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + ordinal: function ordinal(n) { + var s = ['ই', 'লা', 'রা', 'ঠা', 'শে']; + var v = n % 100; + return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]"; + }, + formats: { + LT: 'A h:mm সময়', + LTS: 'A h:mm:ss সময়', + L: 'DD/MM/YYYY খ্রিস্টাব্দ', + LL: 'D MMMM YYYY খ্রিস্টাব্দ', + LLL: 'D MMMM YYYY খ্রিস্টাব্দ, A h:mm সময়', + LLLL: 'dddd, D MMMM YYYY খ্রিস্টাব্দ, A h:mm সময়' + }, + meridiem: function meridiem(hour) { + return ( + /* eslint-disable no-nested-ternary */ + hour < 4 ? 'রাত' : hour < 6 ? 'ভোর' : hour < 12 ? 'সকাল' : hour < 15 ? 'দুপুর' : hour < 18 ? 'বিকাল' : hour < 20 ? 'সন্ধ্যা' : 'রাত' + ); + }, + relativeTime: { + future: '%s পরে', + past: '%s আগে', + s: 'কয়েক সেকেন্ড', + m: 'এক মিনিট', + mm: '%d মিনিট', + h: 'এক ঘন্টা', + hh: '%d ঘন্টা', + d: 'এক দিন', + dd: '%d দিন', + M: 'এক মাস', + MM: '%d মাস', + y: 'এক বছর', + yy: '%d বছর' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/bn.js b/esm/locale/bn.js new file mode 100644 index 000000000..25fc17035 --- /dev/null +++ b/esm/locale/bn.js @@ -0,0 +1,72 @@ +// Bengali [bn] +import dayjs from '../index'; +var symbolMap = { + 1: '১', + 2: '২', + 3: '৩', + 4: '৪', + 5: '৫', + 6: '৬', + 7: '৭', + 8: '৮', + 9: '৯', + 0: '০' +}; +var numberMap = { + '১': '1', + '২': '2', + '৩': '3', + '৪': '4', + '৫': '5', + '৬': '6', + '৭': '7', + '৮': '8', + '৯': '9', + '০': '0' +}; +var locale = { + name: 'bn', + weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'), + months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'), + weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), + monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'), + weekdaysMin: 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'), + preparse: function preparse(string) { + return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { + return numberMap[match]; + }); + }, + postformat: function postformat(string) { + return string.replace(/\d/g, function (match) { + return symbolMap[match]; + }); + }, + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'A h:mm সময়', + LTS: 'A h:mm:ss সময়', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm সময়', + LLLL: 'dddd, D MMMM YYYY, A h:mm সময়' + }, + relativeTime: { + future: '%s পরে', + past: '%s আগে', + s: 'কয়েক সেকেন্ড', + m: 'এক মিনিট', + mm: '%d মিনিট', + h: 'এক ঘন্টা', + hh: '%d ঘন্টা', + d: 'এক দিন', + dd: '%d দিন', + M: 'এক মাস', + MM: '%d মাস', + y: 'এক বছর', + yy: '%d বছর' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/bo.js b/esm/locale/bo.js new file mode 100644 index 000000000..fce334460 --- /dev/null +++ b/esm/locale/bo.js @@ -0,0 +1,38 @@ +// Tibetan [bo] +import dayjs from '../index'; +var locale = { + name: 'bo', + weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'), + weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), + weekdaysMin: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), + months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), + monthsShort: 'ཟླ་དང་པོ_ཟླ་གཉིས་པ_ཟླ་གསུམ་པ_ཟླ་བཞི་པ_ཟླ་ལྔ་པ_ཟླ་དྲུག་པ_ཟླ་བདུན་པ_ཟླ་བརྒྱད་པ_ཟླ་དགུ་པ_ཟླ་བཅུ་པ_ཟླ་བཅུ་གཅིག་པ_ཟླ་བཅུ་གཉིས་པ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm' + }, + relativeTime: { + future: '%s ལ་', + past: '%s སྔོན་ལ་', + s: 'ཏོག་ཙམ་', + m: 'སྐར་མ་གཅིག་', + mm: 'སྐར་མ་ %d', + h: 'ཆུ་ཚོད་གཅིག་', + hh: 'ཆུ་ཚོད་ %d', + d: 'ཉིན་གཅིག་', + dd: 'ཉིན་ %d', + M: 'ཟླ་བ་གཅིག་', + MM: 'ཟླ་བ་ %d', + y: 'ལོ་གཅིག་', + yy: 'ལོ་ %d' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/br.js b/esm/locale/br.js new file mode 100644 index 000000000..d18b4fea5 --- /dev/null +++ b/esm/locale/br.js @@ -0,0 +1,93 @@ +// Breton [br] +import dayjs from '../index'; + +function lastNumber(number) { + if (number > 9) { + return lastNumber(number % 10); + } + + return number; +} + +function softMutation(text) { + var mutationTable = { + m: 'v', + b: 'v', + d: 'z' + }; + return mutationTable[text.charAt(0)] + text.substring(1); +} + +function mutation(text, number) { + if (number === 2) { + return softMutation(text); + } + + return text; +} + +function relativeTimeWithMutation(number, withoutSuffix, key) { + var format = { + mm: 'munutenn', + MM: 'miz', + dd: 'devezh' + }; + return number + " " + mutation(format[key], number); +} + +function specialMutationForYears(number) { + /* istanbul ignore next line */ + switch (lastNumber(number)) { + case 1: + case 3: + case 4: + case 5: + case 9: + return number + " bloaz"; + + default: + return number + " vloaz"; + } +} + +var locale = { + name: 'br', + weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'), + months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'), + weekStart: 1, + weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), + monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), + weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'h[e]mm A', + LTS: 'h[e]mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D [a viz] MMMM YYYY', + LLL: 'D [a viz] MMMM YYYY h[e]mm A', + LLLL: 'dddd, D [a viz] MMMM YYYY h[e]mm A' + }, + relativeTime: { + future: 'a-benn %s', + past: '%s ʼzo', + s: 'un nebeud segondennoù', + m: 'ur vunutenn', + mm: relativeTimeWithMutation, + h: 'un eur', + hh: '%d eur', + d: 'un devezh', + dd: relativeTimeWithMutation, + M: 'ur miz', + MM: relativeTimeWithMutation, + y: 'ur bloaz', + yy: specialMutationForYears + }, + meridiem: function meridiem(hour) { + return hour < 12 ? 'a.m.' : 'g.m.'; + } // a-raok merenn | goude merenn + +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/bs.js b/esm/locale/bs.js new file mode 100644 index 000000000..328a1fe38 --- /dev/null +++ b/esm/locale/bs.js @@ -0,0 +1,24 @@ +// Bosnian [bs] +import dayjs from '../index'; +var locale = { + name: 'bs', + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'), + weekStart: 1, + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ca.js b/esm/locale/ca.js new file mode 100644 index 000000000..94fc0b9c6 --- /dev/null +++ b/esm/locale/ca.js @@ -0,0 +1,44 @@ +// Catalan [ca] +import dayjs from '../index'; +var locale = { + name: 'ca', + weekdays: 'Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte'.split('_'), + weekdaysShort: 'Dg._Dl._Dt._Dc._Dj._Dv._Ds.'.split('_'), + weekdaysMin: 'Dg_Dl_Dt_Dc_Dj_Dv_Ds'.split('_'), + months: 'Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre'.split('_'), + monthsShort: 'Gen._Febr._Març_Abr._Maig_Juny_Jul._Ag._Set._Oct._Nov._Des.'.split('_'), + weekStart: 1, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [de] YYYY', + LLL: 'D MMMM [de] YYYY [a les] H:mm', + LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm', + ll: 'D MMM YYYY', + lll: 'D MMM YYYY, H:mm', + llll: 'ddd D MMM YYYY, H:mm' + }, + relativeTime: { + future: 'd\'aquí %s', + past: 'fa %s', + s: 'uns segons', + m: 'un minut', + mm: '%d minuts', + h: 'una hora', + hh: '%d hores', + d: 'un dia', + dd: '%d dies', + M: 'un mes', + MM: '%d mesos', + y: 'un any', + yy: '%d anys' + }, + ordinal: function ordinal(n) { + var ord; + if (n === 1 || n === 3) ord = 'r';else if (n === 2) ord = 'n';else if (n === 4) ord = 't';else ord = 'è'; + return "" + n + ord; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/cs.js b/esm/locale/cs.js new file mode 100644 index 000000000..165b662c6 --- /dev/null +++ b/esm/locale/cs.js @@ -0,0 +1,120 @@ +// Czech [cs] +import dayjs from '../index'; + +function plural(n) { + return n > 1 && n < 5 && ~~(n / 10) !== 1; // eslint-disable-line +} +/* eslint-disable */ + + +function translate(number, withoutSuffix, key, isFuture) { + var result = number + " "; + + switch (key) { + case 's': + // a few seconds / in a few seconds / a few seconds ago + return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami'; + + case 'm': + // a minute / in a minute / a minute ago + return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou'; + + case 'mm': + // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'minuty' : 'minut'); + } + + return result + "minutami"; + + case 'h': + // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; + + case 'hh': + // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'hodiny' : 'hodin'); + } + + return result + "hodinami"; + + case 'd': + // a day / in a day / a day ago + return withoutSuffix || isFuture ? 'den' : 'dnem'; + + case 'dd': + // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'dny' : 'dní'); + } + + return result + "dny"; + + case 'M': + // a month / in a month / a month ago + return withoutSuffix || isFuture ? 'měsíc' : 'měsícem'; + + case 'MM': + // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'měsíce' : 'měsíců'); + } + + return result + "m\u011Bs\xEDci"; + + case 'y': + // a year / in a year / a year ago + return withoutSuffix || isFuture ? 'rok' : 'rokem'; + + case 'yy': + // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'roky' : 'let'); + } + + return result + "lety"; + } +} +/* eslint-enable */ + + +var locale = { + name: 'cs', + weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'), + weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'), + weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'), + months: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'), + monthsShort: 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'), + weekStart: 1, + yearStart: 4, + ordinal: function ordinal(n) { + return n + "."; + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd D. MMMM YYYY H:mm', + l: 'D. M. YYYY' + }, + relativeTime: { + future: 'za %s', + past: 'před %s', + s: translate, + m: translate, + mm: translate, + h: translate, + hh: translate, + d: translate, + dd: translate, + M: translate, + MM: translate, + y: translate, + yy: translate + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/cv.js b/esm/locale/cv.js new file mode 100644 index 000000000..7dc41f767 --- /dev/null +++ b/esm/locale/cv.js @@ -0,0 +1,24 @@ +// Chuvash [cv] +import dayjs from '../index'; +var locale = { + name: 'cv', + weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'), + months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'), + weekStart: 1, + weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), + monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), + weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', + LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/cy.js b/esm/locale/cy.js new file mode 100644 index 000000000..63e6c33c2 --- /dev/null +++ b/esm/locale/cy.js @@ -0,0 +1,39 @@ +// Welsh [cy] +import dayjs from '../index'; +var locale = { + name: 'cy', + weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'), + months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'), + weekStart: 1, + weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), + monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'), + weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'mewn %s', + past: '%s yn ôl', + s: 'ychydig eiliadau', + m: 'munud', + mm: '%d munud', + h: 'awr', + hh: '%d awr', + d: 'diwrnod', + dd: '%d diwrnod', + M: 'mis', + MM: '%d mis', + y: 'blwyddyn', + yy: '%d flynedd' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/da.js b/esm/locale/da.js new file mode 100644 index 000000000..9c2d04895 --- /dev/null +++ b/esm/locale/da.js @@ -0,0 +1,40 @@ +// Danish [da] +import dayjs from '../index'; +var locale = { + name: 'da', + weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort: 'søn._man._tirs._ons._tors._fre._lør.'.split('_'), + weekdaysMin: 'sø._ma._ti._on._to._fr._lø.'.split('_'), + months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'), + monthsShort: 'jan._feb._mar._apr._maj_juni_juli_aug._sept._okt._nov._dec.'.split('_'), + weekStart: 1, + yearStart: 4, + ordinal: function ordinal(n) { + return n + "."; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm' + }, + relativeTime: { + future: 'om %s', + past: '%s siden', + s: 'få sekunder', + m: 'et minut', + mm: '%d minutter', + h: 'en time', + hh: '%d timer', + d: 'en dag', + dd: '%d dage', + M: 'en måned', + MM: '%d måneder', + y: 'et år', + yy: '%d år' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/de-at.js b/esm/locale/de-at.js new file mode 100644 index 000000000..e109d9710 --- /dev/null +++ b/esm/locale/de-at.js @@ -0,0 +1,63 @@ +// German (Austria) [de-at] +import dayjs from '../index'; +var texts = { + s: 'ein paar Sekunden', + m: ['eine Minute', 'einer Minute'], + mm: '%d Minuten', + h: ['eine Stunde', 'einer Stunde'], + hh: '%d Stunden', + d: ['ein Tag', 'einem Tag'], + dd: ['%d Tage', '%d Tagen'], + M: ['ein Monat', 'einem Monat'], + MM: ['%d Monate', '%d Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: ['%d Jahre', '%d Jahren'] +}; + +function relativeTimeFormatter(number, withoutSuffix, key) { + var l = texts[key]; + + if (Array.isArray(l)) { + l = l[withoutSuffix ? 0 : 1]; + } + + return l.replace('%d', number); +} + +var locale = { + name: 'de-at', + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + ordinal: function ordinal(n) { + return n + "."; + }, + weekStart: 1, + formats: { + LTS: 'HH:mm:ss', + LT: 'HH:mm', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: relativeTimeFormatter, + m: relativeTimeFormatter, + mm: relativeTimeFormatter, + h: relativeTimeFormatter, + hh: relativeTimeFormatter, + d: relativeTimeFormatter, + dd: relativeTimeFormatter, + M: relativeTimeFormatter, + MM: relativeTimeFormatter, + y: relativeTimeFormatter, + yy: relativeTimeFormatter + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/de-ch.js b/esm/locale/de-ch.js new file mode 100644 index 000000000..1ffbbf730 --- /dev/null +++ b/esm/locale/de-ch.js @@ -0,0 +1,63 @@ +// German (Switzerland) [de-ch] +import dayjs from '../index'; +var texts = { + s: 'ein paar Sekunden', + m: ['eine Minute', 'einer Minute'], + mm: '%d Minuten', + h: ['eine Stunde', 'einer Stunde'], + hh: '%d Stunden', + d: ['ein Tag', 'einem Tag'], + dd: ['%d Tage', '%d Tagen'], + M: ['ein Monat', 'einem Monat'], + MM: ['%d Monate', '%d Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: ['%d Jahre', '%d Jahren'] +}; + +function relativeTimeFormatter(number, withoutSuffix, key) { + var l = texts[key]; + + if (Array.isArray(l)) { + l = l[withoutSuffix ? 0 : 1]; + } + + return l.replace('%d', number); +} + +var locale = { + name: 'de-ch', + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), + ordinal: function ordinal(n) { + return n + "."; + }, + weekStart: 1, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: relativeTimeFormatter, + m: relativeTimeFormatter, + mm: relativeTimeFormatter, + h: relativeTimeFormatter, + hh: relativeTimeFormatter, + d: relativeTimeFormatter, + dd: relativeTimeFormatter, + M: relativeTimeFormatter, + MM: relativeTimeFormatter, + y: relativeTimeFormatter, + yy: relativeTimeFormatter + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/de.js b/esm/locale/de.js new file mode 100644 index 000000000..8ccd48337 --- /dev/null +++ b/esm/locale/de.js @@ -0,0 +1,64 @@ +// German [de] +import dayjs from '../index'; +var texts = { + s: 'ein paar Sekunden', + m: ['eine Minute', 'einer Minute'], + mm: '%d Minuten', + h: ['eine Stunde', 'einer Stunde'], + hh: '%d Stunden', + d: ['ein Tag', 'einem Tag'], + dd: ['%d Tage', '%d Tagen'], + M: ['ein Monat', 'einem Monat'], + MM: ['%d Monate', '%d Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: ['%d Jahre', '%d Jahren'] +}; + +function relativeTimeFormatter(number, withoutSuffix, key) { + var l = texts[key]; + + if (Array.isArray(l)) { + l = l[withoutSuffix ? 0 : 1]; + } + + return l.replace('%d', number); +} + +var locale = { + name: 'de', + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), + weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.'.split('_'), + ordinal: function ordinal(n) { + return n + "."; + }, + weekStart: 1, + yearStart: 4, + formats: { + LTS: 'HH:mm:ss', + LT: 'HH:mm', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: relativeTimeFormatter, + m: relativeTimeFormatter, + mm: relativeTimeFormatter, + h: relativeTimeFormatter, + hh: relativeTimeFormatter, + d: relativeTimeFormatter, + dd: relativeTimeFormatter, + M: relativeTimeFormatter, + MM: relativeTimeFormatter, + y: relativeTimeFormatter, + yy: relativeTimeFormatter + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/dv.js b/esm/locale/dv.js new file mode 100644 index 000000000..8943fdd80 --- /dev/null +++ b/esm/locale/dv.js @@ -0,0 +1,39 @@ +// Maldivian [dv] +import dayjs from '../index'; +var locale = { + name: 'dv', + weekdays: 'އާދިއްތަ_ހޯމަ_އަންގާރަ_ބުދަ_ބުރާސްފަތި_ހުކުރު_ހޮނިހިރު'.split('_'), + months: 'ޖެނުއަރީ_ފެބްރުއަރީ_މާރިޗު_އޭޕްރީލު_މޭ_ޖޫން_ޖުލައި_އޯގަސްޓު_ސެޕްޓެމްބަރު_އޮކްޓޯބަރު_ނޮވެމްބަރު_ޑިސެމްބަރު'.split('_'), + weekStart: 7, + weekdaysShort: 'އާދިއްތަ_ހޯމަ_އަންގާރަ_ބުދަ_ބުރާސްފަތި_ހުކުރު_ހޮނިހިރު'.split('_'), + monthsShort: 'ޖެނުއަރީ_ފެބްރުއަރީ_މާރިޗު_އޭޕްރީލު_މޭ_ޖޫން_ޖުލައި_އޯގަސްޓު_ސެޕްޓެމްބަރު_އޮކްޓޯބަރު_ނޮވެމްބަރު_ޑިސެމްބަރު'.split('_'), + weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/M/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'ތެރޭގައި %s', + past: 'ކުރިން %s', + s: 'ސިކުންތުކޮޅެއް', + m: 'މިނިޓެއް', + mm: 'މިނިޓު %d', + h: 'ގަޑިއިރެއް', + hh: 'ގަޑިއިރު %d', + d: 'ދުވަހެއް', + dd: 'ދުވަސް %d', + M: 'މަހެއް', + MM: 'މަސް %d', + y: 'އަހަރެއް', + yy: 'އަހަރު %d' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/el.js b/esm/locale/el.js new file mode 100644 index 000000000..2aa9917dc --- /dev/null +++ b/esm/locale/el.js @@ -0,0 +1,39 @@ +// Greek [el] +import dayjs from '../index'; +var locale = { + name: 'el', + weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'), + weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'), + weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'), + months: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'), + monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαι_Ιουν_Ιουλ_Αυγ_Σεπτ_Οκτ_Νοε_Δεκ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + weekStart: 1, + relativeTime: { + future: 'σε %s', + past: 'πριν %s', + s: 'μερικά δευτερόλεπτα', + m: 'ένα λεπτό', + mm: '%d λεπτά', + h: 'μία ώρα', + hh: '%d ώρες', + d: 'μία μέρα', + dd: '%d μέρες', + M: 'ένα μήνα', + MM: '%d μήνες', + y: 'ένα χρόνο', + yy: '%d χρόνια' + }, + formats: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/en-au.js b/esm/locale/en-au.js new file mode 100644 index 000000000..f9dde0340 --- /dev/null +++ b/esm/locale/en-au.js @@ -0,0 +1,39 @@ +// English (Australia) [en-au] +import dayjs from '../index'; +var locale = { + name: 'en-au', + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + weekStart: 1, + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A' + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/en-ca.js b/esm/locale/en-ca.js new file mode 100644 index 000000000..8e416c996 --- /dev/null +++ b/esm/locale/en-ca.js @@ -0,0 +1,38 @@ +// English (Canada) [en-ca] +import dayjs from '../index'; +var locale = { + name: 'en-ca', + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'YYYY-MM-DD', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A' + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/en-gb.js b/esm/locale/en-gb.js new file mode 100644 index 000000000..f979b442f --- /dev/null +++ b/esm/locale/en-gb.js @@ -0,0 +1,42 @@ +// English (United Kingdom) [en-gb] +import dayjs from '../index'; +var locale = { + name: 'en-gb', + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekStart: 1, + yearStart: 4, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + ordinal: function ordinal(n) { + var s = ['th', 'st', 'nd', 'rd']; + var v = n % 100; + return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]"; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/en-ie.js b/esm/locale/en-ie.js new file mode 100644 index 000000000..8098d2f7a --- /dev/null +++ b/esm/locale/en-ie.js @@ -0,0 +1,39 @@ +// English (Ireland) [en-ie] +import dayjs from '../index'; +var locale = { + name: 'en-ie', + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + weekStart: 1, + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/en-il.js b/esm/locale/en-il.js new file mode 100644 index 000000000..56c241ac4 --- /dev/null +++ b/esm/locale/en-il.js @@ -0,0 +1,38 @@ +// English (Israel) [en-il] +import dayjs from '../index'; +var locale = { + name: 'en-il', + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/en-in.js b/esm/locale/en-in.js new file mode 100644 index 000000000..7ccb206ca --- /dev/null +++ b/esm/locale/en-in.js @@ -0,0 +1,42 @@ +// English (India) [en-in] +import dayjs from '../index'; +var locale = { + name: 'en-in', + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekStart: 1, + yearStart: 4, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + ordinal: function ordinal(n) { + var s = ['th', 'st', 'nd', 'rd']; + var v = n % 100; + return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]"; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/en-nz.js b/esm/locale/en-nz.js new file mode 100644 index 000000000..08c562eb0 --- /dev/null +++ b/esm/locale/en-nz.js @@ -0,0 +1,41 @@ +// English (New Zealand) [en-nz] +import dayjs from '../index'; +var locale = { + name: 'en-nz', + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + weekStart: 1, + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + ordinal: function ordinal(n) { + var s = ['th', 'st', 'nd', 'rd']; + var v = n % 100; + return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]"; + }, + formats: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A' + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/en-sg.js b/esm/locale/en-sg.js new file mode 100644 index 000000000..3c5edceef --- /dev/null +++ b/esm/locale/en-sg.js @@ -0,0 +1,39 @@ +// English (Singapore) [en-sg] +import dayjs from '../index'; +var locale = { + name: 'en-sg', + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + weekStart: 1, + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/en-tt.js b/esm/locale/en-tt.js new file mode 100644 index 000000000..ef47eeba3 --- /dev/null +++ b/esm/locale/en-tt.js @@ -0,0 +1,42 @@ +// English (Trinidad & Tobago) [en-tt] +import dayjs from '../index'; +var locale = { + name: 'en-tt', + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekStart: 1, + yearStart: 4, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + ordinal: function ordinal(n) { + var s = ['th', 'st', 'nd', 'rd']; + var v = n % 100; + return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]"; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/en.js b/esm/locale/en.js new file mode 100644 index 000000000..8ba610720 --- /dev/null +++ b/esm/locale/en.js @@ -0,0 +1,12 @@ +// English [en] +// We don't need weekdaysShort, weekdaysMin, monthsShort in en.js locale +export default { + name: 'en', + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), + ordinal: function ordinal(n) { + var s = ['th', 'st', 'nd', 'rd']; + var v = n % 100; + return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]"; + } +}; \ No newline at end of file diff --git a/esm/locale/eo.js b/esm/locale/eo.js new file mode 100644 index 000000000..e62599aae --- /dev/null +++ b/esm/locale/eo.js @@ -0,0 +1,39 @@ +// Esperanto [eo] +import dayjs from '../index'; +var locale = { + name: 'eo', + weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'), + months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'), + weekStart: 1, + weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'), + monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'), + weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'D[-a de] MMMM, YYYY', + LLL: 'D[-a de] MMMM, YYYY HH:mm', + LLLL: 'dddd, [la] D[-a de] MMMM, YYYY HH:mm' + }, + relativeTime: { + future: 'post %s', + past: 'antaŭ %s', + s: 'sekundoj', + m: 'minuto', + mm: '%d minutoj', + h: 'horo', + hh: '%d horoj', + d: 'tago', + dd: '%d tagoj', + M: 'monato', + MM: '%d monatoj', + y: 'jaro', + yy: '%d jaroj' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/es-do.js b/esm/locale/es-do.js new file mode 100644 index 000000000..09410cfab --- /dev/null +++ b/esm/locale/es-do.js @@ -0,0 +1,39 @@ +// Spanish (Dominican Republic) [es-do] +import dayjs from '../index'; +var locale = { + name: 'es-do', + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + weekStart: 1, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años' + }, + ordinal: function ordinal(n) { + return n + "\xBA"; + }, + formats: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY h:mm A', + LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/es-mx.js b/esm/locale/es-mx.js new file mode 100644 index 000000000..0207f83ba --- /dev/null +++ b/esm/locale/es-mx.js @@ -0,0 +1,38 @@ +// Spanish (Mexico) [es-mx] +import dayjs from '../index'; +var locale = { + name: 'es-mx', + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años' + }, + ordinal: function ordinal(n) { + return n + "\xBA"; + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/es-pr.js b/esm/locale/es-pr.js new file mode 100644 index 000000000..5edc359ee --- /dev/null +++ b/esm/locale/es-pr.js @@ -0,0 +1,39 @@ +// Spanish (Puerto Rico) [es-PR] +import dayjs from '../index'; +var locale = { + name: 'es-pr', + monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + weekStart: 1, + formats: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'MM/DD/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY h:mm A', + LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A' + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años' + }, + ordinal: function ordinal(n) { + return n + "\xBA"; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/es-us.js b/esm/locale/es-us.js new file mode 100644 index 000000000..f9b01a08f --- /dev/null +++ b/esm/locale/es-us.js @@ -0,0 +1,38 @@ +// Spanish (United States) [es-us] +import dayjs from '../index'; +var locale = { + name: 'es-us', + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años' + }, + ordinal: function ordinal(n) { + return n + "\xBA"; + }, + formats: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'MM/DD/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY h:mm A', + LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/es.js b/esm/locale/es.js new file mode 100644 index 000000000..84bdfbe91 --- /dev/null +++ b/esm/locale/es.js @@ -0,0 +1,39 @@ +// Spanish [es] +import dayjs from '../index'; +var locale = { + name: 'es', + monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), + weekStart: 1, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm' + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años' + }, + ordinal: function ordinal(n) { + return n + "\xBA"; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/et.js b/esm/locale/et.js new file mode 100644 index 000000000..7f7c5ff59 --- /dev/null +++ b/esm/locale/et.js @@ -0,0 +1,65 @@ +// Estonian [et] +import dayjs from '../index'; + +function relativeTimeWithTense(number, withoutSuffix, key, isFuture) { + var format = { + s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'], + m: ['ühe minuti', 'üks minut'], + mm: ['%d minuti', '%d minutit'], + h: ['ühe tunni', 'tund aega', 'üks tund'], + hh: ['%d tunni', '%d tundi'], + d: ['ühe päeva', 'üks päev'], + M: ['kuu aja', 'kuu aega', 'üks kuu'], + MM: ['%d kuu', '%d kuud'], + y: ['ühe aasta', 'aasta', 'üks aasta'], + yy: ['%d aasta', '%d aastat'] + }; + + if (withoutSuffix) { + return (format[key][2] ? format[key][2] : format[key][1]).replace('%d', number); + } + + return (isFuture ? format[key][0] : format[key][1]).replace('%d', number); +} + +var locale = { + name: 'et', + // Estonian + weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'), + // Note weekdays are not capitalized in Estonian + weekdaysShort: 'P_E_T_K_N_R_L'.split('_'), + // There is no short form of weekdays in Estonian except this 1 letter format so it is used for both 'weekdaysShort' and 'weekdaysMin' + weekdaysMin: 'P_E_T_K_N_R_L'.split('_'), + months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'), + // Note month names are not capitalized in Estonian + monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'), + ordinal: function ordinal(n) { + return n + "."; + }, + weekStart: 1, + relativeTime: { + future: '%s pärast', + past: '%s tagasi', + s: relativeTimeWithTense, + m: relativeTimeWithTense, + mm: relativeTimeWithTense, + h: relativeTimeWithTense, + hh: relativeTimeWithTense, + d: relativeTimeWithTense, + dd: '%d päeva', + M: relativeTimeWithTense, + MM: relativeTimeWithTense, + y: relativeTimeWithTense, + yy: relativeTimeWithTense + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/eu.js b/esm/locale/eu.js new file mode 100644 index 000000000..5cb73d093 --- /dev/null +++ b/esm/locale/eu.js @@ -0,0 +1,43 @@ +// Basque [eu] +import dayjs from '../index'; +var locale = { + name: 'eu', + weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'), + months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'), + weekStart: 1, + weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'), + monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'), + weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY[ko] MMMM[ren] D[a]', + LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm', + LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', + l: 'YYYY-M-D', + ll: 'YYYY[ko] MMM D[a]', + lll: 'YYYY[ko] MMM D[a] HH:mm', + llll: 'ddd, YYYY[ko] MMM D[a] HH:mm' + }, + relativeTime: { + future: '%s barru', + past: 'duela %s', + s: 'segundo batzuk', + m: 'minutu bat', + mm: '%d minutu', + h: 'ordu bat', + hh: '%d ordu', + d: 'egun bat', + dd: '%d egun', + M: 'hilabete bat', + MM: '%d hilabete', + y: 'urte bat', + yy: '%d urte' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/fa.js b/esm/locale/fa.js new file mode 100644 index 000000000..089459e78 --- /dev/null +++ b/esm/locale/fa.js @@ -0,0 +1,39 @@ +// Persian [fa] +import dayjs from '../index'; +var locale = { + name: 'fa', + weekdays: 'یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه'.split('_'), + weekdaysShort: "\u06CC\u06A9\u200C\u0634\u0646\u0628\u0647_\u062F\u0648\u0634\u0646\u0628\u0647_\u0633\u0647\u200C\u0634\u0646\u0628\u0647_\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647_\u067E\u0646\u062C\u200C\u0634\u0646\u0628\u0647_\u062C\u0645\u0639\u0647_\u0634\u0646\u0628\u0647".split('_'), + weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'), + weekStart: 6, + months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), + monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'در %s', + past: '%s پیش', + s: 'چند ثانیه', + m: 'یک دقیقه', + mm: '%d دقیقه', + h: 'یک ساعت', + hh: '%d ساعت', + d: 'یک روز', + dd: '%d روز', + M: 'یک ماه', + MM: '%d ماه', + y: 'یک سال', + yy: '%d سال' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/fi.js b/esm/locale/fi.js new file mode 100644 index 000000000..1ded894db --- /dev/null +++ b/esm/locale/fi.js @@ -0,0 +1,88 @@ +// Finnish [fi] +import dayjs from '../index'; + +function relativeTimeFormatter(number, withoutSuffix, key, isFuture) { + var past = { + s: 'muutama sekunti', + m: 'minuutti', + mm: '%d minuuttia', + h: 'tunti', + hh: '%d tuntia', + d: 'päivä', + dd: '%d päivää', + M: 'kuukausi', + MM: '%d kuukautta', + y: 'vuosi', + yy: '%d vuotta', + numbers: 'nolla_yksi_kaksi_kolme_neljä_viisi_kuusi_seitsemän_kahdeksan_yhdeksän'.split('_') + }; + var future = { + s: 'muutaman sekunnin', + m: 'minuutin', + mm: '%d minuutin', + h: 'tunnin', + hh: '%d tunnin', + d: 'päivän', + dd: '%d päivän', + M: 'kuukauden', + MM: '%d kuukauden', + y: 'vuoden', + yy: '%d vuoden', + numbers: 'nollan_yhden_kahden_kolmen_neljän_viiden_kuuden_seitsemän_kahdeksan_yhdeksän'.split('_') + }; + var words = isFuture && !withoutSuffix ? future : past; + var result = words[key]; + + if (number < 10) { + return result.replace('%d', words.numbers[number]); + } + + return result.replace('%d', number); +} + +var locale = { + name: 'fi', + // Finnish + weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'), + // Note weekdays are not capitalized in Finnish + weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'), + // There is no short form of weekdays in Finnish except this 2 letter format so it is used for both 'weekdaysShort' and 'weekdaysMin' + weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'), + months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'), + // Note month names are not capitalized in Finnish + monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'), + ordinal: function ordinal(n) { + return n + "."; + }, + weekStart: 1, + yearStart: 4, + relativeTime: { + future: '%s päästä', + past: '%s sitten', + s: relativeTimeFormatter, + m: relativeTimeFormatter, + mm: relativeTimeFormatter, + h: relativeTimeFormatter, + hh: relativeTimeFormatter, + d: relativeTimeFormatter, + dd: relativeTimeFormatter, + M: relativeTimeFormatter, + MM: relativeTimeFormatter, + y: relativeTimeFormatter, + yy: relativeTimeFormatter + }, + formats: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM[ta] YYYY', + LLL: 'D. MMMM[ta] YYYY, [klo] HH.mm', + LLLL: 'dddd, D. MMMM[ta] YYYY, [klo] HH.mm', + l: 'D.M.YYYY', + ll: 'D. MMM YYYY', + lll: 'D. MMM YYYY, [klo] HH.mm', + llll: 'ddd, D. MMM YYYY, [klo] HH.mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/fo.js b/esm/locale/fo.js new file mode 100644 index 000000000..07c376173 --- /dev/null +++ b/esm/locale/fo.js @@ -0,0 +1,39 @@ +// Faroese [fo] +import dayjs from '../index'; +var locale = { + name: 'fo', + weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'), + months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + weekStart: 1, + weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'), + monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D. MMMM, YYYY HH:mm' + }, + relativeTime: { + future: 'um %s', + past: '%s síðani', + s: 'fá sekund', + m: 'ein minuttur', + mm: '%d minuttir', + h: 'ein tími', + hh: '%d tímar', + d: 'ein dagur', + dd: '%d dagar', + M: 'ein mánaður', + MM: '%d mánaðir', + y: 'eitt ár', + yy: '%d ár' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/fr-ca.js b/esm/locale/fr-ca.js new file mode 100644 index 000000000..688d695c6 --- /dev/null +++ b/esm/locale/fr-ca.js @@ -0,0 +1,38 @@ +// French (Canada) [fr-ca] +import dayjs from '../index'; +var locale = { + name: 'fr-ca', + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/fr-ch.js b/esm/locale/fr-ch.js new file mode 100644 index 000000000..593dba804 --- /dev/null +++ b/esm/locale/fr-ch.js @@ -0,0 +1,39 @@ +// French (Switzerland) [fr-ch] +import dayjs from '../index'; +var locale = { + name: 'fr-ch', + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + weekStart: 1, + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/fr.js b/esm/locale/fr.js new file mode 100644 index 000000000..b31c11d3a --- /dev/null +++ b/esm/locale/fr.js @@ -0,0 +1,41 @@ +// French [fr] +import dayjs from '../index'; +var locale = { + name: 'fr', + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), + weekStart: 1, + yearStart: 4, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans' + }, + ordinal: function ordinal(n) { + var o = n === 1 ? 'er' : ''; + return "" + n + o; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/fy.js b/esm/locale/fy.js new file mode 100644 index 000000000..4b9f9de41 --- /dev/null +++ b/esm/locale/fy.js @@ -0,0 +1,39 @@ +// Frisian [fy] +import dayjs from '../index'; +var locale = { + name: 'fy', + weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'), + months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'), + monthsShort: 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'), + weekStart: 1, + weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'), + weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'oer %s', + past: '%s lyn', + s: 'in pear sekonden', + m: 'ien minút', + mm: '%d minuten', + h: 'ien oere', + hh: '%d oeren', + d: 'ien dei', + dd: '%d dagen', + M: 'ien moanne', + MM: '%d moannen', + y: 'ien jier', + yy: '%d jierren' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ga.js b/esm/locale/ga.js new file mode 100644 index 000000000..8cdfa9f12 --- /dev/null +++ b/esm/locale/ga.js @@ -0,0 +1,39 @@ +// Irish or Irish Gaelic [ga] +import dayjs from '../index'; +var locale = { + name: 'ga', + weekdays: 'Dé Domhnaigh_Dé Luain_Dé Máirt_Dé Céadaoin_Déardaoin_Dé hAoine_Dé Satharn'.split('_'), + months: 'Eanáir_Feabhra_Márta_Aibreán_Bealtaine_Méitheamh_Iúil_Lúnasa_Meán Fómhair_Deaireadh Fómhair_Samhain_Nollaig'.split('_'), + weekStart: 1, + weekdaysShort: 'Dom_Lua_Mái_Céa_Déa_hAo_Sat'.split('_'), + monthsShort: 'Eaná_Feab_Márt_Aibr_Beal_Méit_Iúil_Lúna_Meán_Deai_Samh_Noll'.split('_'), + weekdaysMin: 'Do_Lu_Má_Ce_Dé_hA_Sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'i %s', + past: '%s ó shin', + s: 'cúpla soicind', + m: 'nóiméad', + mm: '%d nóiméad', + h: 'uair an chloig', + hh: '%d uair an chloig', + d: 'lá', + dd: '%d lá', + M: 'mí', + MM: '%d mí', + y: 'bliain', + yy: '%d bliain' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/gd.js b/esm/locale/gd.js new file mode 100644 index 000000000..fcf62cd5d --- /dev/null +++ b/esm/locale/gd.js @@ -0,0 +1,39 @@ +// Scottish Gaelic [gd] +import dayjs from '../index'; +var locale = { + name: 'gd', + weekdays: 'Didòmhnaich_Diluain_Dimàirt_Diciadain_Diardaoin_Dihaoine_Disathairne'.split('_'), + months: 'Am Faoilleach_An Gearran_Am Màrt_An Giblean_An Cèitean_An t-Ògmhios_An t-Iuchar_An Lùnastal_An t-Sultain_An Dàmhair_An t-Samhain_An Dùbhlachd'.split('_'), + weekStart: 1, + weekdaysShort: 'Did_Dil_Dim_Dic_Dia_Dih_Dis'.split('_'), + monthsShort: 'Faoi_Gear_Màrt_Gibl_Cèit_Ògmh_Iuch_Lùn_Sult_Dàmh_Samh_Dùbh'.split('_'), + weekdaysMin: 'Dò_Lu_Mà_Ci_Ar_Ha_Sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'ann an %s', + past: 'bho chionn %s', + s: 'beagan diogan', + m: 'mionaid', + mm: '%d mionaidean', + h: 'uair', + hh: '%d uairean', + d: 'latha', + dd: '%d latha', + M: 'mìos', + MM: '%d mìosan', + y: 'bliadhna', + yy: '%d bliadhna' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/gl.js b/esm/locale/gl.js new file mode 100644 index 000000000..23d687f63 --- /dev/null +++ b/esm/locale/gl.js @@ -0,0 +1,39 @@ +// Galician [gl] +import dayjs from '../index'; +var locale = { + name: 'gl', + weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), + months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'), + weekStart: 1, + weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), + monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'), + weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'), + ordinal: function ordinal(n) { + return n + "\xBA"; + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm' + }, + relativeTime: { + future: 'en %s', + past: 'fai %s', + s: 'uns segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'unha hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un ano', + yy: '%d anos' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/gom-latn.js b/esm/locale/gom-latn.js new file mode 100644 index 000000000..d621f5b76 --- /dev/null +++ b/esm/locale/gom-latn.js @@ -0,0 +1,25 @@ +// Konkani Latin script [gom-latn] +import dayjs from '../index'; +var locale = { + name: 'gom-latn', + weekdays: "Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split('_'), + months: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'), + weekStart: 1, + weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), + monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'), + weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'A h:mm [vazta]', + LTS: 'A h:mm:ss [vazta]', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY A h:mm [vazta]', + LLLL: 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]', + llll: 'ddd, D MMM YYYY, A h:mm [vazta]' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/gu.js b/esm/locale/gu.js new file mode 100644 index 000000000..e05f44ba1 --- /dev/null +++ b/esm/locale/gu.js @@ -0,0 +1,38 @@ +// Gujarati [gu] +import dayjs from '../index'; +var locale = { + name: 'gu', + weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'), + months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'), + weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'), + monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'), + weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'A h:mm વાગ્યે', + LTS: 'A h:mm:ss વાગ્યે', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm વાગ્યે', + LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે' + }, + relativeTime: { + future: '%s મા', + past: '%s પેહલા', + s: 'અમુક પળો', + m: 'એક મિનિટ', + mm: '%d મિનિટ', + h: 'એક કલાક', + hh: '%d કલાક', + d: 'એક દિવસ', + dd: '%d દિવસ', + M: 'એક મહિનો', + MM: '%d મહિનો', + y: 'એક વર્ષ', + yy: '%d વર્ષ' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/he.js b/esm/locale/he.js new file mode 100644 index 000000000..a8868ff69 --- /dev/null +++ b/esm/locale/he.js @@ -0,0 +1,78 @@ +// Hebrew [he] +import dayjs from '../index'; +var texts = { + s: 'מספר שניות', + ss: '%d שניות', + m: 'דקה', + mm: '%d דקות', + h: 'שעה', + hh: '%d שעות', + hh2: 'שעתיים', + d: 'יום', + dd: '%d ימים', + dd2: 'יומיים', + M: 'חודש', + MM: '%d חודשים', + MM2: 'חודשיים', + y: 'שנה', + yy: '%d שנים', + yy2: 'שנתיים' +}; + +function relativeTimeFormatter(number, withoutSuffix, key) { + var text = texts[key + (number === 2 ? '2' : '')] || texts[key]; + return text.replace('%d', number); +} + +var locale = { + name: 'he', + weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), + weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'), + weekdaysMin: 'א׳_ב׳_ג׳_ד׳_ה׳_ו_ש׳'.split('_'), + months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'), + monthsShort: 'ינו_פבר_מרץ_אפר_מאי_יונ_יול_אוג_ספט_אוק_נוב_דצמ'.split('_'), + relativeTime: { + future: 'בעוד %s', + past: 'לפני %s', + s: relativeTimeFormatter, + m: relativeTimeFormatter, + mm: relativeTimeFormatter, + h: relativeTimeFormatter, + hh: relativeTimeFormatter, + d: relativeTimeFormatter, + dd: relativeTimeFormatter, + M: relativeTimeFormatter, + MM: relativeTimeFormatter, + y: relativeTimeFormatter, + yy: relativeTimeFormatter + }, + ordinal: function ordinal(n) { + return n; + }, + format: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [ב]MMMM YYYY', + LLL: 'D [ב]MMMM YYYY HH:mm', + LLLL: 'dddd, D [ב]MMMM YYYY HH:mm', + l: 'D/M/YYYY', + ll: 'D MMM YYYY', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd, D MMM YYYY HH:mm' + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [ב]MMMM YYYY', + LLL: 'D [ב]MMMM YYYY HH:mm', + LLLL: 'dddd, D [ב]MMMM YYYY HH:mm', + l: 'D/M/YYYY', + ll: 'D MMM YYYY', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd, D MMM YYYY HH:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/hi.js b/esm/locale/hi.js new file mode 100644 index 000000000..e877ed6b1 --- /dev/null +++ b/esm/locale/hi.js @@ -0,0 +1,38 @@ +// Hindi [hi] +import dayjs from '../index'; +var locale = { + name: 'hi', + weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'), + weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'), + monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'), + weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'A h:mm बजे', + LTS: 'A h:mm:ss बजे', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm बजे', + LLLL: 'dddd, D MMMM YYYY, A h:mm बजे' + }, + relativeTime: { + future: '%s में', + past: '%s पहले', + s: 'कुछ ही क्षण', + m: 'एक मिनट', + mm: '%d मिनट', + h: 'एक घंटा', + hh: '%d घंटे', + d: 'एक दिन', + dd: '%d दिन', + M: 'एक महीने', + MM: '%d महीने', + y: 'एक वर्ष', + yy: '%d वर्ष' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/hr.js b/esm/locale/hr.js new file mode 100644 index 000000000..a760fe347 --- /dev/null +++ b/esm/locale/hr.js @@ -0,0 +1,53 @@ +// Croatian [hr] +import dayjs from '../index'; +var monthFormat = 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'); +var monthStandalone = 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_'); +var MONTHS_IN_FORMAT = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/; + +var months = function months(dayjsInstance, format) { + if (MONTHS_IN_FORMAT.test(format)) { + return monthFormat[dayjsInstance.month()]; + } + + return monthStandalone[dayjsInstance.month()]; +}; + +months.s = monthStandalone; +months.f = monthFormat; +var locale = { + name: 'hr', + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + months: months, + monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'), + weekStart: 1, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'sekunda', + m: 'minuta', + mm: '%d minuta', + h: 'sat', + hh: '%d sati', + d: 'dan', + dd: '%d dana', + M: 'mjesec', + MM: '%d mjeseci', + y: 'godina', + yy: '%d godine' + }, + ordinal: function ordinal(n) { + return n + "."; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ht.js b/esm/locale/ht.js new file mode 100644 index 000000000..896739e36 --- /dev/null +++ b/esm/locale/ht.js @@ -0,0 +1,38 @@ +// Haitian Creole (Haiti) [ht] +import dayjs from '../index'; +var locale = { + name: 'ht', + weekdays: 'dimanch_lendi_madi_mèkredi_jedi_vandredi_samdi'.split('_'), + months: 'janvye_fevriye_mas_avril_me_jen_jiyè_out_septanm_oktòb_novanm_desanm'.split('_'), + weekdaysShort: 'dim._len._mad._mèk._jed._van._sam.'.split('_'), + monthsShort: 'jan._fev._mas_avr._me_jen_jiyè._out_sept._okt._nov._des.'.split('_'), + weekdaysMin: 'di_le_ma_mè_je_va_sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'nan %s', + past: 'sa gen %s', + s: 'kèk segond', + m: 'yon minit', + mm: '%d minit', + h: 'inèdtan', + hh: '%d zè', + d: 'yon jou', + dd: '%d jou', + M: 'yon mwa', + MM: '%d mwa', + y: 'yon ane', + yy: '%d ane' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/hu.js b/esm/locale/hu.js new file mode 100644 index 000000000..18df6e46a --- /dev/null +++ b/esm/locale/hu.js @@ -0,0 +1,61 @@ +// Hungarian [hu] +import dayjs from '../index'; +var locale = { + name: 'hu', + weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), + weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), + weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'), + months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'), + monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'), + ordinal: function ordinal(n) { + return n + "."; + }, + weekStart: 1, + relativeTime: { + future: '%s múlva', + past: '%s', + s: function s(_, _s, ___, isFuture) { + return "n\xE9h\xE1ny m\xE1sodperc" + (isFuture || _s ? '' : 'e'); + }, + m: function m(_, s, ___, isFuture) { + return "egy perc" + (isFuture || s ? '' : 'e'); + }, + mm: function mm(n, s, ___, isFuture) { + return n + " perc" + (isFuture || s ? '' : 'e'); + }, + h: function h(_, s, ___, isFuture) { + return "egy " + (isFuture || s ? 'óra' : 'órája'); + }, + hh: function hh(n, s, ___, isFuture) { + return n + " " + (isFuture || s ? 'óra' : 'órája'); + }, + d: function d(_, s, ___, isFuture) { + return "egy " + (isFuture || s ? 'nap' : 'napja'); + }, + dd: function dd(n, s, ___, isFuture) { + return n + " " + (isFuture || s ? 'nap' : 'napja'); + }, + M: function M(_, s, ___, isFuture) { + return "egy " + (isFuture || s ? 'hónap' : 'hónapja'); + }, + MM: function MM(n, s, ___, isFuture) { + return n + " " + (isFuture || s ? 'hónap' : 'hónapja'); + }, + y: function y(_, s, ___, isFuture) { + return "egy " + (isFuture || s ? 'év' : 'éve'); + }, + yy: function yy(n, s, ___, isFuture) { + return n + " " + (isFuture || s ? 'év' : 'éve'); + } + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'YYYY.MM.DD.', + LL: 'YYYY. MMMM D.', + LLL: 'YYYY. MMMM D. H:mm', + LLLL: 'YYYY. MMMM D., dddd H:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/hy-am.js b/esm/locale/hy-am.js new file mode 100644 index 000000000..937f2be5e --- /dev/null +++ b/esm/locale/hy-am.js @@ -0,0 +1,39 @@ +// Armenian [hy-am] +import dayjs from '../index'; +var locale = { + name: 'hy-am', + weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'), + months: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'), + weekStart: 1, + weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'), + weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY թ.', + LLL: 'D MMMM YYYY թ., HH:mm', + LLLL: 'dddd, D MMMM YYYY թ., HH:mm' + }, + relativeTime: { + future: '%s հետո', + past: '%s առաջ', + s: 'մի քանի վայրկյան', + m: 'րոպե', + mm: '%d րոպե', + h: 'ժամ', + hh: '%d ժամ', + d: 'օր', + dd: '%d օր', + M: 'ամիս', + MM: '%d ամիս', + y: 'տարի', + yy: '%d տարի' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/id.js b/esm/locale/id.js new file mode 100644 index 000000000..f743a123c --- /dev/null +++ b/esm/locale/id.js @@ -0,0 +1,39 @@ +// Indonesian [id] +import dayjs from '../index'; +var locale = { + name: 'id', + weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), + months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'), + weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), + monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), + weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), + weekStart: 1, + formats: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lalu', + s: 'beberapa detik', + m: 'semenit', + mm: '%d menit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun' + }, + ordinal: function ordinal(n) { + return n + "."; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/index.d.ts b/esm/locale/index.d.ts new file mode 100644 index 000000000..beb0d36ca --- /dev/null +++ b/esm/locale/index.d.ts @@ -0,0 +1,11 @@ +/// + +declare module 'dayjs/esm/locale/*' { + namespace locale { + interface Locale extends ILocale {} + } + + const locale: locale.Locale + + export = locale +} diff --git a/esm/locale/is.js b/esm/locale/is.js new file mode 100644 index 000000000..22d812129 --- /dev/null +++ b/esm/locale/is.js @@ -0,0 +1,68 @@ +// Icelandic [is] +import dayjs from '../index'; +var texts = { + s: ['nokkrar sekúndur', 'nokkrar sekúndur', 'nokkrum sekúndum'], + m: ['mínúta', 'mínútu', 'mínútu'], + mm: ['mínútur', 'mínútur', 'mínútum'], + h: ['klukkustund', 'klukkustund', 'klukkustund'], + hh: ['klukkustundir', 'klukkustundir', 'klukkustundum'], + d: ['dagur', 'dag', 'degi'], + dd: ['dagar', 'daga', 'dögum'], + M: ['mánuður', 'mánuð', 'mánuði'], + MM: ['mánuðir', 'mánuði', 'mánuðum'], + y: ['ár', 'ár', 'ári'], + yy: ['ár', 'ár', 'árum'] +}; + +function resolveTemplate(key, number, isFuture, withoutSuffix) { + var suffixIndex = isFuture ? 1 : 2; + var index = withoutSuffix ? 0 : suffixIndex; + var keyShouldBeSingular = key.length === 2 && number % 10 === 1; + var correctedKey = keyShouldBeSingular ? key[0] : key; + var unitText = texts[correctedKey]; + var text = unitText[index]; + return key.length === 1 ? text : "%d " + text; +} + +function relativeTimeFormatter(number, withoutSuffix, key, isFuture) { + var template = resolveTemplate(key, number, isFuture, withoutSuffix); + return template.replace('%d', number); +} + +var locale = { + name: 'is', + weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'), + months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'), + weekStart: 1, + weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'), + monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), + weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] H:mm', + LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm' + }, + relativeTime: { + future: 'eftir %s', + past: 'fyrir %s síðan', + s: relativeTimeFormatter, + m: relativeTimeFormatter, + mm: relativeTimeFormatter, + h: relativeTimeFormatter, + hh: relativeTimeFormatter, + d: relativeTimeFormatter, + dd: relativeTimeFormatter, + M: relativeTimeFormatter, + MM: relativeTimeFormatter, + y: relativeTimeFormatter, + yy: relativeTimeFormatter + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/it-ch.js b/esm/locale/it-ch.js new file mode 100644 index 000000000..cfbb94dd4 --- /dev/null +++ b/esm/locale/it-ch.js @@ -0,0 +1,39 @@ +// Italian (Switzerland) [it-ch] +import dayjs from '../index'; +var locale = { + name: 'it-ch', + weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), + months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), + weekStart: 1, + weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'tra %s', + past: '%s fa', + s: 'alcuni secondi', + m: 'un minuto', + mm: '%d minuti', + h: 'un\'ora', + hh: '%d ore', + d: 'un giorno', + dd: '%d giorni', + M: 'un mese', + MM: '%d mesi', + y: 'un anno', + yy: '%d anni' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/it.js b/esm/locale/it.js new file mode 100644 index 000000000..e8d249058 --- /dev/null +++ b/esm/locale/it.js @@ -0,0 +1,39 @@ +// Italian [it] +import dayjs from '../index'; +var locale = { + name: 'it', + weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), + weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), + months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), + weekStart: 1, + monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'tra %s', + past: '%s fa', + s: 'qualche secondo', + m: 'un minuto', + mm: '%d minuti', + h: 'un\' ora', + hh: '%d ore', + d: 'un giorno', + dd: '%d giorni', + M: 'un mese', + MM: '%d mesi', + y: 'un anno', + yy: '%d anni' + }, + ordinal: function ordinal(n) { + return n + "\xBA"; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ja.js b/esm/locale/ja.js new file mode 100644 index 000000000..6568e1390 --- /dev/null +++ b/esm/locale/ja.js @@ -0,0 +1,45 @@ +// Japanese [ja] +import dayjs from '../index'; +var locale = { + name: 'ja', + weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'), + weekdaysShort: '日_月_火_水_木_金_土'.split('_'), + weekdaysMin: '日_月_火_水_木_金_土'.split('_'), + months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + ordinal: function ordinal(n) { + return n + "\u65E5"; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日 dddd HH:mm', + l: 'YYYY/MM/DD', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日(ddd) HH:mm' + }, + meridiem: function meridiem(hour) { + return hour < 12 ? '午前' : '午後'; + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '数秒', + m: '1分', + mm: '%d分', + h: '1時間', + hh: '%d時間', + d: '1日', + dd: '%d日', + M: '1ヶ月', + MM: '%dヶ月', + y: '1年', + yy: '%d年' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/jv.js b/esm/locale/jv.js new file mode 100644 index 000000000..81a3f6607 --- /dev/null +++ b/esm/locale/jv.js @@ -0,0 +1,39 @@ +// Javanese [jv] +import dayjs from '../index'; +var locale = { + name: 'jv', + weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), + months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'), + weekStart: 1, + weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), + monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), + weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + relativeTime: { + future: 'wonten ing %s', + past: '%s ingkang kepengker', + s: 'sawetawis detik', + m: 'setunggal menit', + mm: '%d menit', + h: 'setunggal jam', + hh: '%d jam', + d: 'sedinten', + dd: '%d dinten', + M: 'sewulan', + MM: '%d wulan', + y: 'setaun', + yy: '%d taun' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ka.js b/esm/locale/ka.js new file mode 100644 index 000000000..381fffa41 --- /dev/null +++ b/esm/locale/ka.js @@ -0,0 +1,39 @@ +// Georgian [ka] +import dayjs from '../index'; +var locale = { + name: 'ka', + weekdays: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'), + weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'), + weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), + months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'), + monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'), + weekStart: 1, + formats: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A' + }, + relativeTime: { + future: '%s შემდეგ', + past: '%s წინ', + s: 'წამი', + m: 'წუთი', + mm: '%d წუთი', + h: 'საათი', + hh: '%d საათის', + d: 'დღეს', + dd: '%d დღის განმავლობაში', + M: 'თვის', + MM: '%d თვის', + y: 'წელი', + yy: '%d წლის' + }, + ordinal: function ordinal(n) { + return n; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/kk.js b/esm/locale/kk.js new file mode 100644 index 000000000..f2ca045c3 --- /dev/null +++ b/esm/locale/kk.js @@ -0,0 +1,39 @@ +// Kazakh [kk] +import dayjs from '../index'; +var locale = { + name: 'kk', + weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'), + weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'), + weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'), + months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'), + monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'), + weekStart: 1, + relativeTime: { + future: '%s ішінде', + past: '%s бұрын', + s: 'бірнеше секунд', + m: 'бір минут', + mm: '%d минут', + h: 'бір сағат', + hh: '%d сағат', + d: 'бір күн', + dd: '%d күн', + M: 'бір ай', + MM: '%d ай', + y: 'бір жыл', + yy: '%d жыл' + }, + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/km.js b/esm/locale/km.js new file mode 100644 index 000000000..7fd185ba2 --- /dev/null +++ b/esm/locale/km.js @@ -0,0 +1,39 @@ +// Cambodian [km] +import dayjs from '../index'; +var locale = { + name: 'km', + weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), + months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'), + weekStart: 1, + weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split('_'), + weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: '%sទៀត', + past: '%sមុន', + s: 'ប៉ុន្មានវិនាទី', + m: 'មួយនាទី', + mm: '%d នាទី', + h: 'មួយម៉ោង', + hh: '%d ម៉ោង', + d: 'មួយថ្ងៃ', + dd: '%d ថ្ងៃ', + M: 'មួយខែ', + MM: '%d ខែ', + y: 'មួយឆ្នាំ', + yy: '%d ឆ្នាំ' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/kn.js b/esm/locale/kn.js new file mode 100644 index 000000000..b9ca9b908 --- /dev/null +++ b/esm/locale/kn.js @@ -0,0 +1,38 @@ +// Kannada [kn] +import dayjs from '../index'; +var locale = { + name: 'kn', + weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'), + months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'), + weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'), + monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split('_'), + weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm' + }, + relativeTime: { + future: '%s ನಂತರ', + past: '%s ಹಿಂದೆ', + s: 'ಕೆಲವು ಕ್ಷಣಗಳು', + m: 'ಒಂದು ನಿಮಿಷ', + mm: '%d ನಿಮಿಷ', + h: 'ಒಂದು ಗಂಟೆ', + hh: '%d ಗಂಟೆ', + d: 'ಒಂದು ದಿನ', + dd: '%d ದಿನ', + M: 'ಒಂದು ತಿಂಗಳು', + MM: '%d ತಿಂಗಳು', + y: 'ಒಂದು ವರ್ಷ', + yy: '%d ವರ್ಷ' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ko.js b/esm/locale/ko.js new file mode 100644 index 000000000..cfad49de2 --- /dev/null +++ b/esm/locale/ko.js @@ -0,0 +1,45 @@ +// Korean [ko] +import dayjs from '../index'; +var locale = { + name: 'ko', + weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), + weekdaysShort: '일_월_화_수_목_금_토'.split('_'), + weekdaysMin: '일_월_화_수_목_금_토'.split('_'), + months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + ordinal: function ordinal(n) { + return n + "\uC77C"; + }, + formats: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'YYYY.MM.DD.', + LL: 'YYYY년 MMMM D일', + LLL: 'YYYY년 MMMM D일 A h:mm', + LLLL: 'YYYY년 MMMM D일 dddd A h:mm', + l: 'YYYY.MM.DD.', + ll: 'YYYY년 MMMM D일', + lll: 'YYYY년 MMMM D일 A h:mm', + llll: 'YYYY년 MMMM D일 dddd A h:mm' + }, + meridiem: function meridiem(hour) { + return hour < 12 ? '오전' : '오후'; + }, + relativeTime: { + future: '%s 후', + past: '%s 전', + s: '몇 초', + m: '1분', + mm: '%d분', + h: '한 시간', + hh: '%d시간', + d: '하루', + dd: '%d일', + M: '한 달', + MM: '%d달', + y: '일 년', + yy: '%d년' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ku.js b/esm/locale/ku.js new file mode 100644 index 000000000..e56664eb8 --- /dev/null +++ b/esm/locale/ku.js @@ -0,0 +1,77 @@ +// Kurdish [ku] +import dayjs from '../index'; +export var englishToArabicNumbersMap = { + 1: '١', + 2: '٢', + 3: '٣', + 4: '٤', + 5: '٥', + 6: '٦', + 7: '٧', + 8: '٨', + 9: '٩', + 0: '٠' +}; +var arabicToEnglishNumbersMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0' +}; +var months = ['کانوونی دووەم', 'شوبات', 'ئادار', 'نیسان', 'ئایار', 'حوزەیران', 'تەممووز', 'ئاب', 'ئەیلوول', 'تشرینی یەکەم', 'تشرینی دووەم', 'کانوونی یەکەم']; +var locale = { + name: 'ku', + months: months, + monthsShort: months, + weekdays: 'یەکشەممە_دووشەممە_سێشەممە_چوارشەممە_پێنجشەممە_هەینی_شەممە'.split('_'), + weekdaysShort: 'یەکشەم_دووشەم_سێشەم_چوارشەم_پێنجشەم_هەینی_شەممە'.split('_'), + weekStart: 6, + weekdaysMin: 'ی_د_س_چ_پ_هـ_ش'.split('_'), + preparse: function preparse(string) { + return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return arabicToEnglishNumbersMap[match]; + }).replace(/،/g, ','); + }, + postformat: function postformat(string) { + return string.replace(/\d/g, function (match) { + return englishToArabicNumbersMap[match]; + }).replace(/,/g, '،'); + }, + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + meridiem: function meridiem(hour) { + return hour < 12 ? 'پ.ن' : 'د.ن'; + }, + relativeTime: { + future: 'لە %s', + past: 'لەمەوپێش %s', + s: 'چەند چرکەیەک', + m: 'یەک خولەک', + mm: '%d خولەک', + h: 'یەک کاتژمێر', + hh: '%d کاتژمێر', + d: 'یەک ڕۆژ', + dd: '%d ڕۆژ', + M: 'یەک مانگ', + MM: '%d مانگ', + y: 'یەک ساڵ', + yy: '%d ساڵ' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ky.js b/esm/locale/ky.js new file mode 100644 index 000000000..fd044778b --- /dev/null +++ b/esm/locale/ky.js @@ -0,0 +1,39 @@ +// Kyrgyz [ky] +import dayjs from '../index'; +var locale = { + name: 'ky', + weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'), + months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'), + weekStart: 1, + weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'), + monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'), + weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: '%s ичинде', + past: '%s мурун', + s: 'бирнече секунд', + m: 'бир мүнөт', + mm: '%d мүнөт', + h: 'бир саат', + hh: '%d саат', + d: 'бир күн', + dd: '%d күн', + M: 'бир ай', + MM: '%d ай', + y: 'бир жыл', + yy: '%d жыл' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/lb.js b/esm/locale/lb.js new file mode 100644 index 000000000..21ef4aab6 --- /dev/null +++ b/esm/locale/lb.js @@ -0,0 +1,24 @@ +// Luxembourgish [lb] +import dayjs from '../index'; +var locale = { + name: 'lb', + weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'), + months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), + weekStart: 1, + weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), + monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), + weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'H:mm [Auer]', + LTS: 'H:mm:ss [Auer]', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm [Auer]', + LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/lo.js b/esm/locale/lo.js new file mode 100644 index 000000000..7732ec4b1 --- /dev/null +++ b/esm/locale/lo.js @@ -0,0 +1,38 @@ +// Lao [lo] +import dayjs from '../index'; +var locale = { + name: 'lo', + weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), + weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), + weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'ວັນdddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'ອີກ %s', + past: '%sຜ່ານມາ', + s: 'ບໍ່ເທົ່າໃດວິນາທີ', + m: '1 ນາທີ', + mm: '%d ນາທີ', + h: '1 ຊົ່ວໂມງ', + hh: '%d ຊົ່ວໂມງ', + d: '1 ມື້', + dd: '%d ມື້', + M: '1 ເດືອນ', + MM: '%d ເດືອນ', + y: '1 ປີ', + yy: '%d ປີ' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/lt.js b/esm/locale/lt.js new file mode 100644 index 000000000..cb46ca9b8 --- /dev/null +++ b/esm/locale/lt.js @@ -0,0 +1,70 @@ +// Lithuanian [lt] +import dayjs from '../index'; +var monthFormat = 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'); +var monthStandalone = 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'); // eslint-disable-next-line no-useless-escape + +var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/; + +var months = function months(dayjsInstance, format) { + if (MONTHS_IN_FORMAT.test(format)) { + return monthFormat[dayjsInstance.month()]; + } + + return monthStandalone[dayjsInstance.month()]; +}; + +months.s = monthStandalone; +months.f = monthFormat; +var locale = { + name: 'lt', + weekdays: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'), + weekdaysShort: 'sek_pir_ant_tre_ket_pen_šeš'.split('_'), + weekdaysMin: 's_p_a_t_k_pn_š'.split('_'), + months: months, + monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), + ordinal: function ordinal(n) { + return n + "."; + }, + weekStart: 1, + relativeTime: { + future: 'už %s', + past: 'prieš %s', + s: 'kelias sekundes', + m: 'minutę', + mm: '%d minutes', + h: 'valandą', + hh: '%d valandas', + d: 'dieną', + dd: '%d dienas', + M: 'mėnesį', + MM: '%d mėnesius', + y: 'metus', + yy: '%d metus' + }, + format: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY [m.] MMMM D [d.]', + LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', + l: 'YYYY-MM-DD', + ll: 'YYYY [m.] MMMM D [d.]', + lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]' + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY [m.] MMMM D [d.]', + LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', + l: 'YYYY-MM-DD', + ll: 'YYYY [m.] MMMM D [d.]', + lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/lv.js b/esm/locale/lv.js new file mode 100644 index 000000000..4b18a6140 --- /dev/null +++ b/esm/locale/lv.js @@ -0,0 +1,39 @@ +// Latvian [lv] +import dayjs from '../index'; +var locale = { + name: 'lv', + weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'), + months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'), + weekStart: 1, + weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'), + monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), + weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY.', + LL: 'YYYY. [gada] D. MMMM', + LLL: 'YYYY. [gada] D. MMMM, HH:mm', + LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm' + }, + relativeTime: { + future: 'pēc %s', + past: 'pirms %s', + s: 'dažām sekundēm', + m: 'minūtes', + mm: '%d minūtēm', + h: 'stundas', + hh: '%d stundām', + d: 'dienas', + dd: '%d dienām', + M: 'mēneša', + MM: '%d mēnešiem', + y: 'gada', + yy: '%d gadiem' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/me.js b/esm/locale/me.js new file mode 100644 index 000000000..465c0ff04 --- /dev/null +++ b/esm/locale/me.js @@ -0,0 +1,24 @@ +// Montenegrin [me] +import dayjs from '../index'; +var locale = { + name: 'me', + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), + weekStart: 1, + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/mi.js b/esm/locale/mi.js new file mode 100644 index 000000000..3b56f0ec7 --- /dev/null +++ b/esm/locale/mi.js @@ -0,0 +1,39 @@ +// Maori [mi] +import dayjs from '../index'; +var locale = { + name: 'mi', + weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'), + months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'), + weekStart: 1, + weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'), + weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [i] HH:mm', + LLLL: 'dddd, D MMMM YYYY [i] HH:mm' + }, + relativeTime: { + future: 'i roto i %s', + past: '%s i mua', + s: 'te hēkona ruarua', + m: 'he meneti', + mm: '%d meneti', + h: 'te haora', + hh: '%d haora', + d: 'he ra', + dd: '%d ra', + M: 'he marama', + MM: '%d marama', + y: 'he tau', + yy: '%d tau' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/mk.js b/esm/locale/mk.js new file mode 100644 index 000000000..8522c261c --- /dev/null +++ b/esm/locale/mk.js @@ -0,0 +1,39 @@ +// Macedonian [mk] +import dayjs from '../index'; +var locale = { + name: 'mk', + weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'), + months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'), + weekStart: 1, + weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'), + monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'), + weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'D.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm' + }, + relativeTime: { + future: 'после %s', + past: 'пред %s', + s: 'неколку секунди', + m: 'минута', + mm: '%d минути', + h: 'час', + hh: '%d часа', + d: 'ден', + dd: '%d дена', + M: 'месец', + MM: '%d месеци', + y: 'година', + yy: '%d години' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ml.js b/esm/locale/ml.js new file mode 100644 index 000000000..bfcc277eb --- /dev/null +++ b/esm/locale/ml.js @@ -0,0 +1,38 @@ +// Malayalam [ml] +import dayjs from '../index'; +var locale = { + name: 'ml', + weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'), + months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'), + weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), + monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'), + weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'A h:mm -നു', + LTS: 'A h:mm:ss -നു', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm -നു', + LLLL: 'dddd, D MMMM YYYY, A h:mm -നു' + }, + relativeTime: { + future: '%s കഴിഞ്ഞ്', + past: '%s മുൻപ്', + s: 'അൽപ നിമിഷങ്ങൾ', + m: 'ഒരു മിനിറ്റ്', + mm: '%d മിനിറ്റ്', + h: 'ഒരു മണിക്കൂർ', + hh: '%d മണിക്കൂർ', + d: 'ഒരു ദിവസം', + dd: '%d ദിവസം', + M: 'ഒരു മാസം', + MM: '%d മാസം', + y: 'ഒരു വർഷം', + yy: '%d വർഷം' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/mn.js b/esm/locale/mn.js new file mode 100644 index 000000000..d93cae216 --- /dev/null +++ b/esm/locale/mn.js @@ -0,0 +1,38 @@ +// Mongolian [mn] +import dayjs from '../index'; +var locale = { + name: 'mn', + weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'), + months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'), + weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'), + monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'), + weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY оны MMMMын D', + LLL: 'YYYY оны MMMMын D HH:mm', + LLLL: 'dddd, YYYY оны MMMMын D HH:mm' + }, + relativeTime: { + future: '%s', + past: '%s', + s: 'саяхан', + m: 'м', + mm: '%dм', + h: '1ц', + hh: '%dц', + d: '1ө', + dd: '%dө', + M: '1с', + MM: '%dс', + y: '1ж', + yy: '%dж' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/mr.js b/esm/locale/mr.js new file mode 100644 index 000000000..9eac8a734 --- /dev/null +++ b/esm/locale/mr.js @@ -0,0 +1,23 @@ +// Marathi [mr] +import dayjs from '../index'; +var locale = { + name: 'mr', + weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'), + weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'), + monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'), + weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'A h:mm वाजता', + LTS: 'A h:mm:ss वाजता', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm वाजता', + LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ms-my.js b/esm/locale/ms-my.js new file mode 100644 index 000000000..51382197a --- /dev/null +++ b/esm/locale/ms-my.js @@ -0,0 +1,39 @@ +// Malay [ms-my] +import dayjs from '../index'; +var locale = { + name: 'ms-my', + weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), + weekStart: 1, + weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm' + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lepas', + s: 'beberapa saat', + m: 'seminit', + mm: '%d minit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ms.js b/esm/locale/ms.js new file mode 100644 index 000000000..86349f3fd --- /dev/null +++ b/esm/locale/ms.js @@ -0,0 +1,39 @@ +// Malay [ms] +import dayjs from '../index'; +var locale = { + name: 'ms', + weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekStart: 1, + formats: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH.mm', + LLLL: 'dddd, D MMMM YYYY HH.mm' + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lepas', + s: 'beberapa saat', + m: 'seminit', + mm: '%d minit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun' + }, + ordinal: function ordinal(n) { + return n + "."; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/mt.js b/esm/locale/mt.js new file mode 100644 index 000000000..9c9095381 --- /dev/null +++ b/esm/locale/mt.js @@ -0,0 +1,39 @@ +// Maltese (Malta) [mt] +import dayjs from '../index'; +var locale = { + name: 'mt', + weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'), + months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'), + weekStart: 1, + weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'), + monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'), + weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'f’ %s', + past: '%s ilu', + s: 'ftit sekondi', + m: 'minuta', + mm: '%d minuti', + h: 'siegħa', + hh: '%d siegħat', + d: 'ġurnata', + dd: '%d ġranet', + M: 'xahar', + MM: '%d xhur', + y: 'sena', + yy: '%d sni' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/my.js b/esm/locale/my.js new file mode 100644 index 000000000..73b263339 --- /dev/null +++ b/esm/locale/my.js @@ -0,0 +1,39 @@ +// Burmese [my] +import dayjs from '../index'; +var locale = { + name: 'my', + weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'), + months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'), + weekStart: 1, + weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), + weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'လာမည့် %s မှာ', + past: 'လွန်ခဲ့သော %s က', + s: 'စက္ကန်.အနည်းငယ်', + m: 'တစ်မိနစ်', + mm: '%d မိနစ်', + h: 'တစ်နာရီ', + hh: '%d နာရီ', + d: 'တစ်ရက်', + dd: '%d ရက်', + M: 'တစ်လ', + MM: '%d လ', + y: 'တစ်နှစ်', + yy: '%d နှစ်' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/nb.js b/esm/locale/nb.js new file mode 100644 index 000000000..1d7b1eb56 --- /dev/null +++ b/esm/locale/nb.js @@ -0,0 +1,40 @@ +// Norwegian Bokmål [nb] +import dayjs from '../index'; +var locale = { + name: 'nb', + weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'), + weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), + months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort: 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'), + ordinal: function ordinal(n) { + return n + "."; + }, + weekStart: 1, + yearStart: 4, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] HH:mm', + LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm' + }, + relativeTime: { + future: 'om %s', + past: '%s siden', + s: 'noen sekunder', + m: 'ett minutt', + mm: '%d minutter', + h: 'en time', + hh: '%d timer', + d: 'en dag', + dd: '%d dager', + M: 'en måned', + MM: '%d måneder', + y: 'ett år', + yy: '%d år' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ne.js b/esm/locale/ne.js new file mode 100644 index 000000000..4f5a0044e --- /dev/null +++ b/esm/locale/ne.js @@ -0,0 +1,40 @@ +// Nepalese [ne] +import dayjs from '../index'; +var locale = { + name: 'ne', + weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'), + weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'), + weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'), + months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मे_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'), + monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'), + relativeTime: { + future: '%s पछि', + past: '%s अघि', + s: 'सेकेन्ड', + m: 'एक मिनेट', + mm: '%d मिनेट', + h: 'घन्टा', + hh: '%d घन्टा', + d: 'एक दिन', + dd: '%d दिन', + M: 'एक महिना', + MM: '%d महिना', + y: 'एक वर्ष', + yy: '%d वर्ष' + }, + ordinal: function ordinal(n) { + return ("" + n).replace(/\d/g, function (i) { + return '०१२३४५६७८९'[i]; + }); + }, + formats: { + LT: 'Aको h:mm बजे', + LTS: 'Aको h:mm:ss बजे', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, Aको h:mm बजे', + LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/nl-be.js b/esm/locale/nl-be.js new file mode 100644 index 000000000..51465b710 --- /dev/null +++ b/esm/locale/nl-be.js @@ -0,0 +1,39 @@ +// Dutch (Belgium) [nl-be] +import dayjs from '../index'; +var locale = { + name: 'nl-be', + weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), + months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), + monthsShort: 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), + weekStart: 1, + weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'over %s', + past: '%s geleden', + s: 'een paar seconden', + m: 'één minuut', + mm: '%d minuten', + h: 'één uur', + hh: '%d uur', + d: 'één dag', + dd: '%d dagen', + M: 'één maand', + MM: '%d maanden', + y: 'één jaar', + yy: '%d jaar' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/nl.js b/esm/locale/nl.js new file mode 100644 index 000000000..ee1ac747a --- /dev/null +++ b/esm/locale/nl.js @@ -0,0 +1,40 @@ +// Dutch [nl] +import dayjs from '../index'; +var locale = { + name: 'nl', + weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), + weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), + months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), + monthsShort: 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'), + ordinal: function ordinal(n) { + return "[" + n + (n === 1 || n === 8 || n >= 20 ? 'ste' : 'de') + "]"; + }, + weekStart: 1, + yearStart: 4, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'over %s', + past: '%s geleden', + s: 'een paar seconden', + m: 'een minuut', + mm: '%d minuten', + h: 'een uur', + hh: '%d uur', + d: 'een dag', + dd: '%d dagen', + M: 'een maand', + MM: '%d maanden', + y: 'een jaar', + yy: '%d jaar' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/nn.js b/esm/locale/nn.js new file mode 100644 index 000000000..43767a40b --- /dev/null +++ b/esm/locale/nn.js @@ -0,0 +1,39 @@ +// Nynorsk [nn] +import dayjs from '../index'; +var locale = { + name: 'nn', + weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), + weekdaysShort: 'sun_mån_tys_ons_tor_fre_lau'.split('_'), + weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'), + months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), + monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + ordinal: function ordinal(n) { + return n + "."; + }, + weekStart: 1, + relativeTime: { + future: 'om %s', + past: 'for %s sidan', + s: 'nokre sekund', + m: 'eitt minutt', + mm: '%d minutt', + h: 'ein time', + hh: '%d timar', + d: 'ein dag', + dd: '%d dagar', + M: 'ein månad', + MM: '%d månadar', + y: 'eitt år', + yy: '%d år' + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] H:mm', + LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/oc-lnc.js b/esm/locale/oc-lnc.js new file mode 100644 index 000000000..91e2f0d35 --- /dev/null +++ b/esm/locale/oc-lnc.js @@ -0,0 +1,39 @@ +// Occitan, lengadocian dialecte [oc-lnc] +import dayjs from '../index'; +var locale = { + name: 'oc-lnc', + weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split('_'), + weekdaysShort: 'Dg_Dl_Dm_Dc_Dj_Dv_Ds'.split('_'), + weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'), + months: 'genièr_febrièr_març_abrial_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split('_'), + monthsShort: 'gen_feb_març_abr_mai_junh_julh_ago_set_oct_nov_dec'.split('_'), + weekStart: 1, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [de] YYYY', + LLL: 'D MMMM [de] YYYY [a] H:mm', + LLLL: 'dddd D MMMM [de] YYYY [a] H:mm' + }, + relativeTime: { + future: 'd\'aquí %s', + past: 'fa %s', + s: 'unas segondas', + m: 'una minuta', + mm: '%d minutas', + h: 'una ora', + hh: '%d oras', + d: 'un jorn', + dd: '%d jorns', + M: 'un mes', + MM: '%d meses', + y: 'un an', + yy: '%d ans' + }, + ordinal: function ordinal(n) { + return n + "\xBA"; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/pa-in.js b/esm/locale/pa-in.js new file mode 100644 index 000000000..624a8522e --- /dev/null +++ b/esm/locale/pa-in.js @@ -0,0 +1,38 @@ +// Punjabi (India) [pa-in] +import dayjs from '../index'; +var locale = { + name: 'pa-in', + weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'), + months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), + weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), + weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'A h:mm ਵਜੇ', + LTS: 'A h:mm:ss ਵਜੇ', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm ਵਜੇ', + LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ' + }, + relativeTime: { + future: '%s ਵਿੱਚ', + past: '%s ਪਿਛਲੇ', + s: 'ਕੁਝ ਸਕਿੰਟ', + m: 'ਇਕ ਮਿੰਟ', + mm: '%d ਮਿੰਟ', + h: 'ਇੱਕ ਘੰਟਾ', + hh: '%d ਘੰਟੇ', + d: 'ਇੱਕ ਦਿਨ', + dd: '%d ਦਿਨ', + M: 'ਇੱਕ ਮਹੀਨਾ', + MM: '%d ਮਹੀਨੇ', + y: 'ਇੱਕ ਸਾਲ', + yy: '%d ਸਾਲ' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/pl.js b/esm/locale/pl.js new file mode 100644 index 000000000..368b2a5e8 --- /dev/null +++ b/esm/locale/pl.js @@ -0,0 +1,87 @@ +// Polish [pl] +import dayjs from '../index'; + +function plural(n) { + return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1; // eslint-disable-line +} +/* eslint-disable */ + + +function translate(number, withoutSuffix, key) { + var result = number + " "; + + switch (key) { + case 'm': + return withoutSuffix ? 'minuta' : 'minutę'; + + case 'mm': + return result + (plural(number) ? 'minuty' : 'minut'); + + case 'h': + return withoutSuffix ? 'godzina' : 'godzinę'; + + case 'hh': + return result + (plural(number) ? 'godziny' : 'godzin'); + + case 'MM': + return result + (plural(number) ? 'miesiące' : 'miesięcy'); + + case 'yy': + return result + (plural(number) ? 'lata' : 'lat'); + } +} +/* eslint-enable */ + + +var monthFormat = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_'); +var monthStandalone = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'); +var MONTHS_IN_FORMAT = /D MMMM/; + +var months = function months(dayjsInstance, format) { + if (MONTHS_IN_FORMAT.test(format)) { + return monthFormat[dayjsInstance.month()]; + } + + return monthStandalone[dayjsInstance.month()]; +}; + +months.s = monthStandalone; +months.f = monthFormat; +var locale = { + name: 'pl', + weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'), + weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'), + weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'), + months: months, + monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), + ordinal: function ordinal(n) { + return n + "."; + }, + weekStart: 1, + yearStart: 4, + relativeTime: { + future: 'za %s', + past: '%s temu', + s: 'kilka sekund', + m: translate, + mm: translate, + h: translate, + hh: translate, + d: '1 dzień', + dd: '%d dni', + M: 'miesiąc', + MM: translate, + y: 'rok', + yy: translate + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/pt-br.js b/esm/locale/pt-br.js new file mode 100644 index 000000000..0635cd850 --- /dev/null +++ b/esm/locale/pt-br.js @@ -0,0 +1,38 @@ +// Portuguese (Brazil) [pt-br] +import dayjs from '../index'; +var locale = { + name: 'pt-br', + weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split('_'), + weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'), + weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'), + monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), + ordinal: function ordinal(n) { + return n + "\xBA"; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY [às] HH:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm' + }, + relativeTime: { + future: 'em %s', + past: 'há %s', + s: 'poucos segundos', + m: 'um minuto', + mm: '%d minutos', + h: 'uma hora', + hh: '%d horas', + d: 'um dia', + dd: '%d dias', + M: 'um mês', + MM: '%d meses', + y: 'um ano', + yy: '%d anos' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/pt.js b/esm/locale/pt.js new file mode 100644 index 000000000..cba233197 --- /dev/null +++ b/esm/locale/pt.js @@ -0,0 +1,40 @@ +// Portuguese [pt] +import dayjs from '../index'; +var locale = { + name: 'pt', + weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split('_'), + weekdaysShort: 'dom_seg_ter_qua_qui_sex_sab'.split('_'), + weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sa'.split('_'), + months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'), + monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), + ordinal: function ordinal(n) { + return n + "\xBA"; + }, + weekStart: 1, + yearStart: 4, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY [às] HH:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm' + }, + relativeTime: { + future: 'em %s', + past: 'há %s', + s: 'alguns segundos', + m: 'um minuto', + mm: '%d minutos', + h: 'uma hora', + hh: '%d horas', + d: 'um dia', + dd: '%d dias', + M: 'um mês', + MM: '%d meses', + y: 'um ano', + yy: '%d anos' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/rn.js b/esm/locale/rn.js new file mode 100644 index 000000000..21b3cdb73 --- /dev/null +++ b/esm/locale/rn.js @@ -0,0 +1,39 @@ +// Kirundi [rn] +import dayjs from '../index'; +var locale = { + name: 'rn', + weekdays: 'Ku wa Mungu_Ku wa Mbere_Ku wa Kabiri_Ku wa Gatatu_Ku wa Kane_Ku wa Gatanu_Ku wa Gatandatu'.split('_'), + weekdaysShort: 'Kngu_Kmbr_Kbri_Ktat_Kkan_Ktan_Kdat'.split('_'), + weekdaysMin: 'K7_K1_K2_K3_K4_K5_K6'.split('_'), + months: 'Nzero_Ruhuhuma_Ntwarante_Ndamukiza_Rusama_Ruhenshi_Mukakaro_Myandagaro_Nyakanga_Gitugutu_Munyonyo_Kigarama'.split('_'), + monthsShort: 'Nzer_Ruhuh_Ntwar_Ndam_Rus_Ruhen_Muk_Myand_Nyak_Git_Muny_Kig'.split('_'), + weekStart: 1, + ordinal: function ordinal(n) { + return n; + }, + relativeTime: { + future: 'mu %s', + past: '%s', + s: 'amasegonda', + m: 'Umunota', + mm: '%d iminota', + h: 'isaha', + hh: '%d amasaha', + d: 'Umunsi', + dd: '%d iminsi', + M: 'ukwezi', + MM: '%d amezi', + y: 'umwaka', + yy: '%d imyaka' + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ro.js b/esm/locale/ro.js new file mode 100644 index 000000000..93ef6bfc1 --- /dev/null +++ b/esm/locale/ro.js @@ -0,0 +1,39 @@ +// Romanian [ro] +import dayjs from '../index'; +var locale = { + name: 'ro', + weekdays: 'Duminică_Luni_Marți_Miercuri_Joi_Vineri_Sâmbătă'.split('_'), + weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), + weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), + months: 'Ianuarie_Februarie_Martie_Aprilie_Mai_Iunie_Iulie_August_Septembrie_Octombrie_Noiembrie_Decembrie'.split('_'), + monthsShort: 'Ian._Febr._Mart._Apr._Mai_Iun._Iul._Aug._Sept._Oct._Nov._Dec.'.split('_'), + weekStart: 1, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm' + }, + relativeTime: { + future: 'peste %s', + past: 'acum %s', + s: 'câteva secunde', + m: 'un minut', + mm: '%d minute', + h: 'o oră', + hh: '%d ore', + d: 'o zi', + dd: '%d zile', + M: 'o lună', + MM: '%d luni', + y: 'un an', + yy: '%d ani' + }, + ordinal: function ordinal(n) { + return n; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ru.js b/esm/locale/ru.js new file mode 100644 index 000000000..fbb1b3589 --- /dev/null +++ b/esm/locale/ru.js @@ -0,0 +1,99 @@ +// Russian [ru] +import dayjs from '../index'; +var monthFormat = 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'); +var monthStandalone = 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'); +var monthShortFormat = 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'); +var monthShortStandalone = 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_'); +var MONTHS_IN_FORMAT = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/; + +function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]; // eslint-disable-line +} + +function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', + hh: 'час_часа_часов', + dd: 'день_дня_дней', + MM: 'месяц_месяца_месяцев', + yy: 'год_года_лет' + }; + + if (key === 'm') { + return withoutSuffix ? 'минута' : 'минуту'; + } + + return number + " " + plural(format[key], +number); +} + +var months = function months(dayjsInstance, format) { + if (MONTHS_IN_FORMAT.test(format)) { + return monthFormat[dayjsInstance.month()]; + } + + return monthStandalone[dayjsInstance.month()]; +}; + +months.s = monthStandalone; +months.f = monthFormat; + +var monthsShort = function monthsShort(dayjsInstance, format) { + if (MONTHS_IN_FORMAT.test(format)) { + return monthShortFormat[dayjsInstance.month()]; + } + + return monthShortStandalone[dayjsInstance.month()]; +}; + +monthsShort.s = monthShortStandalone; +monthsShort.f = monthShortFormat; +var locale = { + name: 'ru', + weekdays: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'), + weekdaysShort: 'вск_пнд_втр_срд_чтв_птн_сбт'.split('_'), + weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + months: months, + monthsShort: monthsShort, + weekStart: 1, + yearStart: 4, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY г.', + LLL: 'D MMMM YYYY г., H:mm', + LLLL: 'dddd, D MMMM YYYY г., H:mm' + }, + relativeTime: { + future: 'через %s', + past: '%s назад', + s: 'несколько секунд', + m: relativeTimeWithPlural, + mm: relativeTimeWithPlural, + h: 'час', + hh: relativeTimeWithPlural, + d: 'день', + dd: relativeTimeWithPlural, + M: 'месяц', + MM: relativeTimeWithPlural, + y: 'год', + yy: relativeTimeWithPlural + }, + ordinal: function ordinal(n) { + return n; + }, + meridiem: function meridiem(hour) { + if (hour < 4) { + return 'ночи'; + } else if (hour < 12) { + return 'утра'; + } else if (hour < 17) { + return 'дня'; + } + + return 'вечера'; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/rw.js b/esm/locale/rw.js new file mode 100644 index 000000000..1e53ac760 --- /dev/null +++ b/esm/locale/rw.js @@ -0,0 +1,35 @@ +// Kinyarwanda (Rwanda) [rw] +import dayjs from '../index'; +var locale = { + name: 'rw', + weekdays: 'Ku Cyumweru_Kuwa Mbere_Kuwa Kabiri_Kuwa Gatatu_Kuwa Kane_Kuwa Gatanu_Kuwa Gatandatu'.split('_'), + months: 'Mutarama_Gashyantare_Werurwe_Mata_Gicurasi_Kamena_Nyakanga_Kanama_Nzeri_Ukwakira_Ugushyingo_Ukuboza'.split('_'), + relativeTime: { + future: 'mu %s', + past: '%s', + s: 'amasegonda', + m: 'Umunota', + mm: '%d iminota', + h: 'isaha', + hh: '%d amasaha', + d: 'Umunsi', + dd: '%d iminsi', + M: 'ukwezi', + MM: '%d amezi', + y: 'umwaka', + yy: '%d imyaka' + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + ordinal: function ordinal(n) { + return n; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/sd.js b/esm/locale/sd.js new file mode 100644 index 000000000..a429f8db2 --- /dev/null +++ b/esm/locale/sd.js @@ -0,0 +1,39 @@ +// Sindhi [sd] +import dayjs from '../index'; +var locale = { + name: 'sd', + weekdays: 'آچر_سومر_اڱارو_اربع_خميس_جمع_ڇنڇر'.split('_'), + months: 'جنوري_فيبروري_مارچ_اپريل_مئي_جون_جولاءِ_آگسٽ_سيپٽمبر_آڪٽوبر_نومبر_ڊسمبر'.split('_'), + weekStart: 1, + weekdaysShort: 'آچر_سومر_اڱارو_اربع_خميس_جمع_ڇنڇر'.split('_'), + monthsShort: 'جنوري_فيبروري_مارچ_اپريل_مئي_جون_جولاءِ_آگسٽ_سيپٽمبر_آڪٽوبر_نومبر_ڊسمبر'.split('_'), + weekdaysMin: 'آچر_سومر_اڱارو_اربع_خميس_جمع_ڇنڇر'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd، D MMMM YYYY HH:mm' + }, + relativeTime: { + future: '%s پوء', + past: '%s اڳ', + s: 'چند سيڪنڊ', + m: 'هڪ منٽ', + mm: '%d منٽ', + h: 'هڪ ڪلاڪ', + hh: '%d ڪلاڪ', + d: 'هڪ ڏينهن', + dd: '%d ڏينهن', + M: 'هڪ مهينو', + MM: '%d مهينا', + y: 'هڪ سال', + yy: '%d سال' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/se.js b/esm/locale/se.js new file mode 100644 index 000000000..691099cef --- /dev/null +++ b/esm/locale/se.js @@ -0,0 +1,39 @@ +// Northern Sami [se] +import dayjs from '../index'; +var locale = { + name: 'se', + weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'), + months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'), + weekStart: 1, + weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'), + monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'), + weekdaysMin: 's_v_m_g_d_b_L'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'MMMM D. [b.] YYYY', + LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm', + LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm' + }, + relativeTime: { + future: '%s geažes', + past: 'maŋit %s', + s: 'moadde sekunddat', + m: 'okta minuhta', + mm: '%d minuhtat', + h: 'okta diimmu', + hh: '%d diimmut', + d: 'okta beaivi', + dd: '%d beaivvit', + M: 'okta mánnu', + MM: '%d mánut', + y: 'okta jahki', + yy: '%d jagit' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/si.js b/esm/locale/si.js new file mode 100644 index 000000000..89b67bfd1 --- /dev/null +++ b/esm/locale/si.js @@ -0,0 +1,38 @@ +// Sinhalese [si] +import dayjs from '../index'; +var locale = { + name: 'si', + weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'), + months: 'දුරුතු_නවම්_මැදින්_බක්_වෙසක්_පොසොන්_ඇසළ_නිකිණි_බිනර_වප්_ඉල්_උඳුවප්'.split('_'), + weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'), + monthsShort: 'දුරු_නව_මැදි_බක්_වෙස_පොසො_ඇස_නිකි_බින_වප්_ඉල්_උඳු'.split('_'), + weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'a h:mm', + LTS: 'a h:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY MMMM D', + LLL: 'YYYY MMMM D, a h:mm', + LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss' + }, + relativeTime: { + future: '%sකින්', + past: '%sකට පෙර', + s: 'තත්පර කිහිපය', + m: 'විනාඩිය', + mm: 'විනාඩි %d', + h: 'පැය', + hh: 'පැය %d', + d: 'දිනය', + dd: 'දින %d', + M: 'මාසය', + MM: 'මාස %d', + y: 'වසර', + yy: 'වසර %d' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/sk.js b/esm/locale/sk.js new file mode 100644 index 000000000..222401fd5 --- /dev/null +++ b/esm/locale/sk.js @@ -0,0 +1,121 @@ +// Slovak [sk] +import dayjs from '../index'; + +function plural(n) { + return n > 1 && n < 5 && ~~(n / 10) !== 1; // eslint-disable-line +} +/* eslint-disable */ + + +function translate(number, withoutSuffix, key, isFuture) { + var result = number + " "; + + switch (key) { + case 's': + // a few seconds / in a few seconds / a few seconds ago + return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami'; + + case 'm': + // a minute / in a minute / a minute ago + return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou'; + + case 'mm': + // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'minúty' : 'minút'); + } + + return result + "min\xFAtami"; + + case 'h': + // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; + + case 'hh': + // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'hodiny' : 'hodín'); + } + + return result + "hodinami"; + + case 'd': + // a day / in a day / a day ago + return withoutSuffix || isFuture ? 'deň' : 'dňom'; + + case 'dd': + // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'dni' : 'dní'); + } + + return result + "d\u0148ami"; + + case 'M': + // a month / in a month / a month ago + return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom'; + + case 'MM': + // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'mesiace' : 'mesiacov'); + } + + return result + "mesiacmi"; + + case 'y': + // a year / in a year / a year ago + return withoutSuffix || isFuture ? 'rok' : 'rokom'; + + case 'yy': + // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural(number) ? 'roky' : 'rokov'); + } + + return result + "rokmi"; + } +} +/* eslint-enable */ + + +var locale = { + name: 'sk', + weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'), + weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'), + weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'), + months: 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'), + monthsShort: 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'), + weekStart: 1, + yearStart: 4, + ordinal: function ordinal(n) { + return n + "."; + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd D. MMMM YYYY H:mm', + l: 'D. M. YYYY' + }, + relativeTime: { + future: 'za %s', + // Should be `o %s` (change when moment/moment#5408 is fixed) + past: 'pred %s', + s: translate, + m: translate, + mm: translate, + h: translate, + hh: translate, + d: translate, + dd: translate, + M: translate, + MM: translate, + y: translate, + yy: translate + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/sl.js b/esm/locale/sl.js new file mode 100644 index 000000000..e3c583935 --- /dev/null +++ b/esm/locale/sl.js @@ -0,0 +1,141 @@ +// Slovenian [sl] +import dayjs from '../index'; + +function dual(n) { + return n % 100 == 2; // eslint-disable-line +} + +function threeFour(n) { + return n % 100 == 3 || n % 100 == 4; // eslint-disable-line +} +/* eslint-disable */ + + +function translate(number, withoutSuffix, key, isFuture) { + var result = number + " "; + + switch (key) { + case 's': + // a few seconds / in a few seconds / a few seconds ago + return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami'; + + case 'm': + // a minute / in a minute / a minute ago + return withoutSuffix ? 'ena minuta' : 'eno minuto'; + + case 'mm': + // 9 minutes / in 9 minutes / 9 minutes ago + if (dual(number)) { + return result + (withoutSuffix || isFuture ? 'minuti' : 'minutama'); + } + + if (threeFour(number)) { + return result + (withoutSuffix || isFuture ? 'minute' : 'minutami'); + } + + return result + (withoutSuffix || isFuture ? 'minut' : 'minutami'); + + case 'h': + // an hour / in an hour / an hour ago + return withoutSuffix ? 'ena ura' : isFuture ? 'eno uro' : 'eno uro'; + + case 'hh': + // 9 hours / in 9 hours / 9 hours ago + if (dual(number)) { + return result + (withoutSuffix || isFuture ? 'uri' : 'urama'); + } + + if (threeFour(number)) { + return result + (withoutSuffix || isFuture ? 'ure' : 'urami'); + } + + return result + (withoutSuffix || isFuture ? 'ur' : 'urami'); + + case 'd': + // a day / in a day / a day ago + return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; + + case 'dd': + // 9 days / in 9 days / 9 days ago + if (dual(number)) { + return result + (withoutSuffix || isFuture ? 'dneva' : 'dnevoma'); + } + + return result + (withoutSuffix || isFuture ? 'dni' : 'dnevi'); + + case 'M': + // a month / in a month / a month ago + return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; + + case 'MM': + // 9 months / in 9 months / 9 months ago + if (dual(number)) { + // 2 minutes / in 2 minutes + return result + (withoutSuffix || isFuture ? 'meseca' : 'mesecema'); + } + + if (threeFour(number)) { + return result + (withoutSuffix || isFuture ? 'mesece' : 'meseci'); + } + + return result + (withoutSuffix || isFuture ? 'mesecev' : 'meseci'); + + case 'y': + // a year / in a year / a year ago + return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; + + case 'yy': + // 9 years / in 9 years / 9 years ago + if (dual(number)) { + // 2 minutes / in 2 minutes + return result + (withoutSuffix || isFuture ? 'leti' : 'letoma'); + } + + if (threeFour(number)) { + return result + (withoutSuffix || isFuture ? 'leta' : 'leti'); + } + + return result + (withoutSuffix || isFuture ? 'let' : 'leti'); + } +} +/* eslint-enable */ + + +var locale = { + name: 'sl', + weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'), + months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'), + weekStart: 1, + weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'), + monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'), + weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'), + ordinal: function ordinal(n) { + return n + "."; + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + l: 'D. M. YYYY' + }, + relativeTime: { + future: 'čez %s', + past: 'pred %s', + s: translate, + m: translate, + mm: translate, + h: translate, + hh: translate, + d: translate, + dd: translate, + M: translate, + MM: translate, + y: translate, + yy: translate + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/sq.js b/esm/locale/sq.js new file mode 100644 index 000000000..625b7013d --- /dev/null +++ b/esm/locale/sq.js @@ -0,0 +1,39 @@ +// Albanian [sq] +import dayjs from '../index'; +var locale = { + name: 'sq', + weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'), + months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'), + weekStart: 1, + weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), + monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), + weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'në %s', + past: '%s më parë', + s: 'disa sekonda', + m: 'një minutë', + mm: '%d minuta', + h: 'një orë', + hh: '%d orë', + d: 'një ditë', + dd: '%d ditë', + M: 'një muaj', + MM: '%d muaj', + y: 'një vit', + yy: '%d vite' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/sr-cyrl.js b/esm/locale/sr-cyrl.js new file mode 100644 index 000000000..2e40d51ac --- /dev/null +++ b/esm/locale/sr-cyrl.js @@ -0,0 +1,74 @@ +// Serbian Cyrillic [sr-cyrl] +import dayjs from '../index'; +var translator = { + words: { + m: ['један минут', 'једног минута'], + mm: ['%d минут', '%d минута', '%d минута'], + h: ['један сат', 'једног сата'], + hh: ['%d сат', '%d сата', '%d сати'], + d: ['један дан', 'једног дана'], + dd: ['%d дан', '%d дана', '%d дана'], + M: ['један месец', 'једног месеца'], + MM: ['%d месец', '%d месеца', '%d месеци'], + y: ['једну годину', 'једне године'], + yy: ['%d годину', '%d године', '%d година'] + }, + correctGrammarCase: function correctGrammarCase(number, wordKey) { + if (number % 10 >= 1 && number % 10 <= 4 && (number % 100 < 10 || number % 100 >= 20)) { + return number % 10 === 1 ? wordKey[0] : wordKey[1]; + } + + return wordKey[2]; + }, + relativeTimeFormatter: function relativeTimeFormatter(number, withoutSuffix, key, isFuture) { + var wordKey = translator.words[key]; + + if (key.length === 1) { + // Nominativ + if (key === 'y' && withoutSuffix) return 'једна година'; + return isFuture || withoutSuffix ? wordKey[0] : wordKey[1]; + } + + var word = translator.correctGrammarCase(number, wordKey); // Nominativ + + if (key === 'yy' && withoutSuffix && word === '%d годину') return number + " \u0433\u043E\u0434\u0438\u043D\u0430"; + return word.replace('%d', number); + } +}; +var locale = { + name: 'sr-cyrl', + weekdays: 'Недеља_Понедељак_Уторак_Среда_Четвртак_Петак_Субота'.split('_'), + weekdaysShort: 'Нед._Пон._Уто._Сре._Чет._Пет._Суб.'.split('_'), + weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'), + months: 'Јануар_Фебруар_Март_Април_Мај_Јун_Јул_Август_Септембар_Октобар_Новембар_Децембар'.split('_'), + monthsShort: 'Јан._Феб._Мар._Апр._Мај_Јун_Јул_Авг._Сеп._Окт._Нов._Дец.'.split('_'), + weekStart: 1, + relativeTime: { + future: 'за %s', + past: 'пре %s', + s: 'неколико секунди', + m: translator.relativeTimeFormatter, + mm: translator.relativeTimeFormatter, + h: translator.relativeTimeFormatter, + hh: translator.relativeTimeFormatter, + d: translator.relativeTimeFormatter, + dd: translator.relativeTimeFormatter, + M: translator.relativeTimeFormatter, + MM: translator.relativeTimeFormatter, + y: translator.relativeTimeFormatter, + yy: translator.relativeTimeFormatter + }, + ordinal: function ordinal(n) { + return n + "."; + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'D. M. YYYY.', + LL: 'D. MMMM YYYY.', + LLL: 'D. MMMM YYYY. H:mm', + LLLL: 'dddd, D. MMMM YYYY. H:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/sr.js b/esm/locale/sr.js new file mode 100644 index 000000000..f5174cedb --- /dev/null +++ b/esm/locale/sr.js @@ -0,0 +1,74 @@ +// Serbian [sr] +import dayjs from '../index'; +var translator = { + words: { + m: ['jedan minut', 'jednog minuta'], + mm: ['%d minut', '%d minuta', '%d minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['%d sat', '%d sata', '%d sati'], + d: ['jedan dan', 'jednog dana'], + dd: ['%d dan', '%d dana', '%d dana'], + M: ['jedan mesec', 'jednog meseca'], + MM: ['%d mesec', '%d meseca', '%d meseci'], + y: ['jednu godinu', 'jedne godine'], + yy: ['%d godinu', '%d godine', '%d godina'] + }, + correctGrammarCase: function correctGrammarCase(number, wordKey) { + if (number % 10 >= 1 && number % 10 <= 4 && (number % 100 < 10 || number % 100 >= 20)) { + return number % 10 === 1 ? wordKey[0] : wordKey[1]; + } + + return wordKey[2]; + }, + relativeTimeFormatter: function relativeTimeFormatter(number, withoutSuffix, key, isFuture) { + var wordKey = translator.words[key]; + + if (key.length === 1) { + // Nominativ + if (key === 'y' && withoutSuffix) return 'jedna godina'; + return isFuture || withoutSuffix ? wordKey[0] : wordKey[1]; + } + + var word = translator.correctGrammarCase(number, wordKey); // Nominativ + + if (key === 'yy' && withoutSuffix && word === '%d godinu') return number + " godina"; + return word.replace('%d', number); + } +}; +var locale = { + name: 'sr', + weekdays: 'Nedelja_Ponedeljak_Utorak_Sreda_Četvrtak_Petak_Subota'.split('_'), + weekdaysShort: 'Ned._Pon._Uto._Sre._Čet._Pet._Sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + months: 'Januar_Februar_Mart_April_Maj_Jun_Jul_Avgust_Septembar_Oktobar_Novembar_Decembar'.split('_'), + monthsShort: 'Jan._Feb._Mar._Apr._Maj_Jun_Jul_Avg._Sep._Okt._Nov._Dec.'.split('_'), + weekStart: 1, + relativeTime: { + future: 'za %s', + past: 'pre %s', + s: 'nekoliko sekundi', + m: translator.relativeTimeFormatter, + mm: translator.relativeTimeFormatter, + h: translator.relativeTimeFormatter, + hh: translator.relativeTimeFormatter, + d: translator.relativeTimeFormatter, + dd: translator.relativeTimeFormatter, + M: translator.relativeTimeFormatter, + MM: translator.relativeTimeFormatter, + y: translator.relativeTimeFormatter, + yy: translator.relativeTimeFormatter + }, + ordinal: function ordinal(n) { + return n + "."; + }, + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'D. M. YYYY.', + LL: 'D. MMMM YYYY.', + LLL: 'D. MMMM YYYY. H:mm', + LLLL: 'dddd, D. MMMM YYYY. H:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ss.js b/esm/locale/ss.js new file mode 100644 index 000000000..4354a4843 --- /dev/null +++ b/esm/locale/ss.js @@ -0,0 +1,39 @@ +// siSwati [ss] +import dayjs from '../index'; +var locale = { + name: 'ss', + weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'), + months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split('_'), + weekStart: 1, + weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), + monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), + weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A' + }, + relativeTime: { + future: 'nga %s', + past: 'wenteka nga %s', + s: 'emizuzwana lomcane', + m: 'umzuzu', + mm: '%d emizuzu', + h: 'lihora', + hh: '%d emahora', + d: 'lilanga', + dd: '%d emalanga', + M: 'inyanga', + MM: '%d tinyanga', + y: 'umnyaka', + yy: '%d iminyaka' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/sv-fi.js b/esm/locale/sv-fi.js new file mode 100644 index 000000000..a18977fa0 --- /dev/null +++ b/esm/locale/sv-fi.js @@ -0,0 +1,46 @@ +// Finland Swedish [sv-fi] +import dayjs from '../index'; +var locale = { + name: 'sv-fi', + weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), + weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'), + weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'), + months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'), + monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekStart: 1, + yearStart: 4, + ordinal: function ordinal(n) { + var b = n % 10; + var o = b === 1 || b === 2 ? 'a' : 'e'; + return "[" + n + o + "]"; + }, + formats: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY, [kl.] HH.mm', + LLLL: 'dddd, D. MMMM YYYY, [kl.] HH.mm', + l: 'D.M.YYYY', + ll: 'D. MMM YYYY', + lll: 'D. MMM YYYY, [kl.] HH.mm', + llll: 'ddd, D. MMM YYYY, [kl.] HH.mm' + }, + relativeTime: { + future: 'om %s', + past: 'för %s sedan', + s: 'några sekunder', + m: 'en minut', + mm: '%d minuter', + h: 'en timme', + hh: '%d timmar', + d: 'en dag', + dd: '%d dagar', + M: 'en månad', + MM: '%d månader', + y: 'ett år', + yy: '%d år' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/sv.js b/esm/locale/sv.js new file mode 100644 index 000000000..2563ee7c9 --- /dev/null +++ b/esm/locale/sv.js @@ -0,0 +1,44 @@ +// Swedish [sv] +import dayjs from '../index'; +var locale = { + name: 'sv', + weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), + weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'), + weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'), + months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'), + monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekStart: 1, + yearStart: 4, + ordinal: function ordinal(n) { + var b = n % 10; + var o = b === 1 || b === 2 ? 'a' : 'e'; + return "[" + n + o + "]"; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [kl.] HH:mm', + LLLL: 'dddd D MMMM YYYY [kl.] HH:mm', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd D MMM YYYY HH:mm' + }, + relativeTime: { + future: 'om %s', + past: 'för %s sedan', + s: 'några sekunder', + m: 'en minut', + mm: '%d minuter', + h: 'en timme', + hh: '%d timmar', + d: 'en dag', + dd: '%d dagar', + M: 'en månad', + MM: '%d månader', + y: 'ett år', + yy: '%d år' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/sw.js b/esm/locale/sw.js new file mode 100644 index 000000000..287bf3360 --- /dev/null +++ b/esm/locale/sw.js @@ -0,0 +1,39 @@ +// Swahili [sw] +import dayjs from '../index'; +var locale = { + name: 'sw', + weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'), + weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), + weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), + months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), + weekStart: 1, + ordinal: function ordinal(n) { + return n; + }, + relativeTime: { + future: '%s baadaye', + past: 'tokea %s', + s: 'hivi punde', + m: 'dakika moja', + mm: 'dakika %d', + h: 'saa limoja', + hh: 'masaa %d', + d: 'siku moja', + dd: 'masiku %d', + M: 'mwezi mmoja', + MM: 'miezi %d', + y: 'mwaka mmoja', + yy: 'miaka %d' + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ta.js b/esm/locale/ta.js new file mode 100644 index 000000000..6df25f876 --- /dev/null +++ b/esm/locale/ta.js @@ -0,0 +1,38 @@ +// Tamil [ta] +import dayjs from '../index'; +var locale = { + name: 'ta', + weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'), + months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), + weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'), + monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), + weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, HH:mm', + LLLL: 'dddd, D MMMM YYYY, HH:mm' + }, + relativeTime: { + future: '%s இல்', + past: '%s முன்', + s: 'ஒரு சில விநாடிகள்', + m: 'ஒரு நிமிடம்', + mm: '%d நிமிடங்கள்', + h: 'ஒரு மணி நேரம்', + hh: '%d மணி நேரம்', + d: 'ஒரு நாள்', + dd: '%d நாட்கள்', + M: 'ஒரு மாதம்', + MM: '%d மாதங்கள்', + y: 'ஒரு வருடம்', + yy: '%d ஆண்டுகள்' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/te.js b/esm/locale/te.js new file mode 100644 index 000000000..392a2478c --- /dev/null +++ b/esm/locale/te.js @@ -0,0 +1,38 @@ +// Telugu [te] +import dayjs from '../index'; +var locale = { + name: 'te', + weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'), + months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'), + weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'), + monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'), + weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm' + }, + relativeTime: { + future: '%s లో', + past: '%s క్రితం', + s: 'కొన్ని క్షణాలు', + m: 'ఒక నిమిషం', + mm: '%d నిమిషాలు', + h: 'ఒక గంట', + hh: '%d గంటలు', + d: 'ఒక రోజు', + dd: '%d రోజులు', + M: 'ఒక నెల', + MM: '%d నెలలు', + y: 'ఒక సంవత్సరం', + yy: '%d సంవత్సరాలు' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/tet.js b/esm/locale/tet.js new file mode 100644 index 000000000..ff83eeab0 --- /dev/null +++ b/esm/locale/tet.js @@ -0,0 +1,39 @@ +// Tetun Dili (East Timor) [tet] +import dayjs from '../index'; +var locale = { + name: 'tet', + weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), + months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split('_'), + weekStart: 1, + weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), + monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'iha %s', + past: '%s liuba', + s: 'minutu balun', + m: 'minutu ida', + mm: 'minutu %d', + h: 'oras ida', + hh: 'oras %d', + d: 'loron ida', + dd: 'loron %d', + M: 'fulan ida', + MM: 'fulan %d', + y: 'tinan ida', + yy: 'tinan %d' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/tg.js b/esm/locale/tg.js new file mode 100644 index 000000000..536df0b96 --- /dev/null +++ b/esm/locale/tg.js @@ -0,0 +1,39 @@ +// Tajik [tg] +import dayjs from '../index'; +var locale = { + name: 'tg', + weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split('_'), + months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), + weekStart: 1, + weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'), + monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'баъди %s', + past: '%s пеш', + s: 'якчанд сония', + m: 'як дақиқа', + mm: '%d дақиқа', + h: 'як соат', + hh: '%d соат', + d: 'як рӯз', + dd: '%d рӯз', + M: 'як моҳ', + MM: '%d моҳ', + y: 'як сол', + yy: '%d сол' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/th.js b/esm/locale/th.js new file mode 100644 index 000000000..5cbcdf2ad --- /dev/null +++ b/esm/locale/th.js @@ -0,0 +1,38 @@ +// Thai [th] +import dayjs from '../index'; +var locale = { + name: 'th', + weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'), + weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), + weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'), + months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'), + monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'), + formats: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY เวลา H:mm', + LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm' + }, + relativeTime: { + future: 'อีก %s', + past: '%sที่แล้ว', + s: 'ไม่กี่วินาที', + m: '1 นาที', + mm: '%d นาที', + h: '1 ชั่วโมง', + hh: '%d ชั่วโมง', + d: '1 วัน', + dd: '%d วัน', + M: '1 เดือน', + MM: '%d เดือน', + y: '1 ปี', + yy: '%d ปี' + }, + ordinal: function ordinal(n) { + return n + "."; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/tk.js b/esm/locale/tk.js new file mode 100644 index 000000000..93390f18b --- /dev/null +++ b/esm/locale/tk.js @@ -0,0 +1,39 @@ +// Turkmen [tk] +import dayjs from '../index'; +var locale = { + name: 'tk', + weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split('_'), + weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'), + weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'), + months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split('_'), + monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'), + weekStart: 1, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: '%s soň', + past: '%s öň', + s: 'birnäçe sekunt', + m: 'bir minut', + mm: '%d minut', + h: 'bir sagat', + hh: '%d sagat', + d: 'bir gün', + dd: '%d gün', + M: 'bir aý', + MM: '%d aý', + y: 'bir ýyl', + yy: '%d ýyl' + }, + ordinal: function ordinal(n) { + return n + "."; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/tl-ph.js b/esm/locale/tl-ph.js new file mode 100644 index 000000000..0fa84f3a7 --- /dev/null +++ b/esm/locale/tl-ph.js @@ -0,0 +1,39 @@ +// Tagalog (Philippines) [tl-ph] +import dayjs from '../index'; +var locale = { + name: 'tl-ph', + weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'), + months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'), + weekStart: 1, + weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'MM/D/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY HH:mm', + LLLL: 'dddd, MMMM DD, YYYY HH:mm' + }, + relativeTime: { + future: 'sa loob ng %s', + past: '%s ang nakalipas', + s: 'ilang segundo', + m: 'isang minuto', + mm: '%d minuto', + h: 'isang oras', + hh: '%d oras', + d: 'isang araw', + dd: '%d araw', + M: 'isang buwan', + MM: '%d buwan', + y: 'isang taon', + yy: '%d taon' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/tlh.js b/esm/locale/tlh.js new file mode 100644 index 000000000..30f52fe74 --- /dev/null +++ b/esm/locale/tlh.js @@ -0,0 +1,24 @@ +// Klingon [tlh] +import dayjs from '../index'; +var locale = { + name: 'tlh', + weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'), + weekStart: 1, + weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'), + weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/tr.js b/esm/locale/tr.js new file mode 100644 index 000000000..e7fe24fb3 --- /dev/null +++ b/esm/locale/tr.js @@ -0,0 +1,39 @@ +// Turkish [tr] +import dayjs from '../index'; +var locale = { + name: 'tr', + weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'), + weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'), + weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'), + months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'), + monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'), + weekStart: 1, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: '%s sonra', + past: '%s önce', + s: 'birkaç saniye', + m: 'bir dakika', + mm: '%d dakika', + h: 'bir saat', + hh: '%d saat', + d: 'bir gün', + dd: '%d gün', + M: 'bir ay', + MM: '%d ay', + y: 'bir yıl', + yy: '%d yıl' + }, + ordinal: function ordinal(n) { + return n + "."; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/types.d.ts b/esm/locale/types.d.ts new file mode 100644 index 000000000..2c24a6456 --- /dev/null +++ b/esm/locale/types.d.ts @@ -0,0 +1,33 @@ +declare interface ILocale { + name: string + weekdays?: string[] + months?: string[] + weekStart?: number + weekdaysShort?: string[] + monthsShort?: string[] + weekdaysMin?: string[] + ordinal?: (n: number) => number | string + formats: Partial<{ + LT: string + LTS: string + L: string + LL: string + LLL: string + LLLL: string + }> + relativeTime: Partial<{ + future: string + past: string + s: string + m: string + mm: string + h: string + hh: string + d: string + dd: string + M: string + MM: string + y: string + yy: string + }> +} diff --git a/esm/locale/tzl.js b/esm/locale/tzl.js new file mode 100644 index 000000000..9fa0cd2b9 --- /dev/null +++ b/esm/locale/tzl.js @@ -0,0 +1,24 @@ +// Talossan [tzl] +import dayjs from '../index'; +var locale = { + name: 'tzl', + weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), + months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'), + weekStart: 1, + weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), + monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), + weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM [dallas] YYYY', + LLL: 'D. MMMM [dallas] YYYY HH.mm', + LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/tzm-latn.js b/esm/locale/tzm-latn.js new file mode 100644 index 000000000..e5ac6aff7 --- /dev/null +++ b/esm/locale/tzm-latn.js @@ -0,0 +1,39 @@ +// Central Atlas Tamazight Latin [tzm-latn] +import dayjs from '../index'; +var locale = { + name: 'tzm-latn', + weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), + weekStart: 6, + weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), + weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'dadkh s yan %s', + past: 'yan %s', + s: 'imik', + m: 'minuḍ', + mm: '%d minuḍ', + h: 'saɛa', + hh: '%d tassaɛin', + d: 'ass', + dd: '%d ossan', + M: 'ayowr', + MM: '%d iyyirn', + y: 'asgas', + yy: '%d isgasn' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/tzm.js b/esm/locale/tzm.js new file mode 100644 index 000000000..d94a6c093 --- /dev/null +++ b/esm/locale/tzm.js @@ -0,0 +1,39 @@ +// Central Atlas Tamazight [tzm] +import dayjs from '../index'; +var locale = { + name: 'tzm', + weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), + weekStart: 6, + weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), + weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s', + past: 'ⵢⴰⵏ %s', + s: 'ⵉⵎⵉⴽ', + m: 'ⵎⵉⵏⵓⴺ', + mm: '%d ⵎⵉⵏⵓⴺ', + h: 'ⵙⴰⵄⴰ', + hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ', + d: 'ⴰⵙⵙ', + dd: '%d oⵙⵙⴰⵏ', + M: 'ⴰⵢoⵓⵔ', + MM: '%d ⵉⵢⵢⵉⵔⵏ', + y: 'ⴰⵙⴳⴰⵙ', + yy: '%d ⵉⵙⴳⴰⵙⵏ' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ug-cn.js b/esm/locale/ug-cn.js new file mode 100644 index 000000000..d3d6392a8 --- /dev/null +++ b/esm/locale/ug-cn.js @@ -0,0 +1,39 @@ +// Uyghur (China) [ug-cn] +import dayjs from '../index'; +var locale = { + name: 'ug-cn', + weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split('_'), + months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split('_'), + weekStart: 1, + weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split('_'), + weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى', + LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm' + }, + relativeTime: { + future: '%s كېيىن', + past: '%s بۇرۇن', + s: 'نەچچە سېكونت', + m: 'بىر مىنۇت', + mm: '%d مىنۇت', + h: 'بىر سائەت', + hh: '%d سائەت', + d: 'بىر كۈن', + dd: '%d كۈن', + M: 'بىر ئاي', + MM: '%d ئاي', + y: 'بىر يىل', + yy: '%d يىل' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/uk.js b/esm/locale/uk.js new file mode 100644 index 000000000..3c70b1329 --- /dev/null +++ b/esm/locale/uk.js @@ -0,0 +1,77 @@ +// Ukrainian [uk] +import dayjs from '../index'; +var monthFormat = 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'); +var monthStandalone = 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_'); +var MONTHS_IN_FORMAT = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/; + +function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]; // eslint-disable-line +} + +function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд', + mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин', + hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин', + dd: 'день_дні_днів', + MM: 'місяць_місяці_місяців', + yy: 'рік_роки_років' + }; + + if (key === 'm') { + return withoutSuffix ? 'хвилина' : 'хвилину'; + } else if (key === 'h') { + return withoutSuffix ? 'година' : 'годину'; + } + + return number + " " + plural(format[key], +number); +} + +var months = function months(dayjsInstance, format) { + if (MONTHS_IN_FORMAT.test(format)) { + return monthFormat[dayjsInstance.month()]; + } + + return monthStandalone[dayjsInstance.month()]; +}; + +months.s = monthStandalone; +months.f = monthFormat; +var locale = { + name: 'uk', + weekdays: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'), + weekdaysShort: 'ндл_пнд_втр_срд_чтв_птн_сбт'.split('_'), + weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + months: months, + monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'), + weekStart: 1, + relativeTime: { + future: 'за %s', + past: '%s тому', + s: 'декілька секунд', + m: relativeTimeWithPlural, + mm: relativeTimeWithPlural, + h: relativeTimeWithPlural, + hh: relativeTimeWithPlural, + d: 'день', + dd: relativeTimeWithPlural, + M: 'місяць', + MM: relativeTimeWithPlural, + y: 'рік', + yy: relativeTimeWithPlural + }, + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY р.', + LLL: 'D MMMM YYYY р., HH:mm', + LLLL: 'dddd, D MMMM YYYY р., HH:mm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/ur.js b/esm/locale/ur.js new file mode 100644 index 000000000..7464c1ebc --- /dev/null +++ b/esm/locale/ur.js @@ -0,0 +1,39 @@ +// Urdu [ur] +import dayjs from '../index'; +var locale = { + name: 'ur', + weekdays: 'اتوار_پیر_منگل_بدھ_جمعرات_جمعہ_ہفتہ'.split('_'), + months: 'جنوری_فروری_مارچ_اپریل_مئی_جون_جولائی_اگست_ستمبر_اکتوبر_نومبر_دسمبر'.split('_'), + weekStart: 1, + weekdaysShort: 'اتوار_پیر_منگل_بدھ_جمعرات_جمعہ_ہفتہ'.split('_'), + monthsShort: 'جنوری_فروری_مارچ_اپریل_مئی_جون_جولائی_اگست_ستمبر_اکتوبر_نومبر_دسمبر'.split('_'), + weekdaysMin: 'اتوار_پیر_منگل_بدھ_جمعرات_جمعہ_ہفتہ'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd، D MMMM YYYY HH:mm' + }, + relativeTime: { + future: '%s بعد', + past: '%s قبل', + s: 'چند سیکنڈ', + m: 'ایک منٹ', + mm: '%d منٹ', + h: 'ایک گھنٹہ', + hh: '%d گھنٹے', + d: 'ایک دن', + dd: '%d دن', + M: 'ایک ماہ', + MM: '%d ماہ', + y: 'ایک سال', + yy: '%d سال' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/uz-latn.js b/esm/locale/uz-latn.js new file mode 100644 index 000000000..befdfee44 --- /dev/null +++ b/esm/locale/uz-latn.js @@ -0,0 +1,39 @@ +// Uzbek Latin [uz-latn] +import dayjs from '../index'; +var locale = { + name: 'uz-latn', + weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'), + months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'), + weekStart: 1, + weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), + monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), + weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'D MMMM YYYY, dddd HH:mm' + }, + relativeTime: { + future: 'Yaqin %s ichida', + past: '%s oldin', + s: 'soniya', + m: 'bir daqiqa', + mm: '%d daqiqa', + h: 'bir soat', + hh: '%d soat', + d: 'bir kun', + dd: '%d kun', + M: 'bir oy', + MM: '%d oy', + y: 'bir yil', + yy: '%d yil' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/uz.js b/esm/locale/uz.js new file mode 100644 index 000000000..443326373 --- /dev/null +++ b/esm/locale/uz.js @@ -0,0 +1,39 @@ +// Uzbek [uz] +import dayjs from '../index'; +var locale = { + name: 'uz', + weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'), + months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), + weekStart: 1, + weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'), + monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'D MMMM YYYY, dddd HH:mm' + }, + relativeTime: { + future: 'Якин %s ичида', + past: '%s олдин', + s: 'фурсат', + m: 'бир дакика', + mm: '%d дакика', + h: 'бир соат', + hh: '%d соат', + d: 'бир кун', + dd: '%d кун', + M: 'бир ой', + MM: '%d ой', + y: 'бир йил', + yy: '%d йил' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/vi.js b/esm/locale/vi.js new file mode 100644 index 000000000..f55cc732b --- /dev/null +++ b/esm/locale/vi.js @@ -0,0 +1,43 @@ +// Vietnamese [vi] +import dayjs from '../index'; +var locale = { + name: 'vi', + weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'), + months: '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'.split('_'), + weekStart: 1, + weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + monthsShort: 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'), + weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [năm] YYYY', + LLL: 'D MMMM [năm] YYYY HH:mm', + LLLL: 'dddd, D MMMM [năm] YYYY HH:mm', + l: 'DD/M/YYYY', + ll: 'D MMM YYYY', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd, D MMM YYYY HH:mm' + }, + relativeTime: { + future: '%s tới', + past: '%s trước', + s: 'vài giây', + m: 'một phút', + mm: '%d phút', + h: 'một giờ', + hh: '%d giờ', + d: 'một ngày', + dd: '%d ngày', + M: 'một tháng', + MM: '%d tháng', + y: 'một năm', + yy: '%d năm' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/x-pseudo.js b/esm/locale/x-pseudo.js new file mode 100644 index 000000000..ceb67827d --- /dev/null +++ b/esm/locale/x-pseudo.js @@ -0,0 +1,39 @@ +// Pseudo [x-pseudo] +import dayjs from '../index'; +var locale = { + name: 'x-pseudo', + weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'), + months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'), + weekStart: 1, + weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'), + monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'), + weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm' + }, + relativeTime: { + future: 'í~ñ %s', + past: '%s á~gó', + s: 'á ~féw ~sécó~ñds', + m: 'á ~míñ~úté', + mm: '%d m~íñú~tés', + h: 'á~ñ hó~úr', + hh: '%d h~óúrs', + d: 'á ~dáý', + dd: '%d d~áýs', + M: 'á ~móñ~th', + MM: '%d m~óñt~hs', + y: 'á ~ýéár', + yy: '%d ý~éárs' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/yo.js b/esm/locale/yo.js new file mode 100644 index 000000000..1f7946846 --- /dev/null +++ b/esm/locale/yo.js @@ -0,0 +1,39 @@ +// Yoruba Nigeria [yo] +import dayjs from '../index'; +var locale = { + name: 'yo', + weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'), + months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'), + weekStart: 1, + weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'), + monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'), + weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'), + ordinal: function ordinal(n) { + return n; + }, + formats: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A' + }, + relativeTime: { + future: 'ní %s', + past: '%s kọjá', + s: 'ìsẹjú aayá die', + m: 'ìsẹjú kan', + mm: 'ìsẹjú %d', + h: 'wákati kan', + hh: 'wákati %d', + d: 'ọjọ́ kan', + dd: 'ọjọ́ %d', + M: 'osù kan', + MM: 'osù %d', + y: 'ọdún kan', + yy: 'ọdún %d' + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/zh-cn.js b/esm/locale/zh-cn.js new file mode 100644 index 000000000..1a7ebf4bd --- /dev/null +++ b/esm/locale/zh-cn.js @@ -0,0 +1,67 @@ +// Chinese (China) [zh-cn] +import dayjs from '../index'; +var locale = { + name: 'zh-cn', + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + ordinal: function ordinal(number, period) { + switch (period) { + case 'W': + return number + "\u5468"; + + default: + return number + "\u65E5"; + } + }, + weekStart: 1, + yearStart: 4, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日Ah点mm分', + LLLL: 'YYYY年M月D日ddddAh点mm分', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm' + }, + relativeTime: { + future: '%s内', + past: '%s前', + s: '几秒', + m: '1 分钟', + mm: '%d 分钟', + h: '1 小时', + hh: '%d 小时', + d: '1 天', + dd: '%d 天', + M: '1 个月', + MM: '%d 个月', + y: '1 年', + yy: '%d 年' + }, + meridiem: function meridiem(hour, minute) { + var hm = hour * 100 + minute; + + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1100) { + return '上午'; + } else if (hm < 1300) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } + + return '晚上'; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/zh-hk.js b/esm/locale/zh-hk.js new file mode 100644 index 000000000..8ada9a018 --- /dev/null +++ b/esm/locale/zh-hk.js @@ -0,0 +1,65 @@ +// Chinese (Hong Kong) [zh-hk] +import dayjs from '../index'; +var locale = { + name: 'zh-hk', + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + ordinal: function ordinal(number, period) { + switch (period) { + case 'W': + return number + "\u9031"; + + default: + return number + "\u65E5"; + } + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm' + }, + relativeTime: { + future: '%s內', + past: '%s前', + s: '幾秒', + m: '一分鐘', + mm: '%d 分鐘', + h: '一小時', + hh: '%d 小時', + d: '一天', + dd: '%d 天', + M: '一個月', + MM: '%d 個月', + y: '一年', + yy: '%d 年' + }, + meridiem: function meridiem(hour, minute) { + var hm = hour * 100 + minute; + + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1100) { + return '上午'; + } else if (hm < 1300) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } + + return '晚上'; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/zh-tw.js b/esm/locale/zh-tw.js new file mode 100644 index 000000000..ada89ee41 --- /dev/null +++ b/esm/locale/zh-tw.js @@ -0,0 +1,65 @@ +// Chinese (Taiwan) [zh-tw] +import dayjs from '../index'; +var locale = { + name: 'zh-tw', + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + ordinal: function ordinal(number, period) { + switch (period) { + case 'W': + return number + "\u9031"; + + default: + return number + "\u65E5"; + } + }, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm' + }, + relativeTime: { + future: '%s內', + past: '%s前', + s: '幾秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年' + }, + meridiem: function meridiem(hour, minute) { + var hm = hour * 100 + minute; + + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1100) { + return '上午'; + } else if (hm < 1300) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } + + return '晚上'; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/locale/zh.js b/esm/locale/zh.js new file mode 100644 index 000000000..b98ab70df --- /dev/null +++ b/esm/locale/zh.js @@ -0,0 +1,67 @@ +// Chinese [zh] +import dayjs from '../index'; +var locale = { + name: 'zh', + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + ordinal: function ordinal(number, period) { + switch (period) { + case 'W': + return number + "\u5468"; + + default: + return number + "\u65E5"; + } + }, + weekStart: 1, + yearStart: 4, + formats: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日Ah点mm分', + LLLL: 'YYYY年M月D日ddddAh点mm分', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm' + }, + relativeTime: { + future: '%s后', + past: '%s前', + s: '几秒', + m: '1 分钟', + mm: '%d 分钟', + h: '1 小时', + hh: '%d 小时', + d: '1 天', + dd: '%d 天', + M: '1 个月', + MM: '%d 个月', + y: '1 年', + yy: '%d 年' + }, + meridiem: function meridiem(hour, minute) { + var hm = hour * 100 + minute; + + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1100) { + return '上午'; + } else if (hm < 1300) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } + + return '晚上'; + } +}; +dayjs.locale(locale, null, true); +export default locale; \ No newline at end of file diff --git a/esm/plugin/advancedFormat/index.d.ts b/esm/plugin/advancedFormat/index.d.ts new file mode 100644 index 000000000..a17c89631 --- /dev/null +++ b/esm/plugin/advancedFormat/index.d.ts @@ -0,0 +1,4 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin diff --git a/esm/plugin/advancedFormat/index.js b/esm/plugin/advancedFormat/index.js new file mode 100644 index 000000000..f45e4e004 --- /dev/null +++ b/esm/plugin/advancedFormat/index.js @@ -0,0 +1,66 @@ +import { FORMAT_DEFAULT } from '../../constant'; +export default (function (o, c) { + // locale needed later + var proto = c.prototype; + var oldFormat = proto.format; + + proto.format = function (formatStr) { + var _this = this; + + var locale = this.$locale(); + + if (!this.isValid()) { + return oldFormat.bind(this)(formatStr); + } + + var utils = this.$utils(); + var str = formatStr || FORMAT_DEFAULT; + var result = str.replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g, function (match) { + switch (match) { + case 'Q': + return Math.ceil((_this.$M + 1) / 3); + + case 'Do': + return locale.ordinal(_this.$D); + + case 'gggg': + return _this.weekYear(); + + case 'GGGG': + return _this.isoWeekYear(); + + case 'wo': + return locale.ordinal(_this.week(), 'W'); + // W for week + + case 'w': + case 'ww': + return utils.s(_this.week(), match === 'w' ? 1 : 2, '0'); + + case 'W': + case 'WW': + return utils.s(_this.isoWeek(), match === 'W' ? 1 : 2, '0'); + + case 'k': + case 'kk': + return utils.s(String(_this.$H === 0 ? 24 : _this.$H), match === 'k' ? 1 : 2, '0'); + + case 'X': + return Math.floor(_this.$d.getTime() / 1000); + + case 'x': + return _this.$d.getTime(); + + case 'z': + return "[" + _this.offsetName() + "]"; + + case 'zzz': + return "[" + _this.offsetName('long') + "]"; + + default: + return match; + } + }); + return oldFormat.bind(this)(result); + }; +}); \ No newline at end of file diff --git a/esm/plugin/arraySupport/index.d.ts b/esm/plugin/arraySupport/index.d.ts new file mode 100644 index 000000000..30f8d9c5b --- /dev/null +++ b/esm/plugin/arraySupport/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs/esm' + +declare module 'dayjs/esm' { + interface ConfigTypeMap { + arraySupport: [number?, number?, number?, number?, number?, number?, number?] + } +} + +declare const plugin: PluginFunc +export = plugin diff --git a/esm/plugin/arraySupport/index.js b/esm/plugin/arraySupport/index.js new file mode 100644 index 000000000..c7edc793c --- /dev/null +++ b/esm/plugin/arraySupport/index.js @@ -0,0 +1,33 @@ +export default (function (o, c, dayjs) { + var proto = c.prototype; + + var parseDate = function parseDate(cfg) { + var date = cfg.date, + utc = cfg.utc; + + if (Array.isArray(date)) { + if (utc) { + if (!date.length) { + return new Date(); + } + + return new Date(Date.UTC.apply(null, date)); + } + + if (date.length === 1) { + return dayjs(String(date[0])).toDate(); + } + + return new (Function.prototype.bind.apply(Date, [null].concat(date)))(); + } + + return date; + }; + + var oldParse = proto.parse; + + proto.parse = function (cfg) { + cfg.date = parseDate.bind(this)(cfg); + oldParse.bind(this)(cfg); + }; +}); \ No newline at end of file diff --git a/esm/plugin/badMutable/index.d.ts b/esm/plugin/badMutable/index.d.ts new file mode 100644 index 000000000..a17c89631 --- /dev/null +++ b/esm/plugin/badMutable/index.d.ts @@ -0,0 +1,4 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin diff --git a/esm/plugin/badMutable/index.js b/esm/plugin/badMutable/index.js new file mode 100644 index 000000000..679edee98 --- /dev/null +++ b/esm/plugin/badMutable/index.js @@ -0,0 +1,61 @@ +export default (function (o, c) { + // locale needed later + var proto = c.prototype; + + proto.$g = function (input, get, set) { + if (this.$utils().u(input)) return this[get]; + return this.$set(set, input); + }; + + proto.set = function (string, _int) { + return this.$set(string, _int); + }; + + var oldStartOf = proto.startOf; + + proto.startOf = function (units, startOf) { + this.$d = oldStartOf.bind(this)(units, startOf).toDate(); + this.init(); + return this; + }; + + var oldAdd = proto.add; + + proto.add = function (number, units) { + this.$d = oldAdd.bind(this)(number, units).toDate(); + this.init(); + return this; + }; + + var oldLocale = proto.locale; + + proto.locale = function (preset, object) { + if (!preset) return this.$L; + this.$L = oldLocale.bind(this)(preset, object).$L; + return this; + }; + + var oldDaysInMonth = proto.daysInMonth; + + proto.daysInMonth = function () { + return oldDaysInMonth.bind(this.clone())(); + }; + + var oldIsSame = proto.isSame; + + proto.isSame = function (that, units) { + return oldIsSame.bind(this.clone())(that, units); + }; + + var oldIsBefore = proto.isBefore; + + proto.isBefore = function (that, units) { + return oldIsBefore.bind(this.clone())(that, units); + }; + + var oldIsAfter = proto.isAfter; + + proto.isAfter = function (that, units) { + return oldIsAfter.bind(this.clone())(that, units); + }; +}); \ No newline at end of file diff --git a/esm/plugin/bigIntSupport/index.d.ts b/esm/plugin/bigIntSupport/index.d.ts new file mode 100644 index 000000000..0829ead5b --- /dev/null +++ b/esm/plugin/bigIntSupport/index.d.ts @@ -0,0 +1,11 @@ +import { PluginFunc } from 'dayjs/esm' + +declare module 'dayjs/esm' { + interface ConfigTypeMap { + bigIntSupport: BigInt + } + export function unix(t: BigInt): Dayjs +} + +declare const plugin: PluginFunc +export = plugin diff --git a/esm/plugin/bigIntSupport/index.js b/esm/plugin/bigIntSupport/index.js new file mode 100644 index 000000000..fa9398212 --- /dev/null +++ b/esm/plugin/bigIntSupport/index.js @@ -0,0 +1,32 @@ +// eslint-disable-next-line valid-typeof +var isBigInt = function isBigInt(num) { + return typeof num === 'bigint'; +}; + +export default (function (o, c, dayjs) { + var proto = c.prototype; + + var parseDate = function parseDate(cfg) { + var date = cfg.date; + + if (isBigInt(date)) { + return Number(date); + } + + return date; + }; + + var oldParse = proto.parse; + + proto.parse = function (cfg) { + cfg.date = parseDate.bind(this)(cfg); + oldParse.bind(this)(cfg); + }; + + var oldUnix = dayjs.unix; + + dayjs.unix = function (timestamp) { + var ts = isBigInt(timestamp) ? Number(timestamp) : timestamp; + return oldUnix(ts); + }; +}); \ No newline at end of file diff --git a/esm/plugin/buddhistEra/index.d.ts b/esm/plugin/buddhistEra/index.d.ts new file mode 100644 index 000000000..a17c89631 --- /dev/null +++ b/esm/plugin/buddhistEra/index.d.ts @@ -0,0 +1,4 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin diff --git a/esm/plugin/buddhistEra/index.js b/esm/plugin/buddhistEra/index.js new file mode 100644 index 000000000..76ce44cca --- /dev/null +++ b/esm/plugin/buddhistEra/index.js @@ -0,0 +1,21 @@ +import { FORMAT_DEFAULT } from '../../constant'; +export default (function (o, c) { + // locale needed later + var proto = c.prototype; + var oldFormat = proto.format; // extend en locale here + + proto.format = function (formatStr) { + var _this = this; + + var yearBias = 543; + var str = formatStr || FORMAT_DEFAULT; + var result = str.replace(/(\[[^\]]+])|BBBB|BB/g, function (match, a) { + var _this$$utils; + + var year = String(_this.$y + yearBias); + var args = match === 'BB' ? [year.slice(-2), 2] : [year, 4]; + return a || (_this$$utils = _this.$utils()).s.apply(_this$$utils, args.concat(['0'])); + }); + return oldFormat.bind(this)(result); + }; +}); \ No newline at end of file diff --git a/esm/plugin/calendar/index.d.ts b/esm/plugin/calendar/index.d.ts new file mode 100644 index 000000000..42bff4bfc --- /dev/null +++ b/esm/plugin/calendar/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc, ConfigType } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + calendar(referenceTime?: ConfigType, formats?: object): string + } +} diff --git a/esm/plugin/calendar/index.js b/esm/plugin/calendar/index.js new file mode 100644 index 000000000..9abf1e907 --- /dev/null +++ b/esm/plugin/calendar/index.js @@ -0,0 +1,32 @@ +export default (function (o, c, d) { + var LT = 'h:mm A'; + var L = 'MM/DD/YYYY'; + var calendarFormat = { + lastDay: "[Yesterday at] " + LT, + sameDay: "[Today at] " + LT, + nextDay: "[Tomorrow at] " + LT, + nextWeek: "dddd [at] " + LT, + lastWeek: "[Last] dddd [at] " + LT, + sameElse: L + }; + var proto = c.prototype; + + proto.calendar = function (referenceTime, formats) { + var format = formats || this.$locale().calendar || calendarFormat; + var referenceStartOfDay = d(referenceTime || undefined).startOf('d'); + var diff = this.diff(referenceStartOfDay, 'd', true); + var sameElse = 'sameElse'; + /* eslint-disable no-nested-ternary */ + + var retVal = diff < -6 ? sameElse : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : sameElse; + /* eslint-enable no-nested-ternary */ + + var currentFormat = format[retVal] || calendarFormat[retVal]; + + if (typeof currentFormat === 'function') { + return currentFormat.call(this, d()); + } + + return this.format(currentFormat); + }; +}); \ No newline at end of file diff --git a/esm/plugin/customParseFormat/index.d.ts b/esm/plugin/customParseFormat/index.d.ts new file mode 100644 index 000000000..7da585e6e --- /dev/null +++ b/esm/plugin/customParseFormat/index.d.ts @@ -0,0 +1,8 @@ +import { PluginFunc } from 'dayjs/esm' + +declare interface PluginOptions { + parseTwoDigitYear?: (yearString: string) => number +} + +declare const plugin: PluginFunc +export = plugin diff --git a/esm/plugin/customParseFormat/index.js b/esm/plugin/customParseFormat/index.js new file mode 100644 index 000000000..1fd59368c --- /dev/null +++ b/esm/plugin/customParseFormat/index.js @@ -0,0 +1,320 @@ +import { u } from '../localizedFormat/utils'; +var formattingTokens = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g; +var match1 = /\d/; // 0 - 9 + +var match2 = /\d\d/; // 00 - 99 + +var match3 = /\d{3}/; // 000 - 999 + +var match4 = /\d{4}/; // 0000 - 9999 + +var match1to2 = /\d\d?/; // 0 - 99 + +var matchSigned = /[+-]?\d+/; // -inf - inf + +var matchOffset = /[+-]\d\d:?(\d\d)?|Z/; // +00:00 -00:00 +0000 or -0000 +00 or Z + +var matchWord = /\d*[^-_:/,()\s\d]+/; // Word + +var locale = {}; + +var parseTwoDigitYear = function parseTwoDigitYear(input) { + input = +input; + return input + (input > 68 ? 1900 : 2000); +}; + +function offsetFromString(string) { + if (!string) return 0; + if (string === 'Z') return 0; + var parts = string.match(/([+-]|\d\d)/g); + var minutes = +(parts[1] * 60) + (+parts[2] || 0); + return minutes === 0 ? 0 : parts[0] === '+' ? -minutes : minutes; // eslint-disable-line no-nested-ternary +} + +var addInput = function addInput(property) { + return function (input) { + this[property] = +input; + }; +}; + +var zoneExpressions = [matchOffset, function (input) { + var zone = this.zone || (this.zone = {}); + zone.offset = offsetFromString(input); +}]; + +var getLocalePart = function getLocalePart(name) { + var part = locale[name]; + return part && (part.indexOf ? part : part.s.concat(part.f)); +}; + +var meridiemMatch = function meridiemMatch(input, isLowerCase) { + var isAfternoon; + var _locale = locale, + meridiem = _locale.meridiem; + + if (!meridiem) { + isAfternoon = input === (isLowerCase ? 'pm' : 'PM'); + } else { + for (var i = 1; i <= 24; i += 1) { + // todo: fix input === meridiem(i, 0, isLowerCase) + if (input.indexOf(meridiem(i, 0, isLowerCase)) > -1) { + isAfternoon = i > 12; + break; + } + } + } + + return isAfternoon; +}; + +var expressions = { + A: [matchWord, function (input) { + this.afternoon = meridiemMatch(input, false); + }], + a: [matchWord, function (input) { + this.afternoon = meridiemMatch(input, true); + }], + S: [match1, function (input) { + this.milliseconds = +input * 100; + }], + SS: [match2, function (input) { + this.milliseconds = +input * 10; + }], + SSS: [match3, function (input) { + this.milliseconds = +input; + }], + s: [match1to2, addInput('seconds')], + ss: [match1to2, addInput('seconds')], + m: [match1to2, addInput('minutes')], + mm: [match1to2, addInput('minutes')], + H: [match1to2, addInput('hours')], + h: [match1to2, addInput('hours')], + HH: [match1to2, addInput('hours')], + hh: [match1to2, addInput('hours')], + D: [match1to2, addInput('day')], + DD: [match2, addInput('day')], + Do: [matchWord, function (input) { + var _locale2 = locale, + ordinal = _locale2.ordinal; + + var _input$match = input.match(/\d+/); + + this.day = _input$match[0]; + if (!ordinal) return; + + for (var i = 1; i <= 31; i += 1) { + if (ordinal(i).replace(/\[|\]/g, '') === input) { + this.day = i; + } + } + }], + M: [match1to2, addInput('month')], + MM: [match2, addInput('month')], + MMM: [matchWord, function (input) { + var months = getLocalePart('months'); + var monthsShort = getLocalePart('monthsShort'); + var matchIndex = (monthsShort || months.map(function (_) { + return _.slice(0, 3); + })).indexOf(input) + 1; + + if (matchIndex < 1) { + throw new Error(); + } + + this.month = matchIndex % 12 || matchIndex; + }], + MMMM: [matchWord, function (input) { + var months = getLocalePart('months'); + var matchIndex = months.indexOf(input) + 1; + + if (matchIndex < 1) { + throw new Error(); + } + + this.month = matchIndex % 12 || matchIndex; + }], + Y: [matchSigned, addInput('year')], + YY: [match2, function (input) { + this.year = parseTwoDigitYear(input); + }], + YYYY: [match4, addInput('year')], + Z: zoneExpressions, + ZZ: zoneExpressions +}; + +function correctHours(time) { + var afternoon = time.afternoon; + + if (afternoon !== undefined) { + var hours = time.hours; + + if (afternoon) { + if (hours < 12) { + time.hours += 12; + } + } else if (hours === 12) { + time.hours = 0; + } + + delete time.afternoon; + } +} + +function makeParser(format) { + format = u(format, locale && locale.formats); + var array = format.match(formattingTokens); + var length = array.length; + + for (var i = 0; i < length; i += 1) { + var token = array[i]; + var parseTo = expressions[token]; + var regex = parseTo && parseTo[0]; + var parser = parseTo && parseTo[1]; + + if (parser) { + array[i] = { + regex: regex, + parser: parser + }; + } else { + array[i] = token.replace(/^\[|\]$/g, ''); + } + } + + return function (input) { + var time = {}; + + for (var _i = 0, start = 0; _i < length; _i += 1) { + var _token = array[_i]; + + if (typeof _token === 'string') { + start += _token.length; + } else { + var _regex = _token.regex, + _parser = _token.parser; + var part = input.slice(start); + + var match = _regex.exec(part); + + var value = match[0]; + + _parser.call(time, value); + + input = input.replace(value, ''); + } + } + + correctHours(time); + return time; + }; +} + +var parseFormattedInput = function parseFormattedInput(input, format, utc) { + try { + if (['x', 'X'].indexOf(format) > -1) return new Date((format === 'X' ? 1000 : 1) * input); + var parser = makeParser(format); + + var _parser2 = parser(input), + year = _parser2.year, + month = _parser2.month, + day = _parser2.day, + hours = _parser2.hours, + minutes = _parser2.minutes, + seconds = _parser2.seconds, + milliseconds = _parser2.milliseconds, + zone = _parser2.zone; + + var now = new Date(); + var d = day || (!year && !month ? now.getDate() : 1); + var y = year || now.getFullYear(); + var M = 0; + + if (!(year && !month)) { + M = month > 0 ? month - 1 : now.getMonth(); + } + + var h = hours || 0; + var m = minutes || 0; + var s = seconds || 0; + var ms = milliseconds || 0; + + if (zone) { + return new Date(Date.UTC(y, M, d, h, m, s, ms + zone.offset * 60 * 1000)); + } + + if (utc) { + return new Date(Date.UTC(y, M, d, h, m, s, ms)); + } + + return new Date(y, M, d, h, m, s, ms); + } catch (e) { + return new Date(''); // Invalid Date + } +}; + +export default (function (o, C, d) { + d.p.customParseFormat = true; + + if (o && o.parseTwoDigitYear) { + parseTwoDigitYear = o.parseTwoDigitYear; + } + + var proto = C.prototype; + var oldParse = proto.parse; + + proto.parse = function (cfg) { + var date = cfg.date, + utc = cfg.utc, + args = cfg.args; + this.$u = utc; + var format = args[1]; + + if (typeof format === 'string') { + var isStrictWithoutLocale = args[2] === true; + var isStrictWithLocale = args[3] === true; + var isStrict = isStrictWithoutLocale || isStrictWithLocale; + var pl = args[2]; + + if (isStrictWithLocale) { + pl = args[2]; + } + + locale = this.$locale(); + + if (!isStrictWithoutLocale && pl) { + locale = d.Ls[pl]; + } + + this.$d = parseFormattedInput(date, format, utc); + this.init(); + if (pl && pl !== true) this.$L = this.locale(pl).$L; // use != to treat + // input number 1410715640579 and format string '1410715640579' equal + // eslint-disable-next-line eqeqeq + + if (isStrict && date != this.format(format)) { + this.$d = new Date(''); + } // reset global locale to make parallel unit test + + + locale = {}; + } else if (format instanceof Array) { + var len = format.length; + + for (var i = 1; i <= len; i += 1) { + args[1] = format[i - 1]; + var result = d.apply(this, args); + + if (result.isValid()) { + this.$d = result.$d; + this.$L = result.$L; + this.init(); + break; + } + + if (i === len) this.$d = new Date(''); + } + } else { + oldParse.call(this, cfg); + } + }; +}); \ No newline at end of file diff --git a/esm/plugin/dayOfYear/index.d.ts b/esm/plugin/dayOfYear/index.d.ts new file mode 100644 index 000000000..4b9601e7c --- /dev/null +++ b/esm/plugin/dayOfYear/index.d.ts @@ -0,0 +1,11 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + dayOfYear(): number + dayOfYear(value: number): Dayjs + } +} diff --git a/esm/plugin/dayOfYear/index.js b/esm/plugin/dayOfYear/index.js new file mode 100644 index 000000000..0cb115802 --- /dev/null +++ b/esm/plugin/dayOfYear/index.js @@ -0,0 +1,9 @@ +export default (function (o, c, d) { + var proto = c.prototype; + + proto.dayOfYear = function (input) { + // d(this) is for badMutable + var dayOfYear = Math.round((d(this).startOf('day') - d(this).startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'day'); + }; +}); \ No newline at end of file diff --git a/esm/plugin/devHelper/index.d.ts b/esm/plugin/devHelper/index.d.ts new file mode 100644 index 000000000..a17c89631 --- /dev/null +++ b/esm/plugin/devHelper/index.d.ts @@ -0,0 +1,4 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin diff --git a/esm/plugin/devHelper/index.js b/esm/plugin/devHelper/index.js new file mode 100644 index 000000000..9e2af8279 --- /dev/null +++ b/esm/plugin/devHelper/index.js @@ -0,0 +1,38 @@ +/* eslint-disable no-console */ +export default (function (o, c, d) { + /* istanbul ignore next line */ + if (!process || process.env.NODE_ENV !== 'production') { + var proto = c.prototype; + var oldParse = proto.parse; + + proto.parse = function (cfg) { + var date = cfg.date; + + if (typeof date === 'string' && date.length === 13) { + console.warn("To parse a Unix timestamp like " + date + ", you should pass it as a Number. https://day.js.org/docs/en/parse/unix-timestamp-milliseconds"); + } + + if (typeof date === 'number' && String(date).length === 4) { + console.warn("Guessing you may want to parse the Year " + date + ", you should pass it as a String " + date + ", not a Number. Otherwise, " + date + " will be treated as a Unix timestamp"); + } + + if (cfg.args.length >= 2 && !d.p.customParseFormat) { + console.warn("To parse a date-time string like " + date + " using the given format, you should enable customParseFormat plugin first. https://day.js.org/docs/en/parse/string-format"); + } + + return oldParse.bind(this)(cfg); + }; + + var oldLocale = d.locale; + + d.locale = function (preset, object, isLocal) { + if (typeof object === 'undefined' && typeof preset === 'string') { + if (!d.Ls[preset]) { + console.warn("Guessing you may want to use locale " + preset + ", you have to load it before using it. https://day.js.org/docs/en/i18n/loading-into-nodejs"); + } + } + + return oldLocale(preset, object, isLocal); + }; + } +}); \ No newline at end of file diff --git a/esm/plugin/duration/index.d.ts b/esm/plugin/duration/index.d.ts new file mode 100644 index 000000000..dc974a544 --- /dev/null +++ b/esm/plugin/duration/index.d.ts @@ -0,0 +1,88 @@ +import { PluginFunc } from 'dayjs/esm' +import { OpUnitType, UnitTypeLongPlural } from 'dayjs/esm'; + +declare const plugin: PluginFunc +export as namespace plugin; +export = plugin + +declare namespace plugin { + /** + * @deprecated Please use more strict types + */ + type DurationInputType = string | number | object + /** + * @deprecated Please use more strict types + */ + type DurationAddType = number | object | Duration + + type DurationUnitsObjectType = Partial<{ + [unit in Exclude | "weeks"]: number + }>; + type DurationUnitType = Exclude + type CreateDurationType = + ((units: DurationUnitsObjectType) => Duration) + & ((time: number, unit?: DurationUnitType) => Duration) + & ((ISO_8601: string) => Duration) + type AddDurationType = CreateDurationType & ((duration: Duration) => Duration) + + interface Duration { + new (input: string | number | object, unit?: string, locale?: string): Duration + + clone(): Duration + + humanize(withSuffix?: boolean): string + + milliseconds(): number + asMilliseconds(): number + + seconds(): number + asSeconds(): number + + minutes(): number + asMinutes(): number + + hours(): number + asHours(): number + + days(): number + asDays(): number + + weeks(): number + asWeeks(): number + + months(): number + asMonths(): number + + years(): number + asYears(): number + + as(unit: DurationUnitType): number + + get(unit: DurationUnitType): number + + add: AddDurationType + + subtract: AddDurationType + + toJSON(): string + + toISOString(): string + + format(formatStr?: string): string + + locale(locale: string): Duration + } +} + +declare module 'dayjs/esm' { + interface Dayjs { + add(duration: plugin.Duration): Dayjs + subtract(duration: plugin.Duration): Dayjs + } + + /** + * @param time If unit is not present, time treated as number of milliseconds + */ + export const duration: plugin.CreateDurationType; + export function isDuration(d: any): d is plugin.Duration +} \ No newline at end of file diff --git a/esm/plugin/duration/index.js b/esm/plugin/duration/index.js new file mode 100644 index 000000000..a241d4b20 --- /dev/null +++ b/esm/plugin/duration/index.js @@ -0,0 +1,356 @@ +import { MILLISECONDS_A_DAY, MILLISECONDS_A_HOUR, MILLISECONDS_A_MINUTE, MILLISECONDS_A_SECOND, MILLISECONDS_A_WEEK, REGEX_FORMAT } from '../../constant'; +var MILLISECONDS_A_YEAR = MILLISECONDS_A_DAY * 365; +var MILLISECONDS_A_MONTH = MILLISECONDS_A_YEAR / 12; +var durationRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; +var unitToMS = { + years: MILLISECONDS_A_YEAR, + months: MILLISECONDS_A_MONTH, + days: MILLISECONDS_A_DAY, + hours: MILLISECONDS_A_HOUR, + minutes: MILLISECONDS_A_MINUTE, + seconds: MILLISECONDS_A_SECOND, + milliseconds: 1, + weeks: MILLISECONDS_A_WEEK +}; + +var isDuration = function isDuration(d) { + return d instanceof Duration; +}; // eslint-disable-line no-use-before-define + + +var $d; +var $u; + +var wrapper = function wrapper(input, instance, unit) { + return new Duration(input, unit, instance.$l); +}; // eslint-disable-line no-use-before-define + + +var prettyUnit = function prettyUnit(unit) { + return $u.p(unit) + "s"; +}; + +var isNegative = function isNegative(number) { + return number < 0; +}; + +var roundNumber = function roundNumber(number) { + return isNegative(number) ? Math.ceil(number) : Math.floor(number); +}; + +var absolute = function absolute(number) { + return Math.abs(number); +}; + +var getNumberUnitFormat = function getNumberUnitFormat(number, unit) { + if (!number) { + return { + negative: false, + format: '' + }; + } + + if (isNegative(number)) { + return { + negative: true, + format: "" + absolute(number) + unit + }; + } + + return { + negative: false, + format: "" + number + unit + }; +}; + +var Duration = /*#__PURE__*/function () { + function Duration(input, unit, locale) { + var _this = this; + + this.$d = {}; + this.$l = locale; + + if (input === undefined) { + this.$ms = 0; + this.parseFromMilliseconds(); + } + + if (unit) { + return wrapper(input * unitToMS[prettyUnit(unit)], this); + } + + if (typeof input === 'number') { + this.$ms = input; + this.parseFromMilliseconds(); + return this; + } + + if (typeof input === 'object') { + Object.keys(input).forEach(function (k) { + _this.$d[prettyUnit(k)] = input[k]; + }); + this.calMilliseconds(); + return this; + } + + if (typeof input === 'string') { + var d = input.match(durationRegex); + + if (d) { + var properties = d.slice(2); + var numberD = properties.map(function (value) { + return value != null ? Number(value) : 0; + }); + this.$d.years = numberD[0]; + this.$d.months = numberD[1]; + this.$d.weeks = numberD[2]; + this.$d.days = numberD[3]; + this.$d.hours = numberD[4]; + this.$d.minutes = numberD[5]; + this.$d.seconds = numberD[6]; + this.calMilliseconds(); + return this; + } + } + + return this; + } + + var _proto = Duration.prototype; + + _proto.calMilliseconds = function calMilliseconds() { + var _this2 = this; + + this.$ms = Object.keys(this.$d).reduce(function (total, unit) { + return total + (_this2.$d[unit] || 0) * unitToMS[unit]; + }, 0); + }; + + _proto.parseFromMilliseconds = function parseFromMilliseconds() { + var $ms = this.$ms; + this.$d.years = roundNumber($ms / MILLISECONDS_A_YEAR); + $ms %= MILLISECONDS_A_YEAR; + this.$d.months = roundNumber($ms / MILLISECONDS_A_MONTH); + $ms %= MILLISECONDS_A_MONTH; + this.$d.days = roundNumber($ms / MILLISECONDS_A_DAY); + $ms %= MILLISECONDS_A_DAY; + this.$d.hours = roundNumber($ms / MILLISECONDS_A_HOUR); + $ms %= MILLISECONDS_A_HOUR; + this.$d.minutes = roundNumber($ms / MILLISECONDS_A_MINUTE); + $ms %= MILLISECONDS_A_MINUTE; + this.$d.seconds = roundNumber($ms / MILLISECONDS_A_SECOND); + $ms %= MILLISECONDS_A_SECOND; + this.$d.milliseconds = $ms; + }; + + _proto.toISOString = function toISOString() { + var Y = getNumberUnitFormat(this.$d.years, 'Y'); + var M = getNumberUnitFormat(this.$d.months, 'M'); + var days = +this.$d.days || 0; + + if (this.$d.weeks) { + days += this.$d.weeks * 7; + } + + var D = getNumberUnitFormat(days, 'D'); + var H = getNumberUnitFormat(this.$d.hours, 'H'); + var m = getNumberUnitFormat(this.$d.minutes, 'M'); + var seconds = this.$d.seconds || 0; + + if (this.$d.milliseconds) { + seconds += this.$d.milliseconds / 1000; + seconds = Math.round(seconds * 1000) / 1000; + } + + var S = getNumberUnitFormat(seconds, 'S'); + var negativeMode = Y.negative || M.negative || D.negative || H.negative || m.negative || S.negative; + var T = H.format || m.format || S.format ? 'T' : ''; + var P = negativeMode ? '-' : ''; + var result = P + "P" + Y.format + M.format + D.format + T + H.format + m.format + S.format; + return result === 'P' || result === '-P' ? 'P0D' : result; + }; + + _proto.toJSON = function toJSON() { + return this.toISOString(); + }; + + _proto.format = function format(formatStr) { + var str = formatStr || 'YYYY-MM-DDTHH:mm:ss'; + var matches = { + Y: this.$d.years, + YY: $u.s(this.$d.years, 2, '0'), + YYYY: $u.s(this.$d.years, 4, '0'), + M: this.$d.months, + MM: $u.s(this.$d.months, 2, '0'), + D: this.$d.days, + DD: $u.s(this.$d.days, 2, '0'), + H: this.$d.hours, + HH: $u.s(this.$d.hours, 2, '0'), + m: this.$d.minutes, + mm: $u.s(this.$d.minutes, 2, '0'), + s: this.$d.seconds, + ss: $u.s(this.$d.seconds, 2, '0'), + SSS: $u.s(this.$d.milliseconds, 3, '0') + }; + return str.replace(REGEX_FORMAT, function (match, $1) { + return $1 || String(matches[match]); + }); + }; + + _proto.as = function as(unit) { + return this.$ms / unitToMS[prettyUnit(unit)]; + }; + + _proto.get = function get(unit) { + var base = this.$ms; + var pUnit = prettyUnit(unit); + + if (pUnit === 'milliseconds') { + base %= 1000; + } else if (pUnit === 'weeks') { + base = roundNumber(base / unitToMS[pUnit]); + } else { + base = this.$d[pUnit]; + } + + return base || 0; // a === 0 will be true on both 0 and -0 + }; + + _proto.add = function add(input, unit, isSubtract) { + var another; + + if (unit) { + another = input * unitToMS[prettyUnit(unit)]; + } else if (isDuration(input)) { + another = input.$ms; + } else { + another = wrapper(input, this).$ms; + } + + return wrapper(this.$ms + another * (isSubtract ? -1 : 1), this); + }; + + _proto.subtract = function subtract(input, unit) { + return this.add(input, unit, true); + }; + + _proto.locale = function locale(l) { + var that = this.clone(); + that.$l = l; + return that; + }; + + _proto.clone = function clone() { + return wrapper(this.$ms, this); + }; + + _proto.humanize = function humanize(withSuffix) { + return $d().add(this.$ms, 'ms').locale(this.$l).fromNow(!withSuffix); + }; + + _proto.valueOf = function valueOf() { + return this.asMilliseconds(); + }; + + _proto.milliseconds = function milliseconds() { + return this.get('milliseconds'); + }; + + _proto.asMilliseconds = function asMilliseconds() { + return this.as('milliseconds'); + }; + + _proto.seconds = function seconds() { + return this.get('seconds'); + }; + + _proto.asSeconds = function asSeconds() { + return this.as('seconds'); + }; + + _proto.minutes = function minutes() { + return this.get('minutes'); + }; + + _proto.asMinutes = function asMinutes() { + return this.as('minutes'); + }; + + _proto.hours = function hours() { + return this.get('hours'); + }; + + _proto.asHours = function asHours() { + return this.as('hours'); + }; + + _proto.days = function days() { + return this.get('days'); + }; + + _proto.asDays = function asDays() { + return this.as('days'); + }; + + _proto.weeks = function weeks() { + return this.get('weeks'); + }; + + _proto.asWeeks = function asWeeks() { + return this.as('weeks'); + }; + + _proto.months = function months() { + return this.get('months'); + }; + + _proto.asMonths = function asMonths() { + return this.as('months'); + }; + + _proto.years = function years() { + return this.get('years'); + }; + + _proto.asYears = function asYears() { + return this.as('years'); + }; + + return Duration; +}(); + +var manipulateDuration = function manipulateDuration(date, duration, k) { + return date.add(duration.years() * k, 'y').add(duration.months() * k, 'M').add(duration.days() * k, 'd').add(duration.hours() * k, 'h').add(duration.minutes() * k, 'm').add(duration.seconds() * k, 's').add(duration.milliseconds() * k, 'ms'); +}; + +export default (function (option, Dayjs, dayjs) { + $d = dayjs; + $u = dayjs().$utils(); + + dayjs.duration = function (input, unit) { + var $l = dayjs.locale(); + return wrapper(input, { + $l: $l + }, unit); + }; + + dayjs.isDuration = isDuration; + var oldAdd = Dayjs.prototype.add; + var oldSubtract = Dayjs.prototype.subtract; + + Dayjs.prototype.add = function (value, unit) { + if (isDuration(value)) { + return manipulateDuration(this, value, 1); + } + + return oldAdd.bind(this)(value, unit); + }; + + Dayjs.prototype.subtract = function (value, unit) { + if (isDuration(value)) { + return manipulateDuration(this, value, -1); + } + + return oldSubtract.bind(this)(value, unit); + }; +}); \ No newline at end of file diff --git a/esm/plugin/isBetween/index.d.ts b/esm/plugin/isBetween/index.d.ts new file mode 100644 index 000000000..1c62711c7 --- /dev/null +++ b/esm/plugin/isBetween/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc, ConfigType, OpUnitType } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + isBetween(a: ConfigType, b: ConfigType, c?: OpUnitType | null, d?: '()' | '[]' | '[)' | '(]'): boolean + } +} diff --git a/esm/plugin/isBetween/index.js b/esm/plugin/isBetween/index.js new file mode 100644 index 000000000..2182a8950 --- /dev/null +++ b/esm/plugin/isBetween/index.js @@ -0,0 +1,10 @@ +export default (function (o, c, d) { + c.prototype.isBetween = function (a, b, u, i) { + var dA = d(a); + var dB = d(b); + i = i || '()'; + var dAi = i[0] === '('; + var dBi = i[1] === ')'; + return (dAi ? this.isAfter(dA, u) : !this.isBefore(dA, u)) && (dBi ? this.isBefore(dB, u) : !this.isAfter(dB, u)) || (dAi ? this.isBefore(dA, u) : !this.isAfter(dA, u)) && (dBi ? this.isAfter(dB, u) : !this.isBefore(dB, u)); + }; +}); \ No newline at end of file diff --git a/esm/plugin/isLeapYear/index.d.ts b/esm/plugin/isLeapYear/index.d.ts new file mode 100644 index 000000000..627ec5a86 --- /dev/null +++ b/esm/plugin/isLeapYear/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + isLeapYear(): boolean + } +} diff --git a/esm/plugin/isLeapYear/index.js b/esm/plugin/isLeapYear/index.js new file mode 100644 index 000000000..bf1309d01 --- /dev/null +++ b/esm/plugin/isLeapYear/index.js @@ -0,0 +1,7 @@ +export default (function (o, c) { + var proto = c.prototype; + + proto.isLeapYear = function () { + return this.$y % 4 === 0 && this.$y % 100 !== 0 || this.$y % 400 === 0; + }; +}); \ No newline at end of file diff --git a/esm/plugin/isMoment/index.d.ts b/esm/plugin/isMoment/index.d.ts new file mode 100644 index 000000000..6e3a69f13 --- /dev/null +++ b/esm/plugin/isMoment/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + + export function isMoment(input: any): boolean + +} diff --git a/esm/plugin/isMoment/index.js b/esm/plugin/isMoment/index.js new file mode 100644 index 000000000..48c8a895e --- /dev/null +++ b/esm/plugin/isMoment/index.js @@ -0,0 +1,5 @@ +export default (function (o, c, f) { + f.isMoment = function (input) { + return f.isDayjs(input); + }; +}); \ No newline at end of file diff --git a/esm/plugin/isSameOrAfter/index.d.ts b/esm/plugin/isSameOrAfter/index.d.ts new file mode 100644 index 000000000..7b6d23969 --- /dev/null +++ b/esm/plugin/isSameOrAfter/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc, ConfigType, OpUnitType } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + isSameOrAfter(date?: ConfigType, unit?: OpUnitType): boolean + } +} diff --git a/esm/plugin/isSameOrAfter/index.js b/esm/plugin/isSameOrAfter/index.js new file mode 100644 index 000000000..6a5c56f0e --- /dev/null +++ b/esm/plugin/isSameOrAfter/index.js @@ -0,0 +1,5 @@ +export default (function (o, c) { + c.prototype.isSameOrAfter = function (that, units) { + return this.isSame(that, units) || this.isAfter(that, units); + }; +}); \ No newline at end of file diff --git a/esm/plugin/isSameOrBefore/index.d.ts b/esm/plugin/isSameOrBefore/index.d.ts new file mode 100644 index 000000000..7ec009f41 --- /dev/null +++ b/esm/plugin/isSameOrBefore/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc, ConfigType, OpUnitType } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + isSameOrBefore(date?: ConfigType, unit?: OpUnitType): boolean + } +} diff --git a/esm/plugin/isSameOrBefore/index.js b/esm/plugin/isSameOrBefore/index.js new file mode 100644 index 000000000..18d526a49 --- /dev/null +++ b/esm/plugin/isSameOrBefore/index.js @@ -0,0 +1,5 @@ +export default (function (o, c) { + c.prototype.isSameOrBefore = function (that, units) { + return this.isSame(that, units) || this.isBefore(that, units); + }; +}); \ No newline at end of file diff --git a/esm/plugin/isToday/index.d.ts b/esm/plugin/isToday/index.d.ts new file mode 100644 index 000000000..8d55da8d0 --- /dev/null +++ b/esm/plugin/isToday/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + isToday(): boolean + } +} diff --git a/esm/plugin/isToday/index.js b/esm/plugin/isToday/index.js new file mode 100644 index 000000000..93b36c801 --- /dev/null +++ b/esm/plugin/isToday/index.js @@ -0,0 +1,9 @@ +export default (function (o, c, d) { + var proto = c.prototype; + + proto.isToday = function () { + var comparisonTemplate = 'YYYY-MM-DD'; + var now = d(); + return this.format(comparisonTemplate) === now.format(comparisonTemplate); + }; +}); \ No newline at end of file diff --git a/esm/plugin/isTomorrow/index.d.ts b/esm/plugin/isTomorrow/index.d.ts new file mode 100644 index 000000000..76522375f --- /dev/null +++ b/esm/plugin/isTomorrow/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + isTomorrow(): boolean + } +} diff --git a/esm/plugin/isTomorrow/index.js b/esm/plugin/isTomorrow/index.js new file mode 100644 index 000000000..8cc7238de --- /dev/null +++ b/esm/plugin/isTomorrow/index.js @@ -0,0 +1,9 @@ +export default (function (o, c, d) { + var proto = c.prototype; + + proto.isTomorrow = function () { + var comparisonTemplate = 'YYYY-MM-DD'; + var tomorrow = d().add(1, 'day'); + return this.format(comparisonTemplate) === tomorrow.format(comparisonTemplate); + }; +}); \ No newline at end of file diff --git a/esm/plugin/isYesterday/index.d.ts b/esm/plugin/isYesterday/index.d.ts new file mode 100644 index 000000000..f4370dc6d --- /dev/null +++ b/esm/plugin/isYesterday/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + isYesterday(): boolean + } +} diff --git a/esm/plugin/isYesterday/index.js b/esm/plugin/isYesterday/index.js new file mode 100644 index 000000000..fa55373c4 --- /dev/null +++ b/esm/plugin/isYesterday/index.js @@ -0,0 +1,9 @@ +export default (function (o, c, d) { + var proto = c.prototype; + + proto.isYesterday = function () { + var comparisonTemplate = 'YYYY-MM-DD'; + var yesterday = d().subtract(1, 'day'); + return this.format(comparisonTemplate) === yesterday.format(comparisonTemplate); + }; +}); \ No newline at end of file diff --git a/esm/plugin/isoWeek/index.d.ts b/esm/plugin/isoWeek/index.d.ts new file mode 100644 index 000000000..6e6a75a72 --- /dev/null +++ b/esm/plugin/isoWeek/index.d.ts @@ -0,0 +1,27 @@ +import { PluginFunc, OpUnitType, ConfigType } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +type ISOUnitType = OpUnitType | 'isoWeek'; + +declare module 'dayjs/esm' { + interface Dayjs { + isoWeekYear(): number + isoWeek(): number + isoWeek(value: number): Dayjs + + isoWeekday(): number + isoWeekday(value: number): Dayjs + + startOf(unit: ISOUnitType): Dayjs + + endOf(unit: ISOUnitType): Dayjs + + isSame(date?: ConfigType, unit?: ISOUnitType): boolean + + isBefore(date?: ConfigType, unit?: ISOUnitType): boolean + + isAfter(date?: ConfigType, unit?: ISOUnitType): boolean + } +} diff --git a/esm/plugin/isoWeek/index.js b/esm/plugin/isoWeek/index.js new file mode 100644 index 000000000..289ea7ca1 --- /dev/null +++ b/esm/plugin/isoWeek/index.js @@ -0,0 +1,57 @@ +import { D, W, Y } from '../../constant'; +var isoWeekPrettyUnit = 'isoweek'; +export default (function (o, c, d) { + var getYearFirstThursday = function getYearFirstThursday(year, isUtc) { + var yearFirstDay = (isUtc ? d.utc : d)().year(year).startOf(Y); + var addDiffDays = 4 - yearFirstDay.isoWeekday(); + + if (yearFirstDay.isoWeekday() > 4) { + addDiffDays += 7; + } + + return yearFirstDay.add(addDiffDays, D); + }; + + var getCurrentWeekThursday = function getCurrentWeekThursday(ins) { + return ins.add(4 - ins.isoWeekday(), D); + }; + + var proto = c.prototype; + + proto.isoWeekYear = function () { + var nowWeekThursday = getCurrentWeekThursday(this); + return nowWeekThursday.year(); + }; + + proto.isoWeek = function (week) { + if (!this.$utils().u(week)) { + return this.add((week - this.isoWeek()) * 7, D); + } + + var nowWeekThursday = getCurrentWeekThursday(this); + var diffWeekThursday = getYearFirstThursday(this.isoWeekYear(), this.$u); + return nowWeekThursday.diff(diffWeekThursday, W) + 1; + }; + + proto.isoWeekday = function (week) { + if (!this.$utils().u(week)) { + return this.day(this.day() % 7 ? week : week - 7); + } + + return this.day() || 7; + }; + + var oldStartOf = proto.startOf; + + proto.startOf = function (units, startOf) { + var utils = this.$utils(); + var isStartOf = !utils.u(startOf) ? startOf : true; + var unit = utils.p(units); + + if (unit === isoWeekPrettyUnit) { + return isStartOf ? this.date(this.date() - (this.isoWeekday() - 1)).startOf('day') : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf('day'); + } + + return oldStartOf.bind(this)(units, startOf); + }; +}); \ No newline at end of file diff --git a/esm/plugin/isoWeeksInYear/index.d.ts b/esm/plugin/isoWeeksInYear/index.d.ts new file mode 100644 index 000000000..986360fae --- /dev/null +++ b/esm/plugin/isoWeeksInYear/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + isoWeeksInYear(): number + } +} diff --git a/esm/plugin/isoWeeksInYear/index.js b/esm/plugin/isoWeeksInYear/index.js new file mode 100644 index 000000000..71618942a --- /dev/null +++ b/esm/plugin/isoWeeksInYear/index.js @@ -0,0 +1,15 @@ +export default (function (o, c) { + var proto = c.prototype; + + proto.isoWeeksInYear = function () { + var isLeapYear = this.isLeapYear(); + var last = this.endOf('y'); + var day = last.day(); + + if (day === 4 || isLeapYear && day === 5) { + return 53; + } + + return 52; + }; +}); \ No newline at end of file diff --git a/esm/plugin/localeData/index.d.ts b/esm/plugin/localeData/index.d.ts new file mode 100644 index 000000000..9f8762eda --- /dev/null +++ b/esm/plugin/localeData/index.d.ts @@ -0,0 +1,44 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + type WeekdayNames = [string, string, string, string, string, string, string]; + type MonthNames = [string, string, string, string, string, string, string, string, string, string, string, string]; + + interface InstanceLocaleDataReturn { + firstDayOfWeek(): number; + weekdays(instance?: Dayjs): WeekdayNames; + weekdaysShort(instance?: Dayjs): WeekdayNames; + weekdaysMin(instance?: Dayjs): WeekdayNames; + months(instance?: Dayjs): MonthNames; + monthsShort(instance?: Dayjs): MonthNames; + longDateFormat(format: string): string; + meridiem(hour?: number, minute?: number, isLower?: boolean): string; + ordinal(n: number): string + } + + interface GlobalLocaleDataReturn { + firstDayOfWeek(): number; + weekdays(): WeekdayNames; + weekdaysShort(): WeekdayNames; + weekdaysMin(): WeekdayNames; + months(): MonthNames; + monthsShort(): MonthNames; + longDateFormat(format: string): string; + meridiem(hour?: number, minute?: number, isLower?: boolean): string; + ordinal(n: number): string + } + + interface Dayjs { + localeData(): InstanceLocaleDataReturn; + } + + export function weekdays(localOrder?: boolean): WeekdayNames; + export function weekdaysShort(localOrder?: boolean): WeekdayNames; + export function weekdaysMin(localOrder?: boolean): WeekdayNames; + export function monthsShort(): MonthNames; + export function months(): MonthNames; + export function localeData(): GlobalLocaleDataReturn; +} diff --git a/esm/plugin/localeData/index.js b/esm/plugin/localeData/index.js new file mode 100644 index 000000000..c48d92cbc --- /dev/null +++ b/esm/plugin/localeData/index.js @@ -0,0 +1,114 @@ +import { t } from '../localizedFormat/utils'; +export default (function (o, c, dayjs) { + // locale needed later + var proto = c.prototype; + + var getLocalePart = function getLocalePart(part) { + return part && (part.indexOf ? part : part.s); + }; + + var getShort = function getShort(ins, target, full, num, localeOrder) { + var locale = ins.name ? ins : ins.$locale(); + var targetLocale = getLocalePart(locale[target]); + var fullLocale = getLocalePart(locale[full]); + var result = targetLocale || fullLocale.map(function (f) { + return f.slice(0, num); + }); + if (!localeOrder) return result; + var weekStart = locale.weekStart; + return result.map(function (_, index) { + return result[(index + (weekStart || 0)) % 7]; + }); + }; + + var getDayjsLocaleObject = function getDayjsLocaleObject() { + return dayjs.Ls[dayjs.locale()]; + }; + + var getLongDateFormat = function getLongDateFormat(l, format) { + return l.formats[format] || t(l.formats[format.toUpperCase()]); + }; + + var localeData = function localeData() { + var _this = this; + + return { + months: function months(instance) { + return instance ? instance.format('MMMM') : getShort(_this, 'months'); + }, + monthsShort: function monthsShort(instance) { + return instance ? instance.format('MMM') : getShort(_this, 'monthsShort', 'months', 3); + }, + firstDayOfWeek: function firstDayOfWeek() { + return _this.$locale().weekStart || 0; + }, + weekdays: function weekdays(instance) { + return instance ? instance.format('dddd') : getShort(_this, 'weekdays'); + }, + weekdaysMin: function weekdaysMin(instance) { + return instance ? instance.format('dd') : getShort(_this, 'weekdaysMin', 'weekdays', 2); + }, + weekdaysShort: function weekdaysShort(instance) { + return instance ? instance.format('ddd') : getShort(_this, 'weekdaysShort', 'weekdays', 3); + }, + longDateFormat: function longDateFormat(format) { + return getLongDateFormat(_this.$locale(), format); + }, + meridiem: this.$locale().meridiem, + ordinal: this.$locale().ordinal + }; + }; + + proto.localeData = function () { + return localeData.bind(this)(); + }; + + dayjs.localeData = function () { + var localeObject = getDayjsLocaleObject(); + return { + firstDayOfWeek: function firstDayOfWeek() { + return localeObject.weekStart || 0; + }, + weekdays: function weekdays() { + return dayjs.weekdays(); + }, + weekdaysShort: function weekdaysShort() { + return dayjs.weekdaysShort(); + }, + weekdaysMin: function weekdaysMin() { + return dayjs.weekdaysMin(); + }, + months: function months() { + return dayjs.months(); + }, + monthsShort: function monthsShort() { + return dayjs.monthsShort(); + }, + longDateFormat: function longDateFormat(format) { + return getLongDateFormat(localeObject, format); + }, + meridiem: localeObject.meridiem, + ordinal: localeObject.ordinal + }; + }; + + dayjs.months = function () { + return getShort(getDayjsLocaleObject(), 'months'); + }; + + dayjs.monthsShort = function () { + return getShort(getDayjsLocaleObject(), 'monthsShort', 'months', 3); + }; + + dayjs.weekdays = function (localeOrder) { + return getShort(getDayjsLocaleObject(), 'weekdays', null, null, localeOrder); + }; + + dayjs.weekdaysShort = function (localeOrder) { + return getShort(getDayjsLocaleObject(), 'weekdaysShort', 'weekdays', 3, localeOrder); + }; + + dayjs.weekdaysMin = function (localeOrder) { + return getShort(getDayjsLocaleObject(), 'weekdaysMin', 'weekdays', 2, localeOrder); + }; +}); \ No newline at end of file diff --git a/esm/plugin/localizedFormat/index.d.ts b/esm/plugin/localizedFormat/index.d.ts new file mode 100644 index 000000000..a17c89631 --- /dev/null +++ b/esm/plugin/localizedFormat/index.d.ts @@ -0,0 +1,4 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin diff --git a/esm/plugin/localizedFormat/index.js b/esm/plugin/localizedFormat/index.js new file mode 100644 index 000000000..9defb1f41 --- /dev/null +++ b/esm/plugin/localizedFormat/index.js @@ -0,0 +1,20 @@ +import { FORMAT_DEFAULT } from '../../constant'; +import { u, englishFormats } from './utils'; +export default (function (o, c, d) { + var proto = c.prototype; + var oldFormat = proto.format; + d.en.formats = englishFormats; + + proto.format = function (formatStr) { + if (formatStr === void 0) { + formatStr = FORMAT_DEFAULT; + } + + var _this$$locale = this.$locale(), + _this$$locale$formats = _this$$locale.formats, + formats = _this$$locale$formats === void 0 ? {} : _this$$locale$formats; + + var result = u(formatStr, formats); + return oldFormat.call(this, result); + }; +}); \ No newline at end of file diff --git a/esm/plugin/localizedFormat/utils.js b/esm/plugin/localizedFormat/utils.js new file mode 100644 index 000000000..1f48eff1b --- /dev/null +++ b/esm/plugin/localizedFormat/utils.js @@ -0,0 +1,20 @@ +// eslint-disable-next-line import/prefer-default-export +export var t = function t(format) { + return format.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function (_, a, b) { + return a || b.slice(1); + }); +}; +export var englishFormats = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A' +}; +export var u = function u(formatStr, formats) { + return formatStr.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function (_, a, b) { + var B = b && b.toUpperCase(); + return a || formats[b] || englishFormats[b] || t(formats[B]); + }); +}; \ No newline at end of file diff --git a/esm/plugin/minMax/index.d.ts b/esm/plugin/minMax/index.d.ts new file mode 100644 index 000000000..143370c4c --- /dev/null +++ b/esm/plugin/minMax/index.d.ts @@ -0,0 +1,11 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + export function max(dayjs: Dayjs[]): Dayjs | null + export function max(...dayjs: Dayjs[]): Dayjs | null + export function min(dayjs: Dayjs[]): Dayjs | null + export function min(...dayjs: Dayjs[]): Dayjs | null +} diff --git a/esm/plugin/minMax/index.js b/esm/plugin/minMax/index.js new file mode 100644 index 000000000..0fd68e9c8 --- /dev/null +++ b/esm/plugin/minMax/index.js @@ -0,0 +1,39 @@ +export default (function (o, c, d) { + var sortBy = function sortBy(method, dates) { + if (!dates || !dates.length || dates.length === 1 && !dates[0] || dates.length === 1 && Array.isArray(dates[0]) && !dates[0].length) { + return null; + } + + if (dates.length === 1 && dates[0].length > 0) { + var _dates = dates; + dates = _dates[0]; + } + + dates = dates.filter(function (date) { + return date; + }); + var result; + var _dates2 = dates; + result = _dates2[0]; + + for (var i = 1; i < dates.length; i += 1) { + if (!dates[i].isValid() || dates[i][method](result)) { + result = dates[i]; + } + } + + return result; + }; + + d.max = function () { + var args = [].slice.call(arguments, 0); // eslint-disable-line prefer-rest-params + + return sortBy('isAfter', args); + }; + + d.min = function () { + var args = [].slice.call(arguments, 0); // eslint-disable-line prefer-rest-params + + return sortBy('isBefore', args); + }; +}); \ No newline at end of file diff --git a/esm/plugin/objectSupport/index.d.ts b/esm/plugin/objectSupport/index.d.ts new file mode 100644 index 000000000..03b8b7c8b --- /dev/null +++ b/esm/plugin/objectSupport/index.d.ts @@ -0,0 +1,48 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + set(argument: object): Dayjs + add(argument: object): Dayjs + subtract(argument: object): Dayjs + } + + interface ConfigTypeMap { + objectSupport: { + years?: number | string; + year?: number | string; + y?: number | string; + + months?: number | string; + month?: number | string; + M?: number | string; + + days?: number | string; + day?: number | string; + d?: number | string; + + dates?: number | string; + date?: number | string; + D?: number | string; + + hours?: number | string; + hour?: number | string; + h?: number | string; + + minutes?: number | string; + minute?: number | string; + m?: number | string; + + seconds?: number | string; + second?: number | string; + s?: number | string; + + milliseconds?: number | string; + millisecond?: number | string; + ms?: number | string; + } + } +} diff --git a/esm/plugin/objectSupport/index.js b/esm/plugin/objectSupport/index.js new file mode 100644 index 000000000..61636e766 --- /dev/null +++ b/esm/plugin/objectSupport/index.js @@ -0,0 +1,97 @@ +export default (function (o, c, dayjs) { + var proto = c.prototype; + + var isObject = function isObject(obj) { + return obj !== null && !(obj instanceof Date) && !(obj instanceof Array) && !proto.$utils().u(obj) && obj.constructor.name === 'Object'; + }; + + var prettyUnit = function prettyUnit(u) { + var unit = proto.$utils().p(u); + return unit === 'date' ? 'day' : unit; + }; + + var parseDate = function parseDate(cfg) { + var date = cfg.date, + utc = cfg.utc; + var $d = {}; + + if (isObject(date)) { + if (!Object.keys(date).length) { + return new Date(); + } + + var now = utc ? dayjs.utc() : dayjs(); + Object.keys(date).forEach(function (k) { + $d[prettyUnit(k)] = date[k]; + }); + var d = $d.day || (!$d.year && !($d.month >= 0) ? now.date() : 1); + var y = $d.year || now.year(); + var M = $d.month >= 0 ? $d.month : !$d.year && !$d.day ? now.month() : 0; // eslint-disable-line no-nested-ternary,max-len + + var h = $d.hour || 0; + var m = $d.minute || 0; + var s = $d.second || 0; + var ms = $d.millisecond || 0; + + if (utc) { + return new Date(Date.UTC(y, M, d, h, m, s, ms)); + } + + return new Date(y, M, d, h, m, s, ms); + } + + return date; + }; + + var oldParse = proto.parse; + + proto.parse = function (cfg) { + cfg.date = parseDate.bind(this)(cfg); + oldParse.bind(this)(cfg); + }; + + var oldSet = proto.set; + var oldAdd = proto.add; + var oldSubtract = proto.subtract; + + var callObject = function callObject(call, argument, string, offset) { + if (offset === void 0) { + offset = 1; + } + + var keys = Object.keys(argument); + var chain = this; + keys.forEach(function (key) { + chain = call.bind(chain)(argument[key] * offset, key); + }); + return chain; + }; + + proto.set = function (unit, value) { + value = value === undefined ? unit : value; + + if (unit.constructor.name === 'Object') { + return callObject.bind(this)(function (i, s) { + return oldSet.bind(this)(s, i); + }, value, unit); + } + + return oldSet.bind(this)(unit, value); + }; + + proto.add = function (value, unit) { + if (value.constructor.name === 'Object') { + return callObject.bind(this)(oldAdd, value, unit); + } + + return oldAdd.bind(this)(value, unit); + }; + + proto.subtract = function (value, unit) { + if (value.constructor.name === 'Object') { + return callObject.bind(this)(oldAdd, value, unit, -1); + } + + return oldSubtract.bind(this)(value, unit); + }; +}); \ No newline at end of file diff --git a/esm/plugin/pluralGetSet/index.d.ts b/esm/plugin/pluralGetSet/index.d.ts new file mode 100644 index 000000000..7ef7167c9 --- /dev/null +++ b/esm/plugin/pluralGetSet/index.d.ts @@ -0,0 +1,44 @@ +import { PluginFunc, UnitType, ConfigType } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + years(): number + + years(value: number): Dayjs + + months(): number + + months(value: number): Dayjs + + dates(): number + + dates(value: number): Dayjs + + weeks(): number + + weeks(value: number): Dayjs + + days(): number + + days(value: number): Dayjs + + hours(): number + + hours(value: number): Dayjs + + minutes(): number + + minutes(value: number): Dayjs + + seconds(): number + + seconds(value: number): Dayjs + + milliseconds(): number + + milliseconds(value: number): Dayjs + } +} diff --git a/esm/plugin/pluralGetSet/index.js b/esm/plugin/pluralGetSet/index.js new file mode 100644 index 000000000..d8214d641 --- /dev/null +++ b/esm/plugin/pluralGetSet/index.js @@ -0,0 +1,7 @@ +export default (function (o, c) { + var proto = c.prototype; + var pluralAliases = ['milliseconds', 'seconds', 'minutes', 'hours', 'days', 'weeks', 'isoWeeks', 'months', 'quarters', 'years', 'dates']; + pluralAliases.forEach(function (alias) { + proto[alias] = proto[alias.replace(/s$/, '')]; + }); +}); \ No newline at end of file diff --git a/esm/plugin/preParsePostFormat/index.d.ts b/esm/plugin/preParsePostFormat/index.d.ts new file mode 100644 index 000000000..a17c89631 --- /dev/null +++ b/esm/plugin/preParsePostFormat/index.d.ts @@ -0,0 +1,4 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin diff --git a/esm/plugin/preParsePostFormat/index.js b/esm/plugin/preParsePostFormat/index.js new file mode 100644 index 000000000..7654ccbe9 --- /dev/null +++ b/esm/plugin/preParsePostFormat/index.js @@ -0,0 +1,40 @@ +// Plugin template from https://day.js.org/docs/en/plugin/plugin +export default (function (option, dayjsClass) { + var oldParse = dayjsClass.prototype.parse; + + dayjsClass.prototype.parse = function (cfg) { + if (typeof cfg.date === 'string') { + var locale = this.$locale(); + cfg.date = locale && locale.preparse ? locale.preparse(cfg.date) : cfg.date; + } // original parse result + + + return oldParse.bind(this)(cfg); + }; // // overriding existing API + // // e.g. extend dayjs().format() + + + var oldFormat = dayjsClass.prototype.format; + + dayjsClass.prototype.format = function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + // original format result + var result = oldFormat.call.apply(oldFormat, [this].concat(args)); // return modified result + + var locale = this.$locale(); + return locale && locale.postformat ? locale.postformat(result) : result; + }; + + var oldFromTo = dayjsClass.prototype.fromToBase; + + if (oldFromTo) { + dayjsClass.prototype.fromToBase = function (input, withoutSuffix, instance, isFrom) { + var locale = this.$locale() || instance.$locale(); // original format result + + return oldFromTo.call(this, input, withoutSuffix, instance, isFrom, locale && locale.postformat); + }; + } +}); \ No newline at end of file diff --git a/esm/plugin/quarterOfYear/index.d.ts b/esm/plugin/quarterOfYear/index.d.ts new file mode 100644 index 000000000..37691c116 --- /dev/null +++ b/esm/plugin/quarterOfYear/index.d.ts @@ -0,0 +1,26 @@ +import { PluginFunc, ConfigType, QUnitType, OpUnitType } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + quarter(): number + + quarter(quarter: number): Dayjs + + add(value: number, unit: QUnitType): Dayjs + + subtract(value: number, unit: QUnitType): Dayjs + + startOf(unit: QUnitType | OpUnitType): Dayjs + + endOf(unit: QUnitType | OpUnitType): Dayjs + + isSame(date?: ConfigType, unit?: QUnitType): boolean + + isBefore(date?: ConfigType, unit?: QUnitType): boolean + + isAfter(date?: ConfigType, unit?: QUnitType): boolean + } +} diff --git a/esm/plugin/quarterOfYear/index.js b/esm/plugin/quarterOfYear/index.js new file mode 100644 index 000000000..e376889e5 --- /dev/null +++ b/esm/plugin/quarterOfYear/index.js @@ -0,0 +1,41 @@ +import { Q, M, D } from '../../constant'; +export default (function (o, c) { + var proto = c.prototype; + + proto.quarter = function (quarter) { + if (!this.$utils().u(quarter)) { + return this.month(this.month() % 3 + (quarter - 1) * 3); + } + + return Math.ceil((this.month() + 1) / 3); + }; + + var oldAdd = proto.add; + + proto.add = function (number, units) { + number = Number(number); // eslint-disable-line no-param-reassign + + var unit = this.$utils().p(units); + + if (unit === Q) { + return this.add(number * 3, M); + } + + return oldAdd.bind(this)(number, units); + }; + + var oldStartOf = proto.startOf; + + proto.startOf = function (units, startOf) { + var utils = this.$utils(); + var isStartOf = !utils.u(startOf) ? startOf : true; + var unit = utils.p(units); + + if (unit === Q) { + var quarter = this.quarter() - 1; + return isStartOf ? this.month(quarter * 3).startOf(M).startOf(D) : this.month(quarter * 3 + 2).endOf(M).endOf(D); + } + + return oldStartOf.bind(this)(units, startOf); + }; +}); \ No newline at end of file diff --git a/esm/plugin/relativeTime/index.d.ts b/esm/plugin/relativeTime/index.d.ts new file mode 100644 index 000000000..e1b17cf8b --- /dev/null +++ b/esm/plugin/relativeTime/index.d.ts @@ -0,0 +1,24 @@ +import { PluginFunc, ConfigType } from 'dayjs/esm' + +declare interface RelativeTimeThreshold { + l: string + r?: number + d?: string +} + +declare interface RelativeTimeOptions { + rounding?: (num: number) => number + thresholds?: RelativeTimeThreshold[] +} + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + fromNow(withoutSuffix?: boolean): string + from(compared: ConfigType, withoutSuffix?: boolean): string + toNow(withoutSuffix?: boolean): string + to(compared: ConfigType, withoutSuffix?: boolean): string + } +} diff --git a/esm/plugin/relativeTime/index.js b/esm/plugin/relativeTime/index.js new file mode 100644 index 000000000..88fdbbe83 --- /dev/null +++ b/esm/plugin/relativeTime/index.js @@ -0,0 +1,130 @@ +import * as C from '../../constant'; +export default (function (o, c, d) { + o = o || {}; + var proto = c.prototype; + var relObj = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years' + }; + d.en.relativeTime = relObj; + + proto.fromToBase = function (input, withoutSuffix, instance, isFrom, postFormat) { + var loc = instance.$locale().relativeTime || relObj; + var T = o.thresholds || [{ + l: 's', + r: 44, + d: C.S + }, { + l: 'm', + r: 89 + }, { + l: 'mm', + r: 44, + d: C.MIN + }, { + l: 'h', + r: 89 + }, { + l: 'hh', + r: 21, + d: C.H + }, { + l: 'd', + r: 35 + }, { + l: 'dd', + r: 25, + d: C.D + }, { + l: 'M', + r: 45 + }, { + l: 'MM', + r: 10, + d: C.M + }, { + l: 'y', + r: 17 + }, { + l: 'yy', + d: C.Y + }]; + var Tl = T.length; + var result; + var out; + var isFuture; + + for (var i = 0; i < Tl; i += 1) { + var t = T[i]; + + if (t.d) { + result = isFrom ? d(input).diff(instance, t.d, true) : instance.diff(input, t.d, true); + } + + var abs = (o.rounding || Math.round)(Math.abs(result)); + isFuture = result > 0; + + if (abs <= t.r || !t.r) { + if (abs <= 1 && i > 0) t = T[i - 1]; // 1 minutes -> a minute, 0 seconds -> 0 second + + var format = loc[t.l]; + + if (postFormat) { + abs = postFormat("" + abs); + } + + if (typeof format === 'string') { + out = format.replace('%d', abs); + } else { + out = format(abs, withoutSuffix, t.l, isFuture); + } + + break; + } + } + + if (withoutSuffix) return out; + var pastOrFuture = isFuture ? loc.future : loc.past; + + if (typeof pastOrFuture === 'function') { + return pastOrFuture(out); + } + + return pastOrFuture.replace('%s', out); + }; + + function fromTo(input, withoutSuffix, instance, isFrom) { + return proto.fromToBase(input, withoutSuffix, instance, isFrom); + } + + proto.to = function (input, withoutSuffix) { + return fromTo(input, withoutSuffix, this, true); + }; + + proto.from = function (input, withoutSuffix) { + return fromTo(input, withoutSuffix, this); + }; + + var makeNow = function makeNow(thisDay) { + return thisDay.$u ? d.utc() : d(); + }; + + proto.toNow = function (withoutSuffix) { + return this.to(makeNow(this), withoutSuffix); + }; + + proto.fromNow = function (withoutSuffix) { + return this.from(makeNow(this), withoutSuffix); + }; +}); \ No newline at end of file diff --git a/esm/plugin/timezone/index.d.ts b/esm/plugin/timezone/index.d.ts new file mode 100644 index 000000000..5a2d9f2db --- /dev/null +++ b/esm/plugin/timezone/index.d.ts @@ -0,0 +1,20 @@ +import { PluginFunc, ConfigType } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + tz(timezone?: string, keepLocalTime?: boolean): Dayjs + offsetName(type?: 'short' | 'long'): string | undefined + } + + interface DayjsTimezone { + (date?: ConfigType, timezone?: string): Dayjs + (date: ConfigType, format: string, timezone?: string): Dayjs + guess(): string + setDefault(timezone?: string): void + } + + const tz: DayjsTimezone +} diff --git a/esm/plugin/timezone/index.js b/esm/plugin/timezone/index.js new file mode 100644 index 000000000..490aff2e5 --- /dev/null +++ b/esm/plugin/timezone/index.js @@ -0,0 +1,189 @@ +import { MIN, MS } from '../../constant'; +var typeToPos = { + year: 0, + month: 1, + day: 2, + hour: 3, + minute: 4, + second: 5 +}; // Cache time-zone lookups from Intl.DateTimeFormat, +// as it is a *very* slow method. + +var dtfCache = {}; + +var getDateTimeFormat = function getDateTimeFormat(timezone, options) { + if (options === void 0) { + options = {}; + } + + var timeZoneName = options.timeZoneName || 'short'; + var key = timezone + "|" + timeZoneName; + var dtf = dtfCache[key]; + + if (!dtf) { + dtf = new Intl.DateTimeFormat('en-US', { + hour12: false, + timeZone: timezone, + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + second: '2-digit', + timeZoneName: timeZoneName + }); + dtfCache[key] = dtf; + } + + return dtf; +}; + +export default (function (o, c, d) { + var defaultTimezone; + + var makeFormatParts = function makeFormatParts(timestamp, timezone, options) { + if (options === void 0) { + options = {}; + } + + var date = new Date(timestamp); + var dtf = getDateTimeFormat(timezone, options); + return dtf.formatToParts(date); + }; + + var tzOffset = function tzOffset(timestamp, timezone) { + var formatResult = makeFormatParts(timestamp, timezone); + var filled = []; + + for (var i = 0; i < formatResult.length; i += 1) { + var _formatResult$i = formatResult[i], + type = _formatResult$i.type, + value = _formatResult$i.value; + var pos = typeToPos[type]; + + if (pos >= 0) { + filled[pos] = parseInt(value, 10); + } + } + + var hour = filled[3]; // Workaround for the same behavior in different node version + // https://github.com/nodejs/node/issues/33027 + + /* istanbul ignore next */ + + var fixedHour = hour === 24 ? 0 : hour; + var utcString = filled[0] + "-" + filled[1] + "-" + filled[2] + " " + fixedHour + ":" + filled[4] + ":" + filled[5] + ":000"; + var utcTs = d.utc(utcString).valueOf(); + var asTS = +timestamp; + var over = asTS % 1000; + asTS -= over; + return (utcTs - asTS) / (60 * 1000); + }; // find the right offset a given local time. The o input is our guess, which determines which + // offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST) + // https://github.com/moment/luxon/blob/master/src/datetime.js#L76 + + + var fixOffset = function fixOffset(localTS, o0, tz) { + // Our UTC time is just a guess because our offset is just a guess + var utcGuess = localTS - o0 * 60 * 1000; // Test whether the zone matches the offset for this ts + + var o2 = tzOffset(utcGuess, tz); // If so, offset didn't change and we're done + + if (o0 === o2) { + return [utcGuess, o0]; + } // If not, change the ts by the difference in the offset + + + utcGuess -= (o2 - o0) * 60 * 1000; // If that gives us the local time we want, we're done + + var o3 = tzOffset(utcGuess, tz); + + if (o2 === o3) { + return [utcGuess, o2]; + } // If it's different, we're in a hole time. + // The offset has changed, but the we don't adjust the time + + + return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)]; + }; + + var proto = c.prototype; + + proto.tz = function (timezone, keepLocalTime) { + if (timezone === void 0) { + timezone = defaultTimezone; + } + + var oldOffset = this.utcOffset(); + var date = this.toDate(); + var target = date.toLocaleString('en-US', { + timeZone: timezone + }); + var diff = Math.round((date - new Date(target)) / 1000 / 60); + var ins = d(target, { + locale: this.$L + }).$set(MS, this.$ms).utcOffset(-Math.round(date.getTimezoneOffset() / 15) * 15 - diff, true); + + if (keepLocalTime) { + var newOffset = ins.utcOffset(); + ins = ins.add(oldOffset - newOffset, MIN); + } + + ins.$x.$timezone = timezone; + return ins; + }; + + proto.offsetName = function (type) { + // type: short(default) / long + var zone = this.$x.$timezone || d.tz.guess(); + var result = makeFormatParts(this.valueOf(), zone, { + timeZoneName: type + }).find(function (m) { + return m.type.toLowerCase() === 'timezonename'; + }); + return result && result.value; + }; + + var oldStartOf = proto.startOf; + + proto.startOf = function (units, startOf) { + if (!this.$x || !this.$x.$timezone) { + return oldStartOf.call(this, units, startOf); + } + + var withoutTz = d(this.format('YYYY-MM-DD HH:mm:ss:SSS'), { + locale: this.$L + }); + var startOfWithoutTz = oldStartOf.call(withoutTz, units, startOf); + return startOfWithoutTz.tz(this.$x.$timezone, true); + }; + + d.tz = function (input, arg1, arg2) { + var parseFormat = arg2 && arg1; + var timezone = arg2 || arg1 || defaultTimezone; + var previousOffset = tzOffset(+d(), timezone); + + if (typeof input !== 'string') { + // timestamp number || js Date || Day.js + return d(input).tz(timezone); + } + + var localTs = d.utc(input, parseFormat).valueOf(); + + var _fixOffset = fixOffset(localTs, previousOffset, timezone), + targetTs = _fixOffset[0], + targetOffset = _fixOffset[1]; + + var ins = d(targetTs).utcOffset(targetOffset); + ins.$x.$timezone = timezone; + return ins; + }; + + d.tz.guess = function () { + return Intl.DateTimeFormat().resolvedOptions().timeZone; + }; + + d.tz.setDefault = function (timezone) { + defaultTimezone = timezone; + }; +}); \ No newline at end of file diff --git a/esm/plugin/toArray/index.d.ts b/esm/plugin/toArray/index.d.ts new file mode 100644 index 000000000..5033831da --- /dev/null +++ b/esm/plugin/toArray/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + toArray(): number[] + } +} diff --git a/esm/plugin/toArray/index.js b/esm/plugin/toArray/index.js new file mode 100644 index 000000000..2b795f498 --- /dev/null +++ b/esm/plugin/toArray/index.js @@ -0,0 +1,7 @@ +export default (function (o, c) { + var proto = c.prototype; + + proto.toArray = function () { + return [this.$y, this.$M, this.$D, this.$H, this.$m, this.$s, this.$ms]; + }; +}); \ No newline at end of file diff --git a/esm/plugin/toObject/index.d.ts b/esm/plugin/toObject/index.d.ts new file mode 100644 index 000000000..ad215200b --- /dev/null +++ b/esm/plugin/toObject/index.d.ts @@ -0,0 +1,20 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +interface DayjsObject { + years: number + months: number + date: number + hours: number + minutes: number + seconds: number + milliseconds: number +} + +declare module 'dayjs/esm' { + interface Dayjs { + toObject(): DayjsObject + } +} diff --git a/esm/plugin/toObject/index.js b/esm/plugin/toObject/index.js new file mode 100644 index 000000000..e35d93f56 --- /dev/null +++ b/esm/plugin/toObject/index.js @@ -0,0 +1,15 @@ +export default (function (o, c) { + var proto = c.prototype; + + proto.toObject = function () { + return { + years: this.$y, + months: this.$M, + date: this.$D, + hours: this.$H, + minutes: this.$m, + seconds: this.$s, + milliseconds: this.$ms + }; + }; +}); \ No newline at end of file diff --git a/esm/plugin/updateLocale/index.d.ts b/esm/plugin/updateLocale/index.d.ts new file mode 100644 index 000000000..994a884d7 --- /dev/null +++ b/esm/plugin/updateLocale/index.d.ts @@ -0,0 +1,8 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + export function updateLocale(localeName: string, customConfig: Record): Record +} diff --git a/esm/plugin/updateLocale/index.js b/esm/plugin/updateLocale/index.js new file mode 100644 index 000000000..1b9965cd0 --- /dev/null +++ b/esm/plugin/updateLocale/index.js @@ -0,0 +1,12 @@ +export default (function (option, Dayjs, dayjs) { + dayjs.updateLocale = function (locale, customConfig) { + var localeList = dayjs.Ls; + var localeConfig = localeList[locale]; + if (!localeConfig) return; + var customConfigKeys = customConfig ? Object.keys(customConfig) : []; + customConfigKeys.forEach(function (c) { + localeConfig[c] = customConfig[c]; + }); + return localeConfig; // eslint-disable-line consistent-return + }; +}); \ No newline at end of file diff --git a/esm/plugin/utc/index.d.ts b/esm/plugin/utc/index.d.ts new file mode 100644 index 000000000..15c61fec1 --- /dev/null +++ b/esm/plugin/utc/index.d.ts @@ -0,0 +1,19 @@ +import { PluginFunc, ConfigType } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + + utc(keepLocalTime?: boolean): Dayjs + + local(): Dayjs + + isUTC(): boolean + + utcOffset(offset: number | string, keepLocalTime?: boolean): Dayjs + } + + export function utc(config?: ConfigType, format?: string, strict?: boolean): Dayjs +} diff --git a/esm/plugin/utc/index.js b/esm/plugin/utc/index.js new file mode 100644 index 000000000..a8a05f56c --- /dev/null +++ b/esm/plugin/utc/index.js @@ -0,0 +1,188 @@ +import { MILLISECONDS_A_MINUTE, MIN } from '../../constant'; +var REGEX_VALID_OFFSET_FORMAT = /[+-]\d\d(?::?\d\d)?/g; +var REGEX_OFFSET_HOURS_MINUTES_FORMAT = /([+-]|\d\d)/g; + +function offsetFromString(value) { + if (value === void 0) { + value = ''; + } + + var offset = value.match(REGEX_VALID_OFFSET_FORMAT); + + if (!offset) { + return null; + } + + var _ref = ("" + offset[0]).match(REGEX_OFFSET_HOURS_MINUTES_FORMAT) || ['-', 0, 0], + indicator = _ref[0], + hoursOffset = _ref[1], + minutesOffset = _ref[2]; + + var totalOffsetInMinutes = +hoursOffset * 60 + +minutesOffset; + + if (totalOffsetInMinutes === 0) { + return 0; + } + + return indicator === '+' ? totalOffsetInMinutes : -totalOffsetInMinutes; +} + +export default (function (option, Dayjs, dayjs) { + var proto = Dayjs.prototype; + + dayjs.utc = function (date) { + var cfg = { + date: date, + utc: true, + args: arguments + }; // eslint-disable-line prefer-rest-params + + return new Dayjs(cfg); // eslint-disable-line no-use-before-define + }; + + proto.utc = function (keepLocalTime) { + var ins = dayjs(this.toDate(), { + locale: this.$L, + utc: true + }); + + if (keepLocalTime) { + return ins.add(this.utcOffset(), MIN); + } + + return ins; + }; + + proto.local = function () { + return dayjs(this.toDate(), { + locale: this.$L, + utc: false + }); + }; + + var oldParse = proto.parse; + + proto.parse = function (cfg) { + if (cfg.utc) { + this.$u = true; + } + + if (!this.$utils().u(cfg.$offset)) { + this.$offset = cfg.$offset; + } + + oldParse.call(this, cfg); + }; + + var oldInit = proto.init; + + proto.init = function () { + if (this.$u) { + var $d = this.$d; + this.$y = $d.getUTCFullYear(); + this.$M = $d.getUTCMonth(); + this.$D = $d.getUTCDate(); + this.$W = $d.getUTCDay(); + this.$H = $d.getUTCHours(); + this.$m = $d.getUTCMinutes(); + this.$s = $d.getUTCSeconds(); + this.$ms = $d.getUTCMilliseconds(); + } else { + oldInit.call(this); + } + }; + + var oldUtcOffset = proto.utcOffset; + + proto.utcOffset = function (input, keepLocalTime) { + var _this$$utils = this.$utils(), + u = _this$$utils.u; + + if (u(input)) { + if (this.$u) { + return 0; + } + + if (!u(this.$offset)) { + return this.$offset; + } + + return oldUtcOffset.call(this); + } + + if (typeof input === 'string') { + input = offsetFromString(input); + + if (input === null) { + return this; + } + } + + var offset = Math.abs(input) <= 16 ? input * 60 : input; + var ins = this; + + if (keepLocalTime) { + ins.$offset = offset; + ins.$u = input === 0; + return ins; + } + + if (input !== 0) { + var localTimezoneOffset = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset(); + ins = this.local().add(offset + localTimezoneOffset, MIN); + ins.$offset = offset; + ins.$x.$localOffset = localTimezoneOffset; + } else { + ins = this.utc(); + } + + return ins; + }; + + var oldFormat = proto.format; + var UTC_FORMAT_DEFAULT = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + proto.format = function (formatStr) { + var str = formatStr || (this.$u ? UTC_FORMAT_DEFAULT : ''); + return oldFormat.call(this, str); + }; + + proto.valueOf = function () { + var addedOffset = !this.$utils().u(this.$offset) ? this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset()) : 0; + return this.$d.valueOf() - addedOffset * MILLISECONDS_A_MINUTE; + }; + + proto.isUTC = function () { + return !!this.$u; + }; + + proto.toISOString = function () { + return this.toDate().toISOString(); + }; + + proto.toString = function () { + return this.toDate().toUTCString(); + }; + + var oldToDate = proto.toDate; + + proto.toDate = function (type) { + if (type === 's' && this.$offset) { + return dayjs(this.format('YYYY-MM-DD HH:mm:ss:SSS')).toDate(); + } + + return oldToDate.call(this); + }; + + var oldDiff = proto.diff; + + proto.diff = function (input, units, _float) { + if (input && this.$u === input.$u) { + return oldDiff.call(this, input, units, _float); + } + + var localThis = this.local(); + var localInput = dayjs(input).local(); + return oldDiff.call(localThis, localInput, units, _float); + }; +}); \ No newline at end of file diff --git a/esm/plugin/weekOfYear/index.d.ts b/esm/plugin/weekOfYear/index.d.ts new file mode 100644 index 000000000..340051bd3 --- /dev/null +++ b/esm/plugin/weekOfYear/index.d.ts @@ -0,0 +1,12 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + week(): number + + week(value : number): Dayjs + } +} diff --git a/esm/plugin/weekOfYear/index.js b/esm/plugin/weekOfYear/index.js new file mode 100644 index 000000000..c92406eb6 --- /dev/null +++ b/esm/plugin/weekOfYear/index.js @@ -0,0 +1,44 @@ +import { MS, Y, D, W } from '../../constant'; +export default (function (o, c, d) { + var proto = c.prototype; + + proto.week = function (week) { + if (week === void 0) { + week = null; + } + + if (week !== null) { + return this.add((week - this.week()) * 7, D); + } + + var yearStart = this.$locale().yearStart || 1; + + if (this.month() === 11 && this.date() > 25) { + // d(this) is for badMutable + var nextYearStartDay = d(this).startOf(Y).add(1, Y).date(yearStart); + var thisEndOfWeek = d(this).endOf(W); + + if (nextYearStartDay.isBefore(thisEndOfWeek)) { + return 1; + } + } + + var yearStartDay = d(this).startOf(Y).date(yearStart); + var yearStartWeek = yearStartDay.startOf(W).subtract(1, MS); + var diffInWeek = this.diff(yearStartWeek, W, true); + + if (diffInWeek < 0) { + return d(this).startOf('week').week(); + } + + return Math.ceil(diffInWeek); + }; + + proto.weeks = function (week) { + if (week === void 0) { + week = null; + } + + return this.week(week); + }; +}); \ No newline at end of file diff --git a/esm/plugin/weekYear/index.d.ts b/esm/plugin/weekYear/index.d.ts new file mode 100644 index 000000000..5b713e531 --- /dev/null +++ b/esm/plugin/weekYear/index.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + weekYear(): number + } +} diff --git a/esm/plugin/weekYear/index.js b/esm/plugin/weekYear/index.js new file mode 100644 index 000000000..140dcd440 --- /dev/null +++ b/esm/plugin/weekYear/index.js @@ -0,0 +1,19 @@ +export default (function (o, c) { + var proto = c.prototype; + + proto.weekYear = function () { + var month = this.month(); + var weekOfYear = this.week(); + var year = this.year(); + + if (weekOfYear === 1 && month === 11) { + return year + 1; + } + + if (month === 0 && weekOfYear >= 52) { + return year - 1; + } + + return year; + }; +}); \ No newline at end of file diff --git a/esm/plugin/weekday/index.d.ts b/esm/plugin/weekday/index.d.ts new file mode 100644 index 000000000..41945e7e3 --- /dev/null +++ b/esm/plugin/weekday/index.d.ts @@ -0,0 +1,12 @@ +import { PluginFunc } from 'dayjs/esm' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs/esm' { + interface Dayjs { + weekday(): number + + weekday(value: number): Dayjs + } +} diff --git a/esm/plugin/weekday/index.js b/esm/plugin/weekday/index.js new file mode 100644 index 000000000..18032b36e --- /dev/null +++ b/esm/plugin/weekday/index.js @@ -0,0 +1,15 @@ +export default (function (o, c) { + var proto = c.prototype; + + proto.weekday = function (input) { + var weekStart = this.$locale().weekStart || 0; + var $W = this.$W; + var weekday = ($W < weekStart ? $W + 7 : $W) - weekStart; + + if (this.$utils().u(input)) { + return weekday; + } + + return this.subtract(weekday, 'day').add(input, 'day'); + }; +}); \ No newline at end of file diff --git a/esm/utils.js b/esm/utils.js new file mode 100644 index 000000000..b5a81312b --- /dev/null +++ b/esm/utils.js @@ -0,0 +1,58 @@ +import * as C from './constant'; + +var padStart = function padStart(string, length, pad) { + var s = String(string); + if (!s || s.length >= length) return string; + return "" + Array(length + 1 - s.length).join(pad) + string; +}; + +var padZoneStr = function padZoneStr(instance) { + var negMinutes = -instance.utcOffset(); + var minutes = Math.abs(negMinutes); + var hourOffset = Math.floor(minutes / 60); + var minuteOffset = minutes % 60; + return "" + (negMinutes <= 0 ? '+' : '-') + padStart(hourOffset, 2, '0') + ":" + padStart(minuteOffset, 2, '0'); +}; + +var monthDiff = function monthDiff(a, b) { + // function from moment.js in order to keep the same result + if (a.date() < b.date()) return -monthDiff(b, a); + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()); + var anchor = a.clone().add(wholeMonthDiff, C.M); + var c = b - anchor < 0; + var anchor2 = a.clone().add(wholeMonthDiff + (c ? -1 : 1), C.M); + return +(-(wholeMonthDiff + (b - anchor) / (c ? anchor - anchor2 : anchor2 - anchor)) || 0); +}; + +var absFloor = function absFloor(n) { + return n < 0 ? Math.ceil(n) || 0 : Math.floor(n); +}; + +var prettyUnit = function prettyUnit(u) { + var special = { + M: C.M, + y: C.Y, + w: C.W, + d: C.D, + D: C.DATE, + h: C.H, + m: C.MIN, + s: C.S, + ms: C.MS, + Q: C.Q + }; + return special[u] || String(u || '').toLowerCase().replace(/s$/, ''); +}; + +var isUndefined = function isUndefined(s) { + return s === undefined; +}; + +export default { + s: padStart, + z: padZoneStr, + m: monthDiff, + a: absFloor, + p: prettyUnit, + u: isUndefined +}; \ No newline at end of file diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 000000000..cd159dcae --- /dev/null +++ b/index.d.ts @@ -0,0 +1,429 @@ +/// + +export = dayjs; + +declare function dayjs (date?: dayjs.ConfigType): dayjs.Dayjs + +declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, strict?: boolean): dayjs.Dayjs + +declare function dayjs (date?: dayjs.ConfigType, format?: dayjs.OptionType, locale?: string, strict?: boolean): dayjs.Dayjs + +declare namespace dayjs { + interface ConfigTypeMap { + default: string | number | Date | Dayjs | null | undefined + } + + export type ConfigType = ConfigTypeMap[keyof ConfigTypeMap] + + export interface FormatObject { locale?: string, format?: string, utc?: boolean } + + export type OptionType = FormatObject | string | string[] + + export type UnitTypeShort = 'd' | 'D' | 'M' | 'y' | 'h' | 'm' | 's' | 'ms' + + export type UnitTypeLong = 'millisecond' | 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | 'date' + + export type UnitTypeLongPlural = 'milliseconds' | 'seconds' | 'minutes' | 'hours' | 'days' | 'months' | 'years' | 'dates' + + export type UnitType = UnitTypeLong | UnitTypeLongPlural | UnitTypeShort; + + export type OpUnitType = UnitType | "week" | "weeks" | 'w'; + export type QUnitType = UnitType | "quarter" | "quarters" | 'Q'; + export type ManipulateType = Exclude; + class Dayjs { + constructor (config?: ConfigType) + /** + * All Day.js objects are immutable. Still, `dayjs#clone` can create a clone of the current object if you need one. + * ``` + * dayjs().clone()// => Dayjs + * dayjs(dayjs('2019-01-25')) // passing a Dayjs object to a constructor will also clone it + * ``` + * Docs: https://day.js.org/docs/en/parse/dayjs-clone + */ + clone(): Dayjs + /** + * This returns a `boolean` indicating whether the Day.js object contains a valid date or not. + * ``` + * dayjs().isValid()// => boolean + * ``` + * Docs: https://day.js.org/docs/en/parse/is-valid + */ + isValid(): boolean + /** + * Get the year. + * ``` + * dayjs().year()// => 2020 + * ``` + * Docs: https://day.js.org/docs/en/get-set/year + */ + year(): number + /** + * Set the year. + * ``` + * dayjs().year(2000)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/year + */ + year(value: number): Dayjs + /** + * Get the month. + * + * Months are zero indexed, so January is month 0. + * ``` + * dayjs().month()// => 0-11 + * ``` + * Docs: https://day.js.org/docs/en/get-set/month + */ + month(): number + /** + * Set the month. + * + * Months are zero indexed, so January is month 0. + * + * Accepts numbers from 0 to 11. If the range is exceeded, it will bubble up to the next year. + * ``` + * dayjs().month(0)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/month + */ + month(value: number): Dayjs + /** + * Get the date of the month. + * ``` + * dayjs().date()// => 1-31 + * ``` + * Docs: https://day.js.org/docs/en/get-set/date + */ + date(): number + /** + * Set the date of the month. + * + * Accepts numbers from 1 to 31. If the range is exceeded, it will bubble up to the next months. + * ``` + * dayjs().date(1)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/date + */ + date(value: number): Dayjs + /** + * Get the day of the week. + * + * Returns numbers from 0 (Sunday) to 6 (Saturday). + * ``` + * dayjs().day()// 0-6 + * ``` + * Docs: https://day.js.org/docs/en/get-set/day + */ + day(): 0 | 1 | 2 | 3 | 4 | 5 | 6 + /** + * Set the day of the week. + * + * Accepts numbers from 0 (Sunday) to 6 (Saturday). If the range is exceeded, it will bubble up to next weeks. + * ``` + * dayjs().day(0)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/day + */ + day(value: number): Dayjs + /** + * Get the hour. + * ``` + * dayjs().hour()// => 0-23 + * ``` + * Docs: https://day.js.org/docs/en/get-set/hour + */ + hour(): number + /** + * Set the hour. + * + * Accepts numbers from 0 to 23. If the range is exceeded, it will bubble up to the next day. + * ``` + * dayjs().hour(12)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/hour + */ + hour(value: number): Dayjs + /** + * Get the minutes. + * ``` + * dayjs().minute()// => 0-59 + * ``` + * Docs: https://day.js.org/docs/en/get-set/minute + */ + minute(): number + /** + * Set the minutes. + * + * Accepts numbers from 0 to 59. If the range is exceeded, it will bubble up to the next hour. + * ``` + * dayjs().minute(59)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/minute + */ + minute(value: number): Dayjs + /** + * Get the seconds. + * ``` + * dayjs().second()// => 0-59 + * ``` + * Docs: https://day.js.org/docs/en/get-set/second + */ + second(): number + /** + * Set the seconds. + * + * Accepts numbers from 0 to 59. If the range is exceeded, it will bubble up to the next minutes. + * ``` + * dayjs().second(1)// Dayjs + * ``` + */ + second(value: number): Dayjs + /** + * Get the milliseconds. + * ``` + * dayjs().millisecond()// => 0-999 + * ``` + * Docs: https://day.js.org/docs/en/get-set/millisecond + */ + millisecond(): number + /** + * Set the milliseconds. + * + * Accepts numbers from 0 to 999. If the range is exceeded, it will bubble up to the next seconds. + * ``` + * dayjs().millisecond(1)// => Dayjs + * ``` + * Docs: https://day.js.org/docs/en/get-set/millisecond + */ + millisecond(value: number): Dayjs + /** + * Generic setter, accepting unit as first argument, and value as second, returns a new instance with the applied changes. + * + * In general: + * ``` + * dayjs().set(unit, value) === dayjs()[unit](value) + * ``` + * Units are case insensitive, and support plural and short forms. + * ``` + * dayjs().set('date', 1) + * dayjs().set('month', 3) // April + * dayjs().set('second', 30) + * ``` + * Docs: https://day.js.org/docs/en/get-set/set + */ + set(unit: UnitType, value: number): Dayjs + /** + * String getter, returns the corresponding information getting from Day.js object. + * + * In general: + * ``` + * dayjs().get(unit) === dayjs()[unit]() + * ``` + * Units are case insensitive, and support plural and short forms. + * ``` + * dayjs().get('year') + * dayjs().get('month') // start 0 + * dayjs().get('date') + * ``` + * Docs: https://day.js.org/docs/en/get-set/get + */ + get(unit: UnitType): number + /** + * Returns a cloned Day.js object with a specified amount of time added. + * ``` + * dayjs().add(7, 'day')// => Dayjs + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/manipulate/add + */ + add(value: number, unit?: ManipulateType): Dayjs + /** + * Returns a cloned Day.js object with a specified amount of time subtracted. + * ``` + * dayjs().subtract(7, 'year')// => Dayjs + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/manipulate/subtract + */ + subtract(value: number, unit?: ManipulateType): Dayjs + /** + * Returns a cloned Day.js object and set it to the start of a unit of time. + * ``` + * dayjs().startOf('year')// => Dayjs + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/manipulate/start-of + */ + startOf(unit: OpUnitType): Dayjs + /** + * Returns a cloned Day.js object and set it to the end of a unit of time. + * ``` + * dayjs().endOf('month')// => Dayjs + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/manipulate/end-of + */ + endOf(unit: OpUnitType): Dayjs + /** + * Get the formatted date according to the string of tokens passed in. + * + * To escape characters, wrap them in square brackets (e.g. [MM]). + * ``` + * dayjs().format()// => current date in ISO8601, without fraction seconds e.g. '2020-04-02T08:02:17-05:00' + * dayjs('2019-01-25').format('[YYYYescape] YYYY-MM-DDTHH:mm:ssZ[Z]')// 'YYYYescape 2019-01-25T00:00:00-02:00Z' + * dayjs('2019-01-25').format('DD/MM/YYYY') // '25/01/2019' + * ``` + * Docs: https://day.js.org/docs/en/display/format + */ + format(template?: string): string + /** + * This indicates the difference between two date-time in the specified unit. + * + * To get the difference in milliseconds, use `dayjs#diff` + * ``` + * const date1 = dayjs('2019-01-25') + * const date2 = dayjs('2018-06-05') + * date1.diff(date2) // 20214000000 default milliseconds + * date1.diff() // milliseconds to current time + * ``` + * + * To get the difference in another unit of measurement, pass that measurement as the second argument. + * ``` + * const date1 = dayjs('2019-01-25') + * date1.diff('2018-06-05', 'month') // 7 + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/display/difference + */ + diff(date?: ConfigType, unit?: QUnitType | OpUnitType, float?: boolean): number + /** + * This returns the number of **milliseconds** since the Unix Epoch of the Day.js object. + * ``` + * dayjs('2019-01-25').valueOf() // 1548381600000 + * +dayjs(1548381600000) // 1548381600000 + * ``` + * To get a Unix timestamp (the number of seconds since the epoch) from a Day.js object, you should use Unix Timestamp `dayjs#unix()`. + * + * Docs: https://day.js.org/docs/en/display/unix-timestamp-milliseconds + */ + valueOf(): number + /** + * This returns the Unix timestamp (the number of **seconds** since the Unix Epoch) of the Day.js object. + * ``` + * dayjs('2019-01-25').unix() // 1548381600 + * ``` + * This value is floored to the nearest second, and does not include a milliseconds component. + * + * Docs: https://day.js.org/docs/en/display/unix-timestamp + */ + unix(): number + /** + * Get the number of days in the current month. + * ``` + * dayjs('2019-01-25').daysInMonth() // 31 + * ``` + * Docs: https://day.js.org/docs/en/display/days-in-month + */ + daysInMonth(): number + /** + * To get a copy of the native `Date` object parsed from the Day.js object use `dayjs#toDate`. + * ``` + * dayjs('2019-01-25').toDate()// => Date + * ``` + */ + toDate(): Date + /** + * To serialize as an ISO 8601 string. + * ``` + * dayjs('2019-01-25').toJSON() // '2019-01-25T02:00:00.000Z' + * ``` + * Docs: https://day.js.org/docs/en/display/as-json + */ + toJSON(): string + /** + * To format as an ISO 8601 string. + * ``` + * dayjs('2019-01-25').toISOString() // '2019-01-25T02:00:00.000Z' + * ``` + * Docs: https://day.js.org/docs/en/display/as-iso-string + */ + toISOString(): string + /** + * Returns a string representation of the date. + * ``` + * dayjs('2019-01-25').toString() // 'Fri, 25 Jan 2019 02:00:00 GMT' + * ``` + * Docs: https://day.js.org/docs/en/display/as-string + */ + toString(): string + /** + * Get the UTC offset in minutes. + * ``` + * dayjs().utcOffset() + * ``` + * Docs: https://day.js.org/docs/en/manipulate/utc-offset + */ + utcOffset(): number + /** + * This indicates whether the Day.js object is before the other supplied date-time. + * ``` + * dayjs().isBefore(dayjs('2011-01-01')) // default milliseconds + * ``` + * If you want to limit the granularity to a unit other than milliseconds, pass it as the second parameter. + * ``` + * dayjs().isBefore('2011-01-01', 'year')// => boolean + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/query/is-before + */ + isBefore(date?: ConfigType, unit?: OpUnitType): boolean + /** + * This indicates whether the Day.js object is the same as the other supplied date-time. + * ``` + * dayjs().isSame(dayjs('2011-01-01')) // default milliseconds + * ``` + * If you want to limit the granularity to a unit other than milliseconds, pass it as the second parameter. + * ``` + * dayjs().isSame('2011-01-01', 'year')// => boolean + * ``` + * Docs: https://day.js.org/docs/en/query/is-same + */ + isSame(date?: ConfigType, unit?: OpUnitType): boolean + /** + * This indicates whether the Day.js object is after the other supplied date-time. + * ``` + * dayjs().isAfter(dayjs('2011-01-01')) // default milliseconds + * ``` + * If you want to limit the granularity to a unit other than milliseconds, pass it as the second parameter. + * ``` + * dayjs().isAfter('2011-01-01', 'year')// => boolean + * ``` + * Units are case insensitive, and support plural and short forms. + * + * Docs: https://day.js.org/docs/en/query/is-after + */ + isAfter(date?: ConfigType, unit?: OpUnitType): boolean + + locale(): string + + locale(preset: string | ILocale, object?: Partial): Dayjs + } + + export type PluginFunc = (option: T, c: typeof Dayjs, d: typeof dayjs) => void + + export function extend(plugin: PluginFunc, option?: T): Dayjs + + export function locale(preset?: string | ILocale, object?: Partial, isLocal?: boolean): string + + export function isDayjs(d: any): d is Dayjs + + export function unix(t: number): Dayjs + + const Ls : { [key: string] : ILocale } +} diff --git a/locale.json b/locale.json new file mode 100644 index 000000000..8b9851770 --- /dev/null +++ b/locale.json @@ -0,0 +1 @@ +[{"key":"af","name":"Afrikaans"},{"key":"am","name":"Amharic"},{"key":"ar-kw","name":"Arabic (Kuwait)"},{"key":"ar-ly","name":"Arabic (Lybia)"},{"key":"ar-dz","name":"Arabic (Algeria)"},{"key":"ar-tn","name":" Arabic (Tunisia)"},{"key":"ar-sa","name":"Arabic (Saudi Arabia)"},{"key":"ar-ma","name":"Arabic (Morocco)"},{"key":"ar-iq","name":" Arabic (Iraq)"},{"key":"ar","name":"Arabic"},{"key":"az","name":"Azerbaijani"},{"key":"bg","name":"Bulgarian"},{"key":"bi","name":"Bislama"},{"key":"bm","name":"Bambara"},{"key":"be","name":"Belarusian"},{"key":"br","name":"Breton"},{"key":"bn-bd","name":"Bengali (Bangladesh)"},{"key":"ca","name":"Catalan"},{"key":"cs","name":"Czech"},{"key":"bs","name":"Bosnian"},{"key":"bn","name":"Bengali"},{"key":"cy","name":"Welsh"},{"key":"cv","name":"Chuvash"},{"key":"bo","name":"Tibetan"},{"key":"da","name":"Danish"},{"key":"de-ch","name":"German (Switzerland)"},{"key":"dv","name":"Maldivian"},{"key":"de-at","name":"German (Austria)"},{"key":"el","name":"Greek"},{"key":"en-au","name":"English (Australia)"},{"key":"de","name":"German"},{"key":"en-ca","name":"English (Canada)"},{"key":"en-ie","name":"English (Ireland)"},{"key":"en-in","name":"English (India)"},{"key":"en-il","name":"English (Israel)"},{"key":"en-nz","name":"English (New Zealand)"},{"key":"en-gb","name":"English (United Kingdom)"},{"key":"en-sg","name":"English (Singapore)"},{"key":"en-tt","name":"English (Trinidad & Tobago)"},{"key":"es-mx","name":"Spanish (Mexico)"},{"key":"es-us","name":"Spanish (United States)"},{"key":"eo","name":"Esperanto"},{"key":"es-pr","name":"Spanish (Puerto Rico)"},{"key":"es","name":"Spanish"},{"key":"en","name":"English"},{"key":"es-do","name":"Spanish (Dominican Republic)"},{"key":"fi","name":"Finnish"},{"key":"fr-ca","name":"French (Canada)"},{"key":"fr-ch","name":"French (Switzerland)"},{"key":"et","name":"Estonian"},{"key":"eu","name":"Basque"},{"key":"fa","name":"Persian"},{"key":"fr","name":"French"},{"key":"gd","name":"Scottish Gaelic"},{"key":"fy","name":"Frisian"},{"key":"gom-latn","name":"Konkani Latin script"},{"key":"gu","name":"Gujarati"},{"key":"he","name":"Hebrew"},{"key":"ga","name":"Irish or Irish Gaelic"},{"key":"hi","name":"Hindi"},{"key":"gl","name":"Galician"},{"key":"hy-am","name":"Armenian"},{"key":"hu","name":"Hungarian"},{"key":"fo","name":"Faroese"},{"key":"is","name":"Icelandic"},{"key":"hr","name":"Croatian"},{"key":"ht","name":"Haitian Creole (Haiti)"},{"key":"it-ch","name":"Italian (Switzerland)"},{"key":"id","name":"Indonesian"},{"key":"kk","name":"Kazakh"},{"key":"jv","name":"Javanese"},{"key":"it","name":"Italian"},{"key":"kn","name":"Kannada"},{"key":"km","name":"Cambodian"},{"key":"ku","name":"Kurdish"},{"key":"lb","name":"Luxembourgish"},{"key":"ky","name":"Kyrgyz"},{"key":"lo","name":"Lao"},{"key":"ka","name":"Georgian"},{"key":"mi","name":"Maori"},{"key":"ko","name":"Korean"},{"key":"lt","name":"Lithuanian"},{"key":"mn","name":"Mongolian"},{"key":"ml","name":"Malayalam"},{"key":"mk","name":"Macedonian"},{"key":"ms-my","name":"Malay"},{"key":"ms","name":"Malay"},{"key":"mt","name":"Maltese (Malta)"},{"key":"nb","name":"Norwegian Bokmål"},{"key":"nl-be","name":"Dutch (Belgium)"},{"key":"ja","name":"Japanese"},{"key":"ne","name":"Nepalese"},{"key":"me","name":"Montenegrin"},{"key":"nl","name":"Dutch"},{"key":"oc-lnc","name":"Occitan, lengadocian dialecte"},{"key":"pl","name":"Polish"},{"key":"mr","name":"Marathi"},{"key":"lv","name":"Latvian"},{"key":"rw","name":"Kinyarwanda (Rwanda)"},{"key":"pa-in","name":"Punjabi (India)"},{"key":"pt","name":"Portuguese"},{"key":"ro","name":"Romanian"},{"key":"nn","name":"Nynorsk"},{"key":"ru","name":"Russian"},{"key":"sd","name":"Sindhi"},{"key":"se","name":"Northern Sami"},{"key":"sl","name":"Slovenian"},{"key":"sq","name":"Albanian"},{"key":"my","name":"Burmese"},{"key":"rn","name":"Kirundi"},{"key":"sk","name":"Slovak"},{"key":"sr","name":"Serbian"},{"key":"ss","name":"siSwati"},{"key":"si","name":"Sinhalese"},{"key":"sv-fi","name":"Finland Swedish"},{"key":"sw","name":"Swahili"},{"key":"sv","name":"Swedish"},{"key":"ta","name":"Tamil"},{"key":"te","name":"Telugu"},{"key":"tet","name":"Tetun Dili (East Timor)"},{"key":"th","name":"Thai"},{"key":"tg","name":"Tajik"},{"key":"tlh","name":"Klingon"},{"key":"pt-br","name":"Portuguese (Brazil)"},{"key":"tzm-latn","name":"Central Atlas Tamazight Latin"},{"key":"tl-ph","name":"Tagalog (Philippines)"},{"key":"tzm","name":"Central Atlas Tamazight"},{"key":"sr-cyrl","name":"Serbian Cyrillic"},{"key":"tr","name":"Turkish"},{"key":"ug-cn","name":"Uyghur (China)"},{"key":"uz","name":"Uzbek"},{"key":"uz-latn","name":"Uzbek Latin"},{"key":"ur","name":"Urdu"},{"key":"yo","name":"Yoruba Nigeria"},{"key":"x-pseudo","name":"Pseudo"},{"key":"zh-cn","name":"Chinese (China)"},{"key":"zh-hk","name":"Chinese (Hong Kong)"},{"key":"zh-tw","name":"Chinese (Taiwan)"},{"key":"zh","name":"Chinese"},{"key":"vi","name":"Vietnamese"},{"key":"uk","name":"Ukrainian"},{"key":"tk","name":"Turkmen"},{"key":"tzl","name":"Talossan"}] \ No newline at end of file diff --git a/locale/af.js b/locale/af.js new file mode 100644 index 000000000..62c75e4e9 --- /dev/null +++ b/locale/af.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_af=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(e),t={name:"af",weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),weekStart:1,weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"}};return n.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/am.js b/locale/am.js new file mode 100644 index 000000000..7b588a88a --- /dev/null +++ b/locale/am.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_am=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"am",weekdays:"እሑድ_ሰኞ_ማክሰኞ_ረቡዕ_ሐሙስ_አርብ_ቅዳሜ".split("_"),weekdaysShort:"እሑድ_ሰኞ_ማክሰ_ረቡዕ_ሐሙስ_አርብ_ቅዳሜ".split("_"),weekdaysMin:"እሑ_ሰኞ_ማክ_ረቡ_ሐሙ_አር_ቅዳ".split("_"),months:"ጃንዋሪ_ፌብሯሪ_ማርች_ኤፕሪል_ሜይ_ጁን_ጁላይ_ኦገስት_ሴፕቴምበር_ኦክቶበር_ኖቬምበር_ዲሴምበር".split("_"),monthsShort:"ጃንዋ_ፌብሯ_ማርች_ኤፕሪ_ሜይ_ጁን_ጁላይ_ኦገስ_ሴፕቴ_ኦክቶ_ኖቬም_ዲሴም".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"በ%s",past:"%s በፊት",s:"ጥቂት ሰከንዶች",m:"አንድ ደቂቃ",mm:"%d ደቂቃዎች",h:"አንድ ሰዓት",hh:"%d ሰዓታት",d:"አንድ ቀን",dd:"%d ቀናት",M:"አንድ ወር",MM:"%d ወራት",y:"አንድ ዓመት",yy:"%d ዓመታት"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM D ፣ YYYY",LLL:"MMMM D ፣ YYYY HH:mm",LLLL:"dddd ፣ MMMM D ፣ YYYY HH:mm"},ordinal:function(e){return e+"ኛ"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/ar-dz.js b/locale/ar-dz.js new file mode 100644 index 000000000..552279051 --- /dev/null +++ b/locale/ar-dz.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ar_dz=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"ar-dz",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdaysMin:"أح_إث_ثلا_أر_خم_جم_سب".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiem:function(_){return _>12?"م":"ص"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/ar-iq.js b/locale/ar-iq.js new file mode 100644 index 000000000..07e8c71ca --- /dev/null +++ b/locale/ar-iq.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ar_iq=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"ar-iq",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),months:"كانون الثاني_شباط_آذار_نيسان_أيار_حزيران_تموز_آب_أيلول_تشرين الأول_ تشرين الثاني_كانون الأول".split("_"),weekStart:1,weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),monthsShort:"كانون الثاني_شباط_آذار_نيسان_أيار_حزيران_تموز_آب_أيلول_تشرين الأول_ تشرين الثاني_كانون الأول".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiem:function(e){return e>12?"م":"ص"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/ar-kw.js b/locale/ar-kw.js new file mode 100644 index 000000000..a876ca06c --- /dev/null +++ b/locale/ar-kw.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ar_kw=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"ar-kw",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiem:function(_){return _>12?"م":"ص"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/ar-ly.js b/locale/ar-ly.js new file mode 100644 index 000000000..9dbe09bf2 --- /dev/null +++ b/locale/ar-ly.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ar_ly=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),n={name:"ar-ly",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekStart:6,weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),ordinal:function(_){return _},meridiem:function(_){return _>12?"م":"ص"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"}};return t.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/locale/ar-ma.js b/locale/ar-ma.js new file mode 100644 index 000000000..dbb77cc9a --- /dev/null +++ b/locale/ar-ma.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ar_ma=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"ar-ma",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekStart:6,weekdaysShort:"احد_إثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiem:function(e){return e>12?"م":"ص"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/ar-sa.js b/locale/ar-sa.js new file mode 100644 index 000000000..9c2c0d4e3 --- /dev/null +++ b/locale/ar-sa.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ar_sa=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"ar-sa",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiem:function(_){return _>12?"م":"ص"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/ar-tn.js b/locale/ar-tn.js new file mode 100644 index 000000000..944b46d0e --- /dev/null +++ b/locale/ar-tn.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ar_tn=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"ar-tn",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekStart:1,weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiem:function(e){return e>12?"م":"ص"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/ar.js b/locale/ar.js new file mode 100644 index 000000000..517c49e25 --- /dev/null +++ b/locale/ar.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ar=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r="يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),d={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},_={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},o={name:"ar",weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),months:r,monthsShort:r,weekStart:6,meridiem:function(e){return e>12?"م":"ص"},relativeTime:{future:"بعد %s",past:"منذ %s",s:"ثانية واحدة",m:"دقيقة واحدة",mm:"%d دقائق",h:"ساعة واحدة",hh:"%d ساعات",d:"يوم واحد",dd:"%d أيام",M:"شهر واحد",MM:"%d أشهر",y:"عام واحد",yy:"%d أعوام"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return _[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return d[e]})).replace(/,/g,"،")},ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"}};return n.default.locale(o,null,!0),o})); \ No newline at end of file diff --git a/locale/az.js b/locale/az.js new file mode 100644 index 000000000..d63ed1f23 --- /dev/null +++ b/locale/az.js @@ -0,0 +1 @@ +!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_az=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var _=e(a),t={name:"az",weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},ordinal:function(a){return a}};return _.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/be.js b/locale/be.js new file mode 100644 index 000000000..704a87de0 --- /dev/null +++ b/locale/be.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_be=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),n={name:"be",weekdays:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),months:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),weekStart:1,weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"}};return t.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/locale/bg.js b/locale/bg.js new file mode 100644 index 000000000..89ddeffe3 --- /dev/null +++ b/locale/bg.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_bg=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"bg",weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekStart:1,ordinal:function(e){var _=e%100;if(_>10&&_<20)return e+"-ти";var t=e%10;return 1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/bi.js b/locale/bi.js new file mode 100644 index 000000000..e457dff66 --- /dev/null +++ b/locale/bi.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_bi=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(e),_={name:"bi",weekdays:"Sande_Mande_Tusde_Wenesde_Tosde_Fraede_Sarade".split("_"),months:"Januari_Februari_Maj_Eprel_Mei_Jun_Julae_Okis_Septemba_Oktoba_Novemba_Disemba".split("_"),weekStart:1,weekdaysShort:"San_Man_Tus_Wen_Tos_Frae_Sar".split("_"),monthsShort:"Jan_Feb_Maj_Epr_Mai_Jun_Jul_Oki_Sep_Okt_Nov_Dis".split("_"),weekdaysMin:"San_Ma_Tu_We_To_Fr_Sar".split("_"),ordinal:function(e){return e},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},relativeTime:{future:"lo %s",past:"%s bifo",s:"sam seken",m:"wan minit",mm:"%d minit",h:"wan haoa",hh:"%d haoa",d:"wan dei",dd:"%d dei",M:"wan manis",MM:"%d manis",y:"wan yia",yy:"%d yia"}};return n.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/bm.js b/locale/bm.js new file mode 100644 index 000000000..3c4fbdd28 --- /dev/null +++ b/locale/bm.js @@ -0,0 +1 @@ +!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_bm=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var l=e(a),t={name:"bm",weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),weekStart:1,weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"}};return l.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/bn-bd.js b/locale/bn-bd.js new file mode 100644 index 000000000..ae76f9f05 --- /dev/null +++ b/locale/bn-bd.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_bn_bd=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=t(e),n={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},d={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},r={name:"bn-bd",weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),weekStart:0,preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return d[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return n[e]}))},ordinal:function(e){var t=["ই","লা","রা","ঠা","শে"],_=e%100;return"["+e+(t[(_-20)%10]||t[_]||t[0])+"]"},formats:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY খ্রিস্টাব্দ",LL:"D MMMM YYYY খ্রিস্টাব্দ",LLL:"D MMMM YYYY খ্রিস্টাব্দ, A h:mm সময়",LLLL:"dddd, D MMMM YYYY খ্রিস্টাব্দ, A h:mm সময়"},meridiem:function(e){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"}};return _.default.locale(r,null,!0),r})); \ No newline at end of file diff --git a/locale/bn.js b/locale/bn.js new file mode 100644 index 000000000..30ffa0287 --- /dev/null +++ b/locale/bn.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_bn=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),n={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},d={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},o={name:"bn",weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdaysMin:"রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি".split("_"),preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return d[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return n[e]}))},ordinal:function(e){return e},formats:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"}};return t.default.locale(o,null,!0),o})); \ No newline at end of file diff --git a/locale/bo.js b/locale/bo.js new file mode 100644 index 000000000..92bb7cc0c --- /dev/null +++ b/locale/bo.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_bo=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"bo",weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་དང་པོ_ཟླ་གཉིས་པ_ཟླ་གསུམ་པ_ཟླ་བཞི་པ_ཟླ་ལྔ་པ_ཟླ་དྲུག་པ_ཟླ་བདུན་པ_ཟླ་བརྒྱད་པ_ཟླ་དགུ་པ_ཟླ་བཅུ་པ_ཟླ་བཅུ་གཅིག་པ_ཟླ་བཅུ་གཉིས་པ".split("_"),ordinal:function(_){return _},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},relativeTime:{future:"%s ལ་",past:"%s སྔོན་ལ་",s:"ཏོག་ཙམ་",m:"སྐར་མ་གཅིག་",mm:"སྐར་མ་ %d",h:"ཆུ་ཚོད་གཅིག་",hh:"ཆུ་ཚོད་ %d",d:"ཉིན་གཅིག་",dd:"ཉིན་ %d",M:"ཟླ་བ་གཅིག་",MM:"ཟླ་བ་ %d",y:"ལོ་གཅིག་",yy:"ལོ་ %d"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/br.js b/locale/br.js new file mode 100644 index 000000000..0b2317faa --- /dev/null +++ b/locale/br.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_br=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=n(e);function r(e){return e>9?r(e%10):e}function t(e,n,u){return e+" "+function(e,n){return 2===n?function(e){return{m:"v",b:"v",d:"z"}[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[u],e)}var o={name:"br",weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),weekStart:1,weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:function(e){switch(r(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},meridiem:function(e){return e<12?"a.m.":"g.m."}};return u.default.locale(o,null,!0),o})); \ No newline at end of file diff --git a/locale/bs.js b/locale/bs.js new file mode 100644 index 000000000..25dcd6d5a --- /dev/null +++ b/locale/bs.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_bs=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=t(e),a={name:"bs",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),weekStart:1,weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),ordinal:function(e){return e},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"}};return _.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/locale/ca.js b/locale/ca.js new file mode 100644 index 000000000..1614cc20f --- /dev/null +++ b/locale/ca.js @@ -0,0 +1 @@ +!function(e,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],s):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ca=s(e.dayjs)}(this,(function(e){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=s(e),_={name:"ca",weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),months:"Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Març_Abr._Maig_Juny_Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",ll:"D MMM YYYY",lll:"D MMM YYYY, H:mm",llll:"ddd D MMM YYYY, H:mm"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(e){return""+e+(1===e||3===e?"r":2===e?"n":4===e?"t":"è")}};return t.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/cs.js b/locale/cs.js new file mode 100644 index 000000000..43bddb9bb --- /dev/null +++ b/locale/cs.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_cs=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e);function s(e){return e>1&&e<5&&1!=~~(e/10)}function r(e,n,t,r){var d=e+" ";switch(t){case"s":return n||r?"pár sekund":"pár sekundami";case"m":return n?"minuta":r?"minutu":"minutou";case"mm":return n||r?d+(s(e)?"minuty":"minut"):d+"minutami";case"h":return n?"hodina":r?"hodinu":"hodinou";case"hh":return n||r?d+(s(e)?"hodiny":"hodin"):d+"hodinami";case"d":return n||r?"den":"dnem";case"dd":return n||r?d+(s(e)?"dny":"dní"):d+"dny";case"M":return n||r?"měsíc":"měsícem";case"MM":return n||r?d+(s(e)?"měsíce":"měsíců"):d+"měsíci";case"y":return n||r?"rok":"rokem";case"yy":return n||r?d+(s(e)?"roky":"let"):d+"lety"}}var d={name:"cs",weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),months:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),monthsShort:"led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},relativeTime:{future:"za %s",past:"před %s",s:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/cv.js b/locale/cv.js new file mode 100644 index 000000000..a30efe0ca --- /dev/null +++ b/locale/cv.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_cv=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),n={name:"cv",weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),weekStart:1,weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"}};return t.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/locale/cy.js b/locale/cy.js new file mode 100644 index 000000000..ee1910f5b --- /dev/null +++ b/locale/cy.js @@ -0,0 +1 @@ +!function(d,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(d="undefined"!=typeof globalThis?globalThis:d||self).dayjs_locale_cy=e(d.dayjs)}(this,(function(d){"use strict";function e(d){return d&&"object"==typeof d&&"default"in d?d:{default:d}}var _=e(d),a={name:"cy",weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),weekStart:1,weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),ordinal:function(d){return d},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"}};return _.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/locale/da.js b/locale/da.js new file mode 100644 index 000000000..f196072b2 --- /dev/null +++ b/locale/da.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_da=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=t(e),a={name:"da",weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn._man._tirs._ons._tors._fre._lør.".split("_"),weekdaysMin:"sø._ma._ti._on._to._fr._lø.".split("_"),months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj_juni_juli_aug._sept._okt._nov._dec.".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"}};return d.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/locale/de-at.js b/locale/de-at.js new file mode 100644 index 000000000..ca51ef518 --- /dev/null +++ b/locale/de-at.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_de_at=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e),i={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function a(e,n,t){var a=i[t];return Array.isArray(a)&&(a=a[n?0:1]),a.replace("%d",e)}var r={name:"de-at",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),ordinal:function(e){return e+"."},weekStart:1,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a}};return t.default.locale(r,null,!0),r})); \ No newline at end of file diff --git a/locale/de-ch.js b/locale/de-ch.js new file mode 100644 index 000000000..3fef2182d --- /dev/null +++ b/locale/de-ch.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_de_ch=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e),a={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function i(e,n,t){var i=a[t];return Array.isArray(i)&&(i=i[n?0:1]),i.replace("%d",e)}var r={name:"de-ch",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),ordinal:function(e){return e+"."},weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i}};return t.default.locale(r,null,!0),r})); \ No newline at end of file diff --git a/locale/de.js b/locale/de.js new file mode 100644 index 000000000..35f05ecb8 --- /dev/null +++ b/locale/de.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_de=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e),a={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function i(e,n,t){var i=a[t];return Array.isArray(i)&&(i=i[n?0:1]),i.replace("%d",e)}var r={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i}};return t.default.locale(r,null,!0),r})); \ No newline at end of file diff --git a/locale/dv.js b/locale/dv.js new file mode 100644 index 000000000..b0bd8f9bd --- /dev/null +++ b/locale/dv.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_dv=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"dv",weekdays:"އާދިއްތަ_ހޯމަ_އަންގާރަ_ބުދަ_ބުރާސްފަތި_ހުކުރު_ހޮނިހިރު".split("_"),months:"ޖެނުއަރީ_ފެބްރުއަރީ_މާރިޗު_އޭޕްރީލު_މޭ_ޖޫން_ޖުލައި_އޯގަސްޓު_ސެޕްޓެމްބަރު_އޮކްޓޯބަރު_ނޮވެމްބަރު_ޑިސެމްބަރު".split("_"),weekStart:7,weekdaysShort:"އާދިއްތަ_ހޯމަ_އަންގާރަ_ބުދަ_ބުރާސްފަތި_ހުކުރު_ހޮނިހިރު".split("_"),monthsShort:"ޖެނުއަރީ_ފެބްރުއަރީ_މާރިޗު_އޭޕްރީލު_މޭ_ޖޫން_ޖުލައި_އޯގަސްޓު_ސެޕްޓެމްބަރު_އޮކްޓޯބަރު_ނޮވެމްބަރު_ޑިސެމްބަރު".split("_"),weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/el.js b/locale/el.js new file mode 100644 index 000000000..148803423 --- /dev/null +++ b/locale/el.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_el=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"el",weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),months:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαι_Ιουν_Ιουλ_Αυγ_Σεπτ_Οκτ_Νοε_Δεκ".split("_"),ordinal:function(e){return e},weekStart:1,relativeTime:{future:"σε %s",past:"πριν %s",s:"μερικά δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένα μήνα",MM:"%d μήνες",y:"ένα χρόνο",yy:"%d χρόνια"},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/en-au.js b/locale/en-au.js new file mode 100644 index 000000000..b952cdbf3 --- /dev/null +++ b/locale/en-au.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_au=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),_={name:"en-au",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekStart:1,weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}};return t.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/en-ca.js b/locale/en-ca.js new file mode 100644 index 000000000..bf766214a --- /dev/null +++ b/locale/en-ca.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_ca=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=a(e),t={name:"en-ca",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}};return _.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/en-gb.js b/locale/en-gb.js new file mode 100644 index 000000000..7fc7c3f50 --- /dev/null +++ b/locale/en-gb.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_gb=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),_={name:"en-gb",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var a=["th","st","nd","rd"],t=e%100;return"["+e+(a[(t-20)%10]||a[t]||a[0])+"]"}};return t.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/en-ie.js b/locale/en-ie.js new file mode 100644 index 000000000..b0ad3f900 --- /dev/null +++ b/locale/en-ie.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_ie=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),_={name:"en-ie",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekStart:1,weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}};return t.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/en-il.js b/locale/en-il.js new file mode 100644 index 000000000..d8bea62d3 --- /dev/null +++ b/locale/en-il.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_il=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=a(e),t={name:"en-il",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}};return _.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/en-in.js b/locale/en-in.js new file mode 100644 index 000000000..af8cff3bf --- /dev/null +++ b/locale/en-in.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_in=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),n={name:"en-in",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var a=["th","st","nd","rd"],t=e%100;return"["+e+(a[(t-20)%10]||a[t]||a[0])+"]"}};return t.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/locale/en-nz.js b/locale/en-nz.js new file mode 100644 index 000000000..058abbe7c --- /dev/null +++ b/locale/en-nz.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_nz=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),n={name:"en-nz",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekStart:1,weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ordinal:function(e){var a=["th","st","nd","rd"],t=e%100;return"["+e+(a[(t-20)%10]||a[t]||a[0])+"]"},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}};return t.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/locale/en-sg.js b/locale/en-sg.js new file mode 100644 index 000000000..787fa847d --- /dev/null +++ b/locale/en-sg.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_sg=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),_={name:"en-sg",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),weekStart:1,weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}};return t.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/en-tt.js b/locale/en-tt.js new file mode 100644 index 000000000..afc4d3617 --- /dev/null +++ b/locale/en-tt.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en_tt=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),_={name:"en-tt",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekStart:1,yearStart:4,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(e){var t=["th","st","nd","rd"],a=e%100;return"["+e+(t[(a-20)%10]||t[a]||t[0])+"]"}};return a.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/en.js b/locale/en.js new file mode 100644 index 000000000..847cbfdac --- /dev/null +++ b/locale/en.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_en=n()}(this,(function(){"use strict";return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var n=["th","st","nd","rd"],t=e%100;return"["+e+(n[(t-20)%10]||n[t]||n[0])+"]"}}})); \ No newline at end of file diff --git a/locale/eo.js b/locale/eo.js new file mode 100644 index 000000000..2dcbe0146 --- /dev/null +++ b/locale/eo.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_eo=o(e.dayjs)}(this,(function(e){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(e),t={name:"eo",weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),weekStart:1,weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-a de] MMMM, YYYY",LLL:"D[-a de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-a de] MMMM, YYYY HH:mm"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"}};return a.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/es-do.js b/locale/es-do.js new file mode 100644 index 000000000..07907ad12 --- /dev/null +++ b/locale/es-do.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_es_do=o(e.dayjs)}(this,(function(e){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),d={name:"es-do",weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekStart:1,relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(e){return e+"º"},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"}};return s.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/es-mx.js b/locale/es-mx.js new file mode 100644 index 000000000..f865a2d15 --- /dev/null +++ b/locale/es-mx.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_es_mx=o(e.dayjs)}(this,(function(e){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),d={name:"es-mx",weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(e){return e+"º"},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"}};return s.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/es-pr.js b/locale/es-pr.js new file mode 100644 index 000000000..56fdeb45d --- /dev/null +++ b/locale/es-pr.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_es_pr=o(e.dayjs)}(this,(function(e){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),d={name:"es-pr",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(e){return e+"º"}};return s.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/es-us.js b/locale/es-us.js new file mode 100644 index 000000000..35f55353e --- /dev/null +++ b/locale/es-us.js @@ -0,0 +1 @@ +!function(e,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],s):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_es_us=s(e.dayjs)}(this,(function(e){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=s(e),d={name:"es-us",weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(e){return e+"º"},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"}};return o.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/es.js b/locale/es.js new file mode 100644 index 000000000..eb33b8107 --- /dev/null +++ b/locale/es.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_es=o(e.dayjs)}(this,(function(e){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),d={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(e){return e+"º"}};return s.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/et.js b/locale/et.js new file mode 100644 index 000000000..4158d1389 --- /dev/null +++ b/locale/et.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_et=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e);function u(e,a,t,u){var s={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:["%d minuti","%d minutit"],h:["ühe tunni","tund aega","üks tund"],hh:["%d tunni","%d tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:["%d kuu","%d kuud"],y:["ühe aasta","aasta","üks aasta"],yy:["%d aasta","%d aastat"]};return a?(s[t][2]?s[t][2]:s[t][1]).replace("%d",e):(u?s[t][0]:s[t][1]).replace("%d",e)}var s={name:"et",weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"%s pärast",past:"%s tagasi",s:u,m:u,mm:u,h:u,hh:u,d:u,dd:"%d päeva",M:u,MM:u,y:u,yy:u},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"}};return t.default.locale(s,null,!0),s})); \ No newline at end of file diff --git a/locale/eu.js b/locale/eu.js new file mode 100644 index 000000000..ed8e2284e --- /dev/null +++ b/locale/eu.js @@ -0,0 +1 @@ +!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_eu=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var t=e(a),l={name:"eu",weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),weekStart:1,weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"}};return t.default.locale(l,null,!0),l})); \ No newline at end of file diff --git a/locale/fa.js b/locale/fa.js new file mode 100644 index 000000000..648bb4eb9 --- /dev/null +++ b/locale/fa.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_fa=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"fa",weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekStart:6,months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/fi.js b/locale/fi.js new file mode 100644 index 000000000..2681ebd19 --- /dev/null +++ b/locale/fi.js @@ -0,0 +1 @@ +!function(u,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(u="undefined"!=typeof globalThis?globalThis:u||self).dayjs_locale_fi=e(u.dayjs)}(this,(function(u){"use strict";function e(u){return u&&"object"==typeof u&&"default"in u?u:{default:u}}var t=e(u);function n(u,e,t,n){var i={s:"muutama sekunti",m:"minuutti",mm:"%d minuuttia",h:"tunti",hh:"%d tuntia",d:"päivä",dd:"%d päivää",M:"kuukausi",MM:"%d kuukautta",y:"vuosi",yy:"%d vuotta",numbers:"nolla_yksi_kaksi_kolme_neljä_viisi_kuusi_seitsemän_kahdeksan_yhdeksän".split("_")},a={s:"muutaman sekunnin",m:"minuutin",mm:"%d minuutin",h:"tunnin",hh:"%d tunnin",d:"päivän",dd:"%d päivän",M:"kuukauden",MM:"%d kuukauden",y:"vuoden",yy:"%d vuoden",numbers:"nollan_yhden_kahden_kolmen_neljän_viiden_kuuden_seitsemän_kahdeksan_yhdeksän".split("_")},s=n&&!e?a:i,_=s[t];return u<10?_.replace("%d",s.numbers[u]):_.replace("%d",u)}var i={name:"fi",weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),ordinal:function(u){return u+"."},weekStart:1,yearStart:4,relativeTime:{future:"%s päästä",past:"%s sitten",s:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM[ta] YYYY",LLL:"D. MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, D. MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"D. MMM YYYY",lll:"D. MMM YYYY, [klo] HH.mm",llll:"ddd, D. MMM YYYY, [klo] HH.mm"}};return t.default.locale(i,null,!0),i})); \ No newline at end of file diff --git a/locale/fo.js b/locale/fo.js new file mode 100644 index 000000000..ff6f8d8b9 --- /dev/null +++ b/locale/fo.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_fo=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),r={name:"fo",weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),weekStart:1,weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"}};return a.default.locale(r,null,!0),r})); \ No newline at end of file diff --git a/locale/fr-ca.js b/locale/fr-ca.js new file mode 100644 index 000000000..9cc0d037d --- /dev/null +++ b/locale/fr-ca.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_fr_ca=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(e),_={name:"fr-ca",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"}};return i.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/fr-ch.js b/locale/fr-ch.js new file mode 100644 index 000000000..1308de996 --- /dev/null +++ b/locale/fr-ch.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_fr_ch=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(e),_={name:"fr-ch",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),weekStart:1,weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"}};return i.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/fr.js b/locale/fr.js new file mode 100644 index 000000000..8c42be4be --- /dev/null +++ b/locale/fr.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_fr=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e),i={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(e){return""+e+(1===e?"er":"")}};return t.default.locale(i,null,!0),i})); \ No newline at end of file diff --git a/locale/fy.js b/locale/fy.js new file mode 100644 index 000000000..291dd5f54 --- /dev/null +++ b/locale/fy.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_fy=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(e),t={name:"fy",weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:"jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),weekStart:1,weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"}};return i.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/ga.js b/locale/ga.js new file mode 100644 index 000000000..0b2489f4a --- /dev/null +++ b/locale/ga.js @@ -0,0 +1 @@ +!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_ga=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var i=e(a),n={name:"ga",weekdays:"Dé Domhnaigh_Dé Luain_Dé Máirt_Dé Céadaoin_Déardaoin_Dé hAoine_Dé Satharn".split("_"),months:"Eanáir_Feabhra_Márta_Aibreán_Bealtaine_Méitheamh_Iúil_Lúnasa_Meán Fómhair_Deaireadh Fómhair_Samhain_Nollaig".split("_"),weekStart:1,weekdaysShort:"Dom_Lua_Mái_Céa_Déa_hAo_Sat".split("_"),monthsShort:"Eaná_Feab_Márt_Aibr_Beal_Méit_Iúil_Lúna_Meán_Deai_Samh_Noll".split("_"),weekdaysMin:"Do_Lu_Má_Ce_Dé_hA_Sa".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d mí",y:"bliain",yy:"%d bliain"}};return i.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/locale/gd.js b/locale/gd.js new file mode 100644 index 000000000..c7e47ab09 --- /dev/null +++ b/locale/gd.js @@ -0,0 +1 @@ +!function(a,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],i):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_gd=i(a.dayjs)}(this,(function(a){"use strict";function i(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var n=i(a),e={name:"gd",weekdays:"Didòmhnaich_Diluain_Dimàirt_Diciadain_Diardaoin_Dihaoine_Disathairne".split("_"),months:"Am Faoilleach_An Gearran_Am Màrt_An Giblean_An Cèitean_An t-Ògmhios_An t-Iuchar_An Lùnastal_An t-Sultain_An Dàmhair_An t-Samhain_An Dùbhlachd".split("_"),weekStart:1,weekdaysShort:"Did_Dil_Dim_Dic_Dia_Dih_Dis".split("_"),monthsShort:"Faoi_Gear_Màrt_Gibl_Cèit_Ògmh_Iuch_Lùn_Sult_Dàmh_Samh_Dùbh".split("_"),weekdaysMin:"Dò_Lu_Mà_Ci_Ar_Ha_Sa".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"}};return n.default.locale(e,null,!0),e})); \ No newline at end of file diff --git a/locale/gl.js b/locale/gl.js new file mode 100644 index 000000000..f5cf48325 --- /dev/null +++ b/locale/gl.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_gl=o(e.dayjs)}(this,(function(e){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=o(e),d={name:"gl",weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),weekStart:1,weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),ordinal:function(e){return e+"º"},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"}};return s.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/gom-latn.js b/locale/gom-latn.js new file mode 100644 index 000000000..159661844 --- /dev/null +++ b/locale/gom-latn.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_gom_latn=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),_={name:"gom-latn",weekdays:"Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son'var".split("_"),months:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),weekStart:1,weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),ordinal:function(e){return e},formats:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"}};return a.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/gu.js b/locale/gu.js new file mode 100644 index 000000000..f42a17c53 --- /dev/null +++ b/locale/gu.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_gu=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"gu",weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),ordinal:function(_){return _},formats:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},relativeTime:{future:"%s મા",past:"%s પેહલા",s:"અમુક પળો",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/he.js b/locale/he.js new file mode 100644 index 000000000..3e4062e28 --- /dev/null +++ b/locale/he.js @@ -0,0 +1 @@ +!function(Y,M){"object"==typeof exports&&"undefined"!=typeof module?module.exports=M(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],M):(Y="undefined"!=typeof globalThis?globalThis:Y||self).dayjs_locale_he=M(Y.dayjs)}(this,(function(Y){"use strict";function M(Y){return Y&&"object"==typeof Y&&"default"in Y?Y:{default:Y}}var d=M(Y),e={s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:"%d שעות",hh2:"שעתיים",d:"יום",dd:"%d ימים",dd2:"יומיים",M:"חודש",MM:"%d חודשים",MM2:"חודשיים",y:"שנה",yy:"%d שנים",yy2:"שנתיים"};function _(Y,M,d){return(e[d+(2===Y?"2":"")]||e[d]).replace("%d",Y)}var l={name:"he",weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א׳_ב׳_ג׳_ד׳_ה׳_ו_ש׳".split("_"),months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו_פבר_מרץ_אפר_מאי_יונ_יול_אוג_ספט_אוק_נוב_דצמ".split("_"),relativeTime:{future:"בעוד %s",past:"לפני %s",s:_,m:_,mm:_,h:_,hh:_,d:_,dd:_,M:_,MM:_,y:_,yy:_},ordinal:function(Y){return Y},format:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"}};return d.default.locale(l,null,!0),l})); \ No newline at end of file diff --git a/locale/hi.js b/locale/hi.js new file mode 100644 index 000000000..9dca3cf50 --- /dev/null +++ b/locale/hi.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_hi=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"hi",weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),ordinal:function(_){return _},formats:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/hr.js b/locale/hr.js new file mode 100644 index 000000000..12e838731 --- /dev/null +++ b/locale/hr.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_hr=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),s="siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),n="siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_"),_=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/,o=function(e,a){return _.test(a)?s[e.month()]:n[e.month()]};o.s=n,o.f=s;var i={name:"hr",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),months:o,monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},relativeTime:{future:"za %s",past:"prije %s",s:"sekunda",m:"minuta",mm:"%d minuta",h:"sat",hh:"%d sati",d:"dan",dd:"%d dana",M:"mjesec",MM:"%d mjeseci",y:"godina",yy:"%d godine"},ordinal:function(e){return e+"."}};return t.default.locale(i,null,!0),i})); \ No newline at end of file diff --git a/locale/ht.js b/locale/ht.js new file mode 100644 index 000000000..3b2d9a3b6 --- /dev/null +++ b/locale/ht.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ht=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=n(e),a={name:"ht",weekdays:"dimanch_lendi_madi_mèkredi_jedi_vandredi_samdi".split("_"),months:"janvye_fevriye_mas_avril_me_jen_jiyè_out_septanm_oktòb_novanm_desanm".split("_"),weekdaysShort:"dim._len._mad._mèk._jed._van._sam.".split("_"),monthsShort:"jan._fev._mas_avr._me_jen_jiyè._out_sept._okt._nov._des.".split("_"),weekdaysMin:"di_le_ma_mè_je_va_sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"nan %s",past:"sa gen %s",s:"kèk segond",m:"yon minit",mm:"%d minit",h:"inèdtan",hh:"%d zè",d:"yon jou",dd:"%d jou",M:"yon mwa",MM:"%d mwa",y:"yon ane",yy:"%d ane"}};return d.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/locale/hu.js b/locale/hu.js new file mode 100644 index 000000000..e2aff042b --- /dev/null +++ b/locale/hu.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_hu=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e),r={name:"hu",weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"%s múlva",past:"%s",s:function(e,n,t,r){return"néhány másodperc"+(r||n?"":"e")},m:function(e,n,t,r){return"egy perc"+(r||n?"":"e")},mm:function(e,n,t,r){return e+" perc"+(r||n?"":"e")},h:function(e,n,t,r){return"egy "+(r||n?"óra":"órája")},hh:function(e,n,t,r){return e+" "+(r||n?"óra":"órája")},d:function(e,n,t,r){return"egy "+(r||n?"nap":"napja")},dd:function(e,n,t,r){return e+" "+(r||n?"nap":"napja")},M:function(e,n,t,r){return"egy "+(r||n?"hónap":"hónapja")},MM:function(e,n,t,r){return e+" "+(r||n?"hónap":"hónapja")},y:function(e,n,t,r){return"egy "+(r||n?"év":"éve")},yy:function(e,n,t,r){return e+" "+(r||n?"év":"éve")}},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"}};return t.default.locale(r,null,!0),r})); \ No newline at end of file diff --git a/locale/hy-am.js b/locale/hy-am.js new file mode 100644 index 000000000..44daa15ba --- /dev/null +++ b/locale/hy-am.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_hy_am=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"hy-am",weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),months:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),weekStart:1,weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/id.js b/locale/id.js new file mode 100644 index 000000000..0637a6516 --- /dev/null +++ b/locale/id.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_id=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),_={name:"id",weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),weekStart:1,formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},ordinal:function(e){return e+"."}};return t.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/index.d.ts b/locale/index.d.ts new file mode 100644 index 000000000..bd2dca2cd --- /dev/null +++ b/locale/index.d.ts @@ -0,0 +1,11 @@ +/// + +declare module 'dayjs/locale/*' { + namespace locale { + interface Locale extends ILocale {} + } + + const locale: locale.Locale + + export = locale +} diff --git a/locale/is.js b/locale/is.js new file mode 100644 index 000000000..de6799ba2 --- /dev/null +++ b/locale/is.js @@ -0,0 +1 @@ +!function(u,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],r):(u="undefined"!=typeof globalThis?globalThis:u||self).dayjs_locale_is=r(u.dayjs)}(this,(function(u){"use strict";function r(u){return u&&"object"==typeof u&&"default"in u?u:{default:u}}var n=r(u),e={s:["nokkrar sekúndur","nokkrar sekúndur","nokkrum sekúndum"],m:["mínúta","mínútu","mínútu"],mm:["mínútur","mínútur","mínútum"],h:["klukkustund","klukkustund","klukkustund"],hh:["klukkustundir","klukkustundir","klukkustundum"],d:["dagur","dag","degi"],dd:["dagar","daga","dögum"],M:["mánuður","mánuð","mánuði"],MM:["mánuðir","mánuði","mánuðum"],y:["ár","ár","ári"],yy:["ár","ár","árum"]};function t(u,r,n,t){var a=function(u,r,n,t){var a=t?0:n?1:2,d=2===u.length&&r%10==1?u[0]:u,m=e[d][a];return 1===u.length?m:"%d "+m}(n,u,t,r);return a.replace("%d",u)}var a={name:"is",weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),weekStart:1,weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),ordinal:function(u){return u},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t}};return n.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/locale/it-ch.js b/locale/it-ch.js new file mode 100644 index 000000000..7e1c92f77 --- /dev/null +++ b/locale/it-ch.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_it_ch=o(e.dayjs)}(this,(function(e){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=o(e),t={name:"it-ch",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"}};return n.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/it.js b/locale/it.js new file mode 100644 index 000000000..2ddf44b7c --- /dev/null +++ b/locale/it.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_it=o(e.dayjs)}(this,(function(e){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=o(e),n={name:"it",weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),weekStart:1,monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"tra %s",past:"%s fa",s:"qualche secondo",m:"un minuto",mm:"%d minuti",h:"un' ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(e){return e+"º"}};return t.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/locale/ja.js b/locale/ja.js new file mode 100644 index 000000000..cd52f361d --- /dev/null +++ b/locale/ja.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ja=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e){return e+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(e){return e<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/jv.js b/locale/jv.js new file mode 100644 index 000000000..756630852 --- /dev/null +++ b/locale/jv.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_jv=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e),_={name:"jv",weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),weekStart:1,weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),ordinal:function(e){return e},formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"}};return t.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/ka.js b/locale/ka.js new file mode 100644 index 000000000..7b2ce5324 --- /dev/null +++ b/locale/ka.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ka=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"ka",weekdays:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekStart:1,formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},relativeTime:{future:"%s შემდეგ",past:"%s წინ",s:"წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათის",d:"დღეს",dd:"%d დღის განმავლობაში",M:"თვის",MM:"%d თვის",y:"წელი",yy:"%d წლის"},ordinal:function(_){return _}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/kk.js b/locale/kk.js new file mode 100644 index 000000000..a2f17a338 --- /dev/null +++ b/locale/kk.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_kk=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"kk",weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekStart:1,relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/km.js b/locale/km.js new file mode 100644 index 000000000..528923e78 --- /dev/null +++ b/locale/km.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_km=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"km",weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekStart:1,weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/kn.js b/locale/kn.js new file mode 100644 index 000000000..e040ebab2 --- /dev/null +++ b/locale/kn.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_kn=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"kn",weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),ordinal:function(_){return _},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/ko.js b/locale/ko.js new file mode 100644 index 000000000..cfe8b3797 --- /dev/null +++ b/locale/ko.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ko=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=_(e),t={name:"ko",weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),ordinal:function(e){return e+"일"},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},meridiem:function(e){return e<12?"오전":"오후"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"}};return d.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/ku.js b/locale/ku.js new file mode 100644 index 000000000..cd98fc2c8 --- /dev/null +++ b/locale/ku.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("dayjs")):"function"==typeof define&&define.amd?define(["exports","dayjs"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ku={},e.dayjs)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t),d={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},o={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},u=["کانوونی دووەم","شوبات","ئادار","نیسان","ئایار","حوزەیران","تەممووز","ئاب","ئەیلوول","تشرینی یەکەم","تشرینی دووەم","کانوونی یەکەم"],i={name:"ku",months:u,monthsShort:u,weekdays:"یەکشەممە_دووشەممە_سێشەممە_چوارشەممە_پێنجشەممە_هەینی_شەممە".split("_"),weekdaysShort:"یەکشەم_دووشەم_سێشەم_چوارشەم_پێنجشەم_هەینی_شەممە".split("_"),weekStart:6,weekdaysMin:"ی_د_س_چ_پ_هـ_ش".split("_"),preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return o[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return d[e]})).replace(/,/g,"،")},ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiem:function(e){return e<12?"پ.ن":"د.ن"},relativeTime:{future:"لە %s",past:"لەمەوپێش %s",s:"چەند چرکەیەک",m:"یەک خولەک",mm:"%d خولەک",h:"یەک کاتژمێر",hh:"%d کاتژمێر",d:"یەک ڕۆژ",dd:"%d ڕۆژ",M:"یەک مانگ",MM:"%d مانگ",y:"یەک ساڵ",yy:"%d ساڵ"}};r.default.locale(i,null,!0),e.default=i,e.englishToArabicNumbersMap=d,Object.defineProperty(e,"__esModule",{value:!0})})); \ No newline at end of file diff --git a/locale/ky.js b/locale/ky.js new file mode 100644 index 000000000..1fdc40e3e --- /dev/null +++ b/locale/ky.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ky=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"ky",weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),weekStart:1,weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/lb.js b/locale/lb.js new file mode 100644 index 000000000..b6895f249 --- /dev/null +++ b/locale/lb.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_lb=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),n={name:"lb",weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),weekStart:1,weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"}};return t.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/locale/lo.js b/locale/lo.js new file mode 100644 index 000000000..1bf09d1db --- /dev/null +++ b/locale/lo.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_lo=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"lo",weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/lt.js b/locale/lt.js new file mode 100644 index 000000000..52f222583 --- /dev/null +++ b/locale/lt.js @@ -0,0 +1 @@ +!function(e,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],s):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_lt=s(e.dayjs)}(this,(function(e){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=s(e),d="sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),a="sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),l=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/,M=function(e,s){return l.test(s)?d[e.month()]:a[e.month()]};M.s=a,M.f=d;var t={name:"lt",weekdays:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),weekdaysShort:"sek_pir_ant_tre_ket_pen_šeš".split("_"),weekdaysMin:"s_p_a_t_k_pn_š".split("_"),months:M,monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"už %s",past:"prieš %s",s:"kelias sekundes",m:"minutę",mm:"%d minutes",h:"valandą",hh:"%d valandas",d:"dieną",dd:"%d dienas",M:"mėnesį",MM:"%d mėnesius",y:"metus",yy:"%d metus"},format:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"}};return i.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/lv.js b/locale/lv.js new file mode 100644 index 000000000..98fc1265a --- /dev/null +++ b/locale/lv.js @@ -0,0 +1 @@ +!function(e,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],s):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_lv=s(e.dayjs)}(this,(function(e){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=s(e),d={name:"lv",weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),weekStart:1,weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},relativeTime:{future:"pēc %s",past:"pirms %s",s:"dažām sekundēm",m:"minūtes",mm:"%d minūtēm",h:"stundas",hh:"%d stundām",d:"dienas",dd:"%d dienām",M:"mēneša",MM:"%d mēnešiem",y:"gada",yy:"%d gadiem"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/me.js b/locale/me.js new file mode 100644 index 000000000..ecb22aef8 --- /dev/null +++ b/locale/me.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_me=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=t(e),a={name:"me",weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),weekStart:1,weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),ordinal:function(e){return e},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"}};return _.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/locale/mi.js b/locale/mi.js new file mode 100644 index 000000000..1b328f07c --- /dev/null +++ b/locale/mi.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_mi=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(e),t={name:"mi",weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),weekStart:1,weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"}};return i.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/mk.js b/locale/mk.js new file mode 100644 index 000000000..0f2ece14b --- /dev/null +++ b/locale/mk.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_mk=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"mk",weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),weekStart:1,weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),ordinal:function(e){return e},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/ml.js b/locale/ml.js new file mode 100644 index 000000000..8e7db4f78 --- /dev/null +++ b/locale/ml.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ml=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"ml",weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),ordinal:function(_){return _},formats:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/mn.js b/locale/mn.js new file mode 100644 index 000000000..4de299bf5 --- /dev/null +++ b/locale/mn.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_mn=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"mn",weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},relativeTime:{future:"%s",past:"%s",s:"саяхан",m:"м",mm:"%dм",h:"1ц",hh:"%dц",d:"1ө",dd:"%dө",M:"1с",MM:"%dс",y:"1ж",yy:"%dж"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/mr.js b/locale/mr.js new file mode 100644 index 000000000..af6bb3aea --- /dev/null +++ b/locale/mr.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_mr=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),n={name:"mr",weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),ordinal:function(_){return _},formats:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"}};return t.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/locale/ms-my.js b/locale/ms-my.js new file mode 100644 index 000000000..1917d7ac2 --- /dev/null +++ b/locale/ms-my.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ms_my=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),_={name:"ms-my",weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),weekStart:1,weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),ordinal:function(e){return e},formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"}};return t.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/ms.js b/locale/ms.js new file mode 100644 index 000000000..be4f88ea2 --- /dev/null +++ b/locale/ms.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ms=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=a(e),s={name:"ms",weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekStart:1,formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH.mm",LLLL:"dddd, D MMMM YYYY HH.mm"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},ordinal:function(e){return e+"."}};return t.default.locale(s,null,!0),s})); \ No newline at end of file diff --git a/locale/mt.js b/locale/mt.js new file mode 100644 index 000000000..43d481a3d --- /dev/null +++ b/locale/mt.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_mt=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),i={name:"mt",weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),weekStart:1,weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"}};return a.default.locale(i,null,!0),i})); \ No newline at end of file diff --git a/locale/my.js b/locale/my.js new file mode 100644 index 000000000..95adead3e --- /dev/null +++ b/locale/my.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_my=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"my",weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),weekStart:1,weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/nb.js b/locale/nb.js new file mode 100644 index 000000000..ece1f317e --- /dev/null +++ b/locale/nb.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_nb=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),a={name:"nb",weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"}};return n.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/locale/ne.js b/locale/ne.js new file mode 100644 index 000000000..3d166bcc0 --- /dev/null +++ b/locale/ne.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ne=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"ne",weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मे_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),relativeTime:{future:"%s पछि",past:"%s अघि",s:"सेकेन्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"घन्टा",hh:"%d घन्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक वर्ष",yy:"%d वर्ष"},ordinal:function(e){return(""+e).replace(/\d/g,(function(e){return"०१२३४५६७८९"[e]}))},formats:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/nl-be.js b/locale/nl-be.js new file mode 100644 index 000000000..7a2f60f5b --- /dev/null +++ b/locale/nl-be.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_nl_be=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(e),d={name:"nl-be",weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),weekStart:1,weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"}};return n.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/nl.js b/locale/nl.js new file mode 100644 index 000000000..47e789f24 --- /dev/null +++ b/locale/nl.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_nl=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=a(e),n={name:"nl",weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),ordinal:function(e){return"["+e+(1===e||8===e||e>=20?"ste":"de")+"]"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"een minuut",mm:"%d minuten",h:"een uur",hh:"%d uur",d:"een dag",dd:"%d dagen",M:"een maand",MM:"%d maanden",y:"een jaar",yy:"%d jaar"}};return d.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/locale/nn.js b/locale/nn.js new file mode 100644 index 000000000..eba3c244a --- /dev/null +++ b/locale/nn.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_nn=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),a={name:"nn",weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),ordinal:function(e){return e+"."},weekStart:1,relativeTime:{future:"om %s",past:"for %s sidan",s:"nokre sekund",m:"eitt minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månadar",y:"eitt år",yy:"%d år"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"}};return n.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/locale/oc-lnc.js b/locale/oc-lnc.js new file mode 100644 index 000000000..12e162c30 --- /dev/null +++ b/locale/oc-lnc.js @@ -0,0 +1 @@ +!function(e,d){"object"==typeof exports&&"undefined"!=typeof module?module.exports=d(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],d):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_oc_lnc=d(e.dayjs)}(this,(function(e){"use strict";function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=d(e),s={name:"oc-lnc",weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"Dg_Dl_Dm_Dc_Dj_Dv_Ds".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),months:"genièr_febrièr_març_abrial_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),monthsShort:"gen_feb_març_abr_mai_junh_julh_ago_set_oct_nov_dec".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},ordinal:function(e){return e+"º"}};return n.default.locale(s,null,!0),s})); \ No newline at end of file diff --git a/locale/pa-in.js b/locale/pa-in.js new file mode 100644 index 000000000..4ee388447 --- /dev/null +++ b/locale/pa-in.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_pa_in=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"pa-in",weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),ordinal:function(_){return _},formats:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/pl.js b/locale/pl.js new file mode 100644 index 000000000..3f5148c4a --- /dev/null +++ b/locale/pl.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_pl=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e);function a(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function n(e,t,i){var n=e+" ";switch(i){case"m":return t?"minuta":"minutę";case"mm":return n+(a(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return n+(a(e)?"godziny":"godzin");case"MM":return n+(a(e)?"miesiące":"miesięcy");case"yy":return n+(a(e)?"lata":"lat")}}var r="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),_="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),s=/D MMMM/,d=function(e,t){return s.test(t)?r[e.month()]:_[e.month()]};d.s=_,d.f=r;var o={name:"pl",weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),months:d,monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),ordinal:function(e){return e+"."},weekStart:1,yearStart:4,relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:n,mm:n,h:n,hh:n,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:n,y:"rok",yy:n},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};return i.default.locale(o,null,!0),o})); \ No newline at end of file diff --git a/locale/pt-br.js b/locale/pt-br.js new file mode 100644 index 000000000..629c2f178 --- /dev/null +++ b/locale/pt-br.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_pt_br=o(e.dayjs)}(this,(function(e){"use strict";function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(e),s={name:"pt-br",weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(e){return e+"º"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"}};return a.default.locale(s,null,!0),s})); \ No newline at end of file diff --git a/locale/pt.js b/locale/pt.js new file mode 100644 index 000000000..91652e816 --- /dev/null +++ b/locale/pt.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_pt=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(e),t={name:"pt",weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sab".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sa".split("_"),months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),ordinal:function(e){return e+"º"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},relativeTime:{future:"em %s",past:"há %s",s:"alguns segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"}};return o.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/rn.js b/locale/rn.js new file mode 100644 index 000000000..a0933643f --- /dev/null +++ b/locale/rn.js @@ -0,0 +1 @@ +!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_rn=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var t=e(a),u={name:"rn",weekdays:"Ku wa Mungu_Ku wa Mbere_Ku wa Kabiri_Ku wa Gatatu_Ku wa Kane_Ku wa Gatanu_Ku wa Gatandatu".split("_"),weekdaysShort:"Kngu_Kmbr_Kbri_Ktat_Kkan_Ktan_Kdat".split("_"),weekdaysMin:"K7_K1_K2_K3_K4_K5_K6".split("_"),months:"Nzero_Ruhuhuma_Ntwarante_Ndamukiza_Rusama_Ruhenshi_Mukakaro_Myandagaro_Nyakanga_Gitugutu_Munyonyo_Kigarama".split("_"),monthsShort:"Nzer_Ruhuh_Ntwar_Ndam_Rus_Ruhen_Muk_Myand_Nyak_Git_Muny_Kig".split("_"),weekStart:1,ordinal:function(a){return a},relativeTime:{future:"mu %s",past:"%s",s:"amasegonda",m:"Umunota",mm:"%d iminota",h:"isaha",hh:"%d amasaha",d:"Umunsi",dd:"%d iminsi",M:"ukwezi",MM:"%d amezi",y:"umwaka",yy:"%d imyaka"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};return t.default.locale(u,null,!0),u})); \ No newline at end of file diff --git a/locale/ro.js b/locale/ro.js new file mode 100644 index 000000000..445af3dce --- /dev/null +++ b/locale/ro.js @@ -0,0 +1 @@ +!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],i):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ro=i(e.dayjs)}(this,(function(e){"use strict";function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=i(e),_={name:"ro",weekdays:"Duminică_Luni_Marți_Miercuri_Joi_Vineri_Sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),months:"Ianuarie_Februarie_Martie_Aprilie_Mai_Iunie_Iulie_August_Septembrie_Octombrie_Noiembrie_Decembrie".split("_"),monthsShort:"Ian._Febr._Mart._Apr._Mai_Iun._Iul._Aug._Sept._Oct._Nov._Dec.".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},relativeTime:{future:"peste %s",past:"acum %s",s:"câteva secunde",m:"un minut",mm:"%d minute",h:"o oră",hh:"%d ore",d:"o zi",dd:"%d zile",M:"o lună",MM:"%d luni",y:"un an",yy:"%d ani"},ordinal:function(e){return e}};return t.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/ru.js b/locale/ru.js new file mode 100644 index 000000000..f8967908f --- /dev/null +++ b/locale/ru.js @@ -0,0 +1 @@ +!function(_,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ru=t(_.dayjs)}(this,(function(_){"use strict";function t(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var e=t(_),n="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),s="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),r="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),o="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),i=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function d(_,t,e){var n,s;return"m"===e?t?"минута":"минуту":_+" "+(n=+_,s={mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[e].split("_"),n%10==1&&n%100!=11?s[0]:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?s[1]:s[2])}var u=function(_,t){return i.test(t)?n[_.month()]:s[_.month()]};u.s=s,u.f=n;var a=function(_,t){return i.test(t)?r[_.month()]:o[_.month()]};a.s=o,a.f=r;var m={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:u,monthsShort:a,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:d,mm:d,h:"час",hh:d,d:"день",dd:d,M:"месяц",MM:d,y:"год",yy:d},ordinal:function(_){return _},meridiem:function(_){return _<4?"ночи":_<12?"утра":_<17?"дня":"вечера"}};return e.default.locale(m,null,!0),m})); \ No newline at end of file diff --git a/locale/rw.js b/locale/rw.js new file mode 100644 index 000000000..bf4c280c2 --- /dev/null +++ b/locale/rw.js @@ -0,0 +1 @@ +!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_rw=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var u=e(a),t={name:"rw",weekdays:"Ku Cyumweru_Kuwa Mbere_Kuwa Kabiri_Kuwa Gatatu_Kuwa Kane_Kuwa Gatanu_Kuwa Gatandatu".split("_"),months:"Mutarama_Gashyantare_Werurwe_Mata_Gicurasi_Kamena_Nyakanga_Kanama_Nzeri_Ukwakira_Ugushyingo_Ukuboza".split("_"),relativeTime:{future:"mu %s",past:"%s",s:"amasegonda",m:"Umunota",mm:"%d iminota",h:"isaha",hh:"%d amasaha",d:"Umunsi",dd:"%d iminsi",M:"ukwezi",MM:"%d amezi",y:"umwaka",yy:"%d imyaka"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},ordinal:function(a){return a}};return u.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/sd.js b/locale/sd.js new file mode 100644 index 000000000..b1e1ee487 --- /dev/null +++ b/locale/sd.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_sd=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"sd",weekdays:"آچر_سومر_اڱارو_اربع_خميس_جمع_ڇنڇر".split("_"),months:"جنوري_فيبروري_مارچ_اپريل_مئي_جون_جولاءِ_آگسٽ_سيپٽمبر_آڪٽوبر_نومبر_ڊسمبر".split("_"),weekStart:1,weekdaysShort:"آچر_سومر_اڱارو_اربع_خميس_جمع_ڇنڇر".split("_"),monthsShort:"جنوري_فيبروري_مارچ_اپريل_مئي_جون_جولاءِ_آگسٽ_سيپٽمبر_آڪٽوبر_نومبر_ڊسمبر".split("_"),weekdaysMin:"آچر_سومر_اڱارو_اربع_خميس_جمع_ڇنڇر".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/se.js b/locale/se.js new file mode 100644 index 000000000..2cbb22462 --- /dev/null +++ b/locale/se.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_se=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(e),t={name:"se",weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),weekStart:1,weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"}};return n.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/si.js b/locale/si.js new file mode 100644 index 000000000..216ae8a88 --- /dev/null +++ b/locale/si.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_si=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"si",weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),months:"දුරුතු_නවම්_මැදින්_බක්_වෙසක්_පොසොන්_ඇසළ_නිකිණි_බිනර_වප්_ඉල්_උඳුවප්".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),monthsShort:"දුරු_නව_මැදි_බක්_වෙස_පොසො_ඇස_නිකි_බින_වප්_ඉල්_උඳු".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),ordinal:function(_){return _},formats:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",m:"විනාඩිය",mm:"විනාඩි %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/sk.js b/locale/sk.js new file mode 100644 index 000000000..b2707e323 --- /dev/null +++ b/locale/sk.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sk=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e){return e>1&&e<5&&1!=~~(e/10)}function o(e,t,n,o){var a=e+" ";switch(n){case"s":return t||o?"pár sekúnd":"pár sekundami";case"m":return t?"minúta":o?"minútu":"minútou";case"mm":return t||o?a+(r(e)?"minúty":"minút"):a+"minútami";case"h":return t?"hodina":o?"hodinu":"hodinou";case"hh":return t||o?a+(r(e)?"hodiny":"hodín"):a+"hodinami";case"d":return t||o?"deň":"dňom";case"dd":return t||o?a+(r(e)?"dni":"dní"):a+"dňami";case"M":return t||o?"mesiac":"mesiacom";case"MM":return t||o?a+(r(e)?"mesiace":"mesiacov"):a+"mesiacmi";case"y":return t||o?"rok":"rokom";case"yy":return t||o?a+(r(e)?"roky":"rokov"):a+"rokmi"}}var a={name:"sk",weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),months:"január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),monthsShort:"jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_"),weekStart:1,yearStart:4,ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},relativeTime:{future:"za %s",past:"pred %s",s:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o}};return n.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/locale/sl.js b/locale/sl.js new file mode 100644 index 000000000..162d2ecd3 --- /dev/null +++ b/locale/sl.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sl=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e);function r(e){return e%100==2}function a(e){return e%100==3||e%100==4}function s(e,n,t,s){var m=e+" ";switch(t){case"s":return n||s?"nekaj sekund":"nekaj sekundami";case"m":return n?"ena minuta":"eno minuto";case"mm":return r(e)?m+(n||s?"minuti":"minutama"):a(e)?m+(n||s?"minute":"minutami"):m+(n||s?"minut":"minutami");case"h":return n?"ena ura":"eno uro";case"hh":return r(e)?m+(n||s?"uri":"urama"):a(e)?m+(n||s?"ure":"urami"):m+(n||s?"ur":"urami");case"d":return n||s?"en dan":"enim dnem";case"dd":return r(e)?m+(n||s?"dneva":"dnevoma"):m+(n||s?"dni":"dnevi");case"M":return n||s?"en mesec":"enim mesecem";case"MM":return r(e)?m+(n||s?"meseca":"mesecema"):a(e)?m+(n||s?"mesece":"meseci"):m+(n||s?"mesecev":"meseci");case"y":return n||s?"eno leto":"enim letom";case"yy":return r(e)?m+(n||s?"leti":"letoma"):a(e)?m+(n||s?"leta":"leti"):m+(n||s?"let":"leti")}}var m={name:"sl",weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),weekStart:1,weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm",l:"D. M. YYYY"},relativeTime:{future:"čez %s",past:"pred %s",s:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s}};return t.default.locale(m,null,!0),m})); \ No newline at end of file diff --git a/locale/sq.js b/locale/sq.js new file mode 100644 index 000000000..99bca9a27 --- /dev/null +++ b/locale/sq.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sq=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=t(e),n={name:"sq",weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),weekStart:1,weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"}};return _.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/locale/sr-cyrl.js b/locale/sr-cyrl.js new file mode 100644 index 000000000..90daeebd7 --- /dev/null +++ b/locale/sr-cyrl.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sr_cyrl=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(e),a={words:{m:["један минут","једног минута"],mm:["%d минут","%d минута","%d минута"],h:["један сат","једног сата"],hh:["%d сат","%d сата","%d сати"],d:["један дан","једног дана"],dd:["%d дан","%d дана","%d дана"],M:["један месец","једног месеца"],MM:["%d месец","%d месеца","%d месеци"],y:["једну годину","једне године"],yy:["%d годину","%d године","%d година"]},correctGrammarCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10==1?t[0]:t[1]:t[2]},relativeTimeFormatter:function(e,t,r,d){var i=a.words[r];if(1===r.length)return"y"===r&&t?"једна година":d||t?i[0]:i[1];var m=a.correctGrammarCase(e,i);return"yy"===r&&t&&"%d годину"===m?e+" година":m.replace("%d",e)}},d={name:"sr-cyrl",weekdays:"Недеља_Понедељак_Уторак_Среда_Четвртак_Петак_Субота".split("_"),weekdaysShort:"Нед._Пон._Уто._Сре._Чет._Пет._Суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),months:"Јануар_Фебруар_Март_Април_Мај_Јун_Јул_Август_Септембар_Октобар_Новембар_Децембар".split("_"),monthsShort:"Јан._Феб._Мар._Апр._Мај_Јун_Јул_Авг._Сеп._Окт._Нов._Дец.".split("_"),weekStart:1,relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:a.relativeTimeFormatter,mm:a.relativeTimeFormatter,h:a.relativeTimeFormatter,hh:a.relativeTimeFormatter,d:a.relativeTimeFormatter,dd:a.relativeTimeFormatter,M:a.relativeTimeFormatter,MM:a.relativeTimeFormatter,y:a.relativeTimeFormatter,yy:a.relativeTimeFormatter},ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"}};return r.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/sr.js b/locale/sr.js new file mode 100644 index 000000000..35a5b55e5 --- /dev/null +++ b/locale/sr.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sr=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),r={words:{m:["jedan minut","jednog minuta"],mm:["%d minut","%d minuta","%d minuta"],h:["jedan sat","jednog sata"],hh:["%d sat","%d sata","%d sati"],d:["jedan dan","jednog dana"],dd:["%d dan","%d dana","%d dana"],M:["jedan mesec","jednog meseca"],MM:["%d mesec","%d meseca","%d meseci"],y:["jednu godinu","jedne godine"],yy:["%d godinu","%d godine","%d godina"]},correctGrammarCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10==1?t[0]:t[1]:t[2]},relativeTimeFormatter:function(e,t,a,d){var n=r.words[a];if(1===a.length)return"y"===a&&t?"jedna godina":d||t?n[0]:n[1];var i=r.correctGrammarCase(e,n);return"yy"===a&&t&&"%d godinu"===i?e+" godina":i.replace("%d",e)}},d={name:"sr",weekdays:"Nedelja_Ponedeljak_Utorak_Sreda_Četvrtak_Petak_Subota".split("_"),weekdaysShort:"Ned._Pon._Uto._Sre._Čet._Pet._Sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),months:"Januar_Februar_Mart_April_Maj_Jun_Jul_Avgust_Septembar_Oktobar_Novembar_Decembar".split("_"),monthsShort:"Jan._Feb._Mar._Apr._Maj_Jun_Jul_Avg._Sep._Okt._Nov._Dec.".split("_"),weekStart:1,relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:r.relativeTimeFormatter,mm:r.relativeTimeFormatter,h:r.relativeTimeFormatter,hh:r.relativeTimeFormatter,d:r.relativeTimeFormatter,dd:r.relativeTimeFormatter,M:r.relativeTimeFormatter,MM:r.relativeTimeFormatter,y:r.relativeTimeFormatter,yy:r.relativeTimeFormatter},ordinal:function(e){return e+"."},formats:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"}};return a.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/ss.js b/locale/ss.js new file mode 100644 index 000000000..4df16a5b4 --- /dev/null +++ b/locale/ss.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_ss=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=n(e),i={name:"ss",weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),weekStart:1,weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),ordinal:function(e){return e},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"}};return a.default.locale(i,null,!0),i})); \ No newline at end of file diff --git a/locale/sv-fi.js b/locale/sv-fi.js new file mode 100644 index 000000000..5b2f8afb1 --- /dev/null +++ b/locale/sv-fi.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sv_fi=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),d={name:"sv-fi",weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekStart:1,yearStart:4,ordinal:function(e){var t=e%10;return"["+e+(1===t||2===t?"a":"e")+"]"},formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY, [kl.] HH.mm",LLLL:"dddd, D. MMMM YYYY, [kl.] HH.mm",l:"D.M.YYYY",ll:"D. MMM YYYY",lll:"D. MMM YYYY, [kl.] HH.mm",llll:"ddd, D. MMM YYYY, [kl.] HH.mm"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"}};return a.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/sv.js b/locale/sv.js new file mode 100644 index 000000000..16e6d3723 --- /dev/null +++ b/locale/sv.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_sv=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(e),d={name:"sv",weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekStart:1,yearStart:4,ordinal:function(e){var t=e%10;return"["+e+(1===t||2===t?"a":"e")+"]"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"}};return a.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/sw.js b/locale/sw.js new file mode 100644 index 000000000..a13bd44b3 --- /dev/null +++ b/locale/sw.js @@ -0,0 +1 @@ +!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_sw=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var i=e(a),t={name:"sw",weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekStart:1,ordinal:function(a){return a},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};return i.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/ta.js b/locale/ta.js new file mode 100644 index 000000000..406cf134b --- /dev/null +++ b/locale/ta.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ta=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"ta",weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/te.js b/locale/te.js new file mode 100644 index 000000000..c7593db9e --- /dev/null +++ b/locale/te.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_te=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"te",weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),ordinal:function(_){return _},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/tet.js b/locale/tet.js new file mode 100644 index 000000000..aec6f6827 --- /dev/null +++ b/locale/tet.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_tet=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=t(e),a={name:"tet",weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),weekStart:1,weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"iha %s",past:"%s liuba",s:"minutu balun",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"}};return u.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/locale/tg.js b/locale/tg.js new file mode 100644 index 000000000..764310301 --- /dev/null +++ b/locale/tg.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_tg=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"tg",weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),weekStart:1,weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/th.js b/locale/th.js new file mode 100644 index 000000000..185d4ebc6 --- /dev/null +++ b/locale/th.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_th=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"th",weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"},ordinal:function(_){return _+"."}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/tk.js b/locale/tk.js new file mode 100644 index 000000000..1e737b5ab --- /dev/null +++ b/locale/tk.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_tk=n(e.dayjs)}(this,(function(e){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=n(e),_={name:"tk",weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e){return e+"."}};return t.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/tl-ph.js b/locale/tl-ph.js new file mode 100644 index 000000000..885f8a9ea --- /dev/null +++ b/locale/tl-ph.js @@ -0,0 +1 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],a):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_tl_ph=a(e.dayjs)}(this,(function(e){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=a(e),t={name:"tl-ph",weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),weekStart:1,weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"}};return n.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/tlh.js b/locale/tlh.js new file mode 100644 index 000000000..03d899622 --- /dev/null +++ b/locale/tlh.js @@ -0,0 +1 @@ +!function(a,j){"object"==typeof exports&&"undefined"!=typeof module?module.exports=j(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],j):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_tlh=j(a.dayjs)}(this,(function(a){"use strict";function j(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var t=j(a),e={name:"tlh",weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),weekStart:1,weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"}};return t.default.locale(e,null,!0),e})); \ No newline at end of file diff --git a/locale/tr.js b/locale/tr.js new file mode 100644 index 000000000..9c7844a47 --- /dev/null +++ b/locale/tr.js @@ -0,0 +1 @@ +!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_tr=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var t=e(a),_={name:"tr",weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekStart:1,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(a){return a+"."}};return t.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/types.d.ts b/locale/types.d.ts new file mode 100644 index 000000000..2c24a6456 --- /dev/null +++ b/locale/types.d.ts @@ -0,0 +1,33 @@ +declare interface ILocale { + name: string + weekdays?: string[] + months?: string[] + weekStart?: number + weekdaysShort?: string[] + monthsShort?: string[] + weekdaysMin?: string[] + ordinal?: (n: number) => number | string + formats: Partial<{ + LT: string + LTS: string + L: string + LL: string + LLL: string + LLLL: string + }> + relativeTime: Partial<{ + future: string + past: string + s: string + m: string + mm: string + h: string + hh: string + d: string + dd: string + M: string + MM: string + y: string + yy: string + }> +} diff --git a/locale/tzl.js b/locale/tzl.js new file mode 100644 index 000000000..2b1d5983b --- /dev/null +++ b/locale/tzl.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_tzl=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),a={name:"tzl",weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),weekStart:1,weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),ordinal:function(e){return e},formats:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"}};return t.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/locale/tzm-latn.js b/locale/tzm-latn.js new file mode 100644 index 000000000..3f7cdd442 --- /dev/null +++ b/locale/tzm-latn.js @@ -0,0 +1 @@ +!function(a,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],s):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_tzm_latn=s(a.dayjs)}(this,(function(a){"use strict";function s(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var n=s(a),i={name:"tzm-latn",weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekStart:6,weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"}};return n.default.locale(i,null,!0),i})); \ No newline at end of file diff --git a/locale/tzm.js b/locale/tzm.js new file mode 100644 index 000000000..e4c403160 --- /dev/null +++ b/locale/tzm.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_tzm=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"tzm",weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekStart:6,weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/ug-cn.js b/locale/ug-cn.js new file mode 100644 index 000000000..995c3b3ba --- /dev/null +++ b/locale/ug-cn.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ug_cn=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"ug-cn",weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekStart:1,weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/uk.js b/locale/uk.js new file mode 100644 index 000000000..537afb1b2 --- /dev/null +++ b/locale/uk.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_uk=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),s="січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),n="січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_"),o=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function d(_,e,t){var s,n;return"m"===t?e?"хвилина":"хвилину":"h"===t?e?"година":"годину":_+" "+(s=+_,n={ss:e?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:e?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:e?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[t].split("_"),s%10==1&&s%100!=11?n[0]:s%10>=2&&s%10<=4&&(s%100<10||s%100>=20)?n[1]:n[2])}var i=function(_,e){return o.test(e)?s[_.month()]:n[_.month()]};i.s=n,i.f=s;var r={name:"uk",weekdays:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),weekdaysShort:"ндл_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),months:i,monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekStart:1,relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:d,mm:d,h:d,hh:d,d:"день",dd:d,M:"місяць",MM:d,y:"рік",yy:d},ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"}};return t.default.locale(r,null,!0),r})); \ No newline at end of file diff --git a/locale/ur.js b/locale/ur.js new file mode 100644 index 000000000..4f83c8b83 --- /dev/null +++ b/locale/ur.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_ur=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"ur",weekdays:"اتوار_پیر_منگل_بدھ_جمعرات_جمعہ_ہفتہ".split("_"),months:"جنوری_فروری_مارچ_اپریل_مئی_جون_جولائی_اگست_ستمبر_اکتوبر_نومبر_دسمبر".split("_"),weekStart:1,weekdaysShort:"اتوار_پیر_منگل_بدھ_جمعرات_جمعہ_ہفتہ".split("_"),monthsShort:"جنوری_فروری_مارچ_اپریل_مئی_جون_جولائی_اگست_ستمبر_اکتوبر_نومبر_دسمبر".split("_"),weekdaysMin:"اتوار_پیر_منگل_بدھ_جمعرات_جمعہ_ہفتہ".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/uz-latn.js b/locale/uz-latn.js new file mode 100644 index 000000000..a8ebab49f --- /dev/null +++ b/locale/uz-latn.js @@ -0,0 +1 @@ +!function(a,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(a="undefined"!=typeof globalThis?globalThis:a||self).dayjs_locale_uz_latn=e(a.dayjs)}(this,(function(a){"use strict";function e(a){return a&&"object"==typeof a&&"default"in a?a:{default:a}}var _=e(a),n={name:"uz-latn",weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),weekStart:1,weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),ordinal:function(a){return a},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},relativeTime:{future:"Yaqin %s ichida",past:"%s oldin",s:"soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"}};return _.default.locale(n,null,!0),n})); \ No newline at end of file diff --git a/locale/uz.js b/locale/uz.js new file mode 100644 index 000000000..f6992b1ad --- /dev/null +++ b/locale/uz.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_uz=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"uz",weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),weekStart:1,weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),ordinal:function(_){return _},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},relativeTime:{future:"Якин %s ичида",past:"%s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/vi.js b/locale/vi.js new file mode 100644 index 000000000..ee3395492 --- /dev/null +++ b/locale/vi.js @@ -0,0 +1 @@ +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],n):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_locale_vi=n(t.dayjs)}(this,(function(t){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var h=n(t),_={name:"vi",weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),months:"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".split("_"),weekStart:1,weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),ordinal:function(t){return t},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"}};return h.default.locale(_,null,!0),_})); \ No newline at end of file diff --git a/locale/x-pseudo.js b/locale/x-pseudo.js new file mode 100644 index 000000000..c1215d669 --- /dev/null +++ b/locale/x-pseudo.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_x_pseudo=t(e.dayjs)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=t(e),d={name:"x-pseudo",weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),weekStart:1,weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),ordinal:function(e){return e},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"}};return _.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/yo.js b/locale/yo.js new file mode 100644 index 000000000..b12b37b7b --- /dev/null +++ b/locale/yo.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_yo=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),a={name:"yo",weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),weekStart:1,weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),ordinal:function(e){return e},formats:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"}};return t.default.locale(a,null,!0),a})); \ No newline at end of file diff --git a/locale/zh-cn.js b/locale/zh-cn.js new file mode 100644 index 000000000..21cf2281a --- /dev/null +++ b/locale/zh-cn.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_zh_cn=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,_){return"W"===_?e+"周":e+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,_){var t=100*e+_;return t<600?"凌晨":t<900?"早上":t<1100?"上午":t<1300?"中午":t<1800?"下午":"晚上"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/zh-hk.js b/locale/zh-hk.js new file mode 100644 index 000000000..dd389f988 --- /dev/null +++ b/locale/zh-hk.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_zh_hk=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var d=e(_),t={name:"zh-hk",months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),ordinal:function(_,e){return"W"===e?_+"週":_+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d 分鐘",h:"一小時",hh:"%d 小時",d:"一天",dd:"%d 天",M:"一個月",MM:"%d 個月",y:"一年",yy:"%d 年"},meridiem:function(_,e){var d=100*_+e;return d<600?"凌晨":d<900?"早上":d<1100?"上午":d<1300?"中午":d<1800?"下午":"晚上"}};return d.default.locale(t,null,!0),t})); \ No newline at end of file diff --git a/locale/zh-tw.js b/locale/zh-tw.js new file mode 100644 index 000000000..5970f17d4 --- /dev/null +++ b/locale/zh-tw.js @@ -0,0 +1 @@ +!function(_,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],e):(_="undefined"!=typeof globalThis?globalThis:_||self).dayjs_locale_zh_tw=e(_.dayjs)}(this,(function(_){"use strict";function e(_){return _&&"object"==typeof _&&"default"in _?_:{default:_}}var t=e(_),d={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(_,e){return"W"===e?_+"週":_+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(_,e){var t=100*_+e;return t<600?"凌晨":t<900?"早上":t<1100?"上午":t<1300?"中午":t<1800?"下午":"晚上"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/locale/zh.js b/locale/zh.js new file mode 100644 index 000000000..2e80015ff --- /dev/null +++ b/locale/zh.js @@ -0,0 +1 @@ +!function(e,_){"object"==typeof exports&&"undefined"!=typeof module?module.exports=_(require("dayjs")):"function"==typeof define&&define.amd?define(["dayjs"],_):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_locale_zh=_(e.dayjs)}(this,(function(e){"use strict";function _(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var t=_(e),d={name:"zh",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e,_){return"W"===_?e+"周":e+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s后",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(e,_){var t=100*e+_;return t<600?"凌晨":t<900?"早上":t<1100?"上午":t<1300?"中午":t<1800?"下午":"晚上"}};return t.default.locale(d,null,!0),d})); \ No newline at end of file diff --git a/plugin/advancedFormat.d.ts b/plugin/advancedFormat.d.ts new file mode 100644 index 000000000..30ec75e5d --- /dev/null +++ b/plugin/advancedFormat.d.ts @@ -0,0 +1,4 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin diff --git a/plugin/advancedFormat.js b/plugin/advancedFormat.js new file mode 100644 index 000000000..88d62e7c8 --- /dev/null +++ b/plugin/advancedFormat.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_advancedFormat=t()}(this,(function(){"use strict";return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),a=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return r.ordinal(t.$D);case"gggg":return t.weekYear();case"GGGG":return t.isoWeekYear();case"wo":return r.ordinal(t.week(),"W");case"w":case"ww":return s.s(t.week(),"w"===e?1:2,"0");case"W":case"WW":return s.s(t.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return s.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();case"z":return"["+t.offsetName()+"]";case"zzz":return"["+t.offsetName("long")+"]";default:return e}}));return n.bind(this)(a)}}})); \ No newline at end of file diff --git a/plugin/arraySupport.d.ts b/plugin/arraySupport.d.ts new file mode 100755 index 000000000..e4e44b2e6 --- /dev/null +++ b/plugin/arraySupport.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs' + +declare module 'dayjs' { + interface ConfigTypeMap { + arraySupport: [number?, number?, number?, number?, number?, number?, number?] + } +} + +declare const plugin: PluginFunc +export = plugin diff --git a/plugin/arraySupport.js b/plugin/arraySupport.js new file mode 100644 index 000000000..b16675fc5 --- /dev/null +++ b/plugin/arraySupport.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_arraySupport=t()}(this,(function(){"use strict";return function(e,t,n){var o=t.prototype,i=function(e){var t=e.date,o=e.utc;return Array.isArray(t)?o?t.length?new Date(Date.UTC.apply(null,t)):new Date:1===t.length?n(String(t[0])).toDate():new(Function.prototype.bind.apply(Date,[null].concat(t))):t},a=o.parse;o.parse=function(e){e.date=i.bind(this)(e),a.bind(this)(e)}}})); \ No newline at end of file diff --git a/plugin/badMutable.d.ts b/plugin/badMutable.d.ts new file mode 100644 index 000000000..30ec75e5d --- /dev/null +++ b/plugin/badMutable.d.ts @@ -0,0 +1,4 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin diff --git a/plugin/badMutable.js b/plugin/badMutable.js new file mode 100644 index 000000000..68270ccbe --- /dev/null +++ b/plugin/badMutable.js @@ -0,0 +1 @@ +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_badMutable=i()}(this,(function(){"use strict";return function(t,i){var n=i.prototype;n.$g=function(t,i,n){return this.$utils().u(t)?this[i]:this.$set(n,t)},n.set=function(t,i){return this.$set(t,i)};var e=n.startOf;n.startOf=function(t,i){return this.$d=e.bind(this)(t,i).toDate(),this.init(),this};var s=n.add;n.add=function(t,i){return this.$d=s.bind(this)(t,i).toDate(),this.init(),this};var o=n.locale;n.locale=function(t,i){return t?(this.$L=o.bind(this)(t,i).$L,this):this.$L};var r=n.daysInMonth;n.daysInMonth=function(){return r.bind(this.clone())()};var u=n.isSame;n.isSame=function(t,i){return u.bind(this.clone())(t,i)};var f=n.isBefore;n.isBefore=function(t,i){return f.bind(this.clone())(t,i)};var d=n.isAfter;n.isAfter=function(t,i){return d.bind(this.clone())(t,i)}}})); \ No newline at end of file diff --git a/plugin/bigIntSupport.d.ts b/plugin/bigIntSupport.d.ts new file mode 100644 index 000000000..d9f2f394e --- /dev/null +++ b/plugin/bigIntSupport.d.ts @@ -0,0 +1,11 @@ +import { PluginFunc } from 'dayjs' + +declare module 'dayjs' { + interface ConfigTypeMap { + bigIntSupport: BigInt + } + export function unix(t: BigInt): Dayjs +} + +declare const plugin: PluginFunc +export = plugin diff --git a/plugin/bigIntSupport.js b/plugin/bigIntSupport.js new file mode 100644 index 000000000..0c7efac69 --- /dev/null +++ b/plugin/bigIntSupport.js @@ -0,0 +1 @@ +!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_bigIntSupport=e()}(this,(function(){"use strict";var n=function(n){return"bigint"==typeof n};return function(e,t,i){var o=t.prototype,u=function(e){var t=e.date;return n(t)?Number(t):t},r=o.parse;o.parse=function(n){n.date=u.bind(this)(n),r.bind(this)(n)};var f=i.unix;i.unix=function(e){var t=n(e)?Number(e):e;return f(t)}}})); \ No newline at end of file diff --git a/plugin/buddhistEra.d.ts b/plugin/buddhistEra.d.ts new file mode 100644 index 000000000..30ec75e5d --- /dev/null +++ b/plugin/buddhistEra.d.ts @@ -0,0 +1,4 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin diff --git a/plugin/buddhistEra.js b/plugin/buddhistEra.js new file mode 100644 index 000000000..58b137c6c --- /dev/null +++ b/plugin/buddhistEra.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_buddhistEra=e()}(this,(function(){"use strict";return function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/(\[[^\]]+])|BBBB|BB/g,(function(t,n){var i,o=String(e.$y+543),f="BB"===t?[o.slice(-2),2]:[o,4];return n||(i=e.$utils()).s.apply(i,f.concat(["0"]))}));return i.bind(this)(n)}}})); \ No newline at end of file diff --git a/plugin/calendar.d.ts b/plugin/calendar.d.ts new file mode 100644 index 000000000..a8d064fd6 --- /dev/null +++ b/plugin/calendar.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc, ConfigType } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + calendar(referenceTime?: ConfigType, formats?: object): string + } +} diff --git a/plugin/calendar.js b/plugin/calendar.js new file mode 100644 index 000000000..c577098c5 --- /dev/null +++ b/plugin/calendar.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_calendar=t()}(this,(function(){"use strict";return function(e,t,a){var n="h:mm A",d={lastDay:"[Yesterday at] "+n,sameDay:"[Today at] "+n,nextDay:"[Tomorrow at] "+n,nextWeek:"dddd [at] "+n,lastWeek:"[Last] dddd [at] "+n,sameElse:"MM/DD/YYYY"};t.prototype.calendar=function(e,t){var n=t||this.$locale().calendar||d,o=a(e||void 0).startOf("d"),s=this.diff(o,"d",!0),i="sameElse",f=s<-6?i:s<-1?"lastWeek":s<0?"lastDay":s<1?"sameDay":s<2?"nextDay":s<7?"nextWeek":i,l=n[f]||d[f];return"function"==typeof l?l.call(this,a()):this.format(l)}}})); \ No newline at end of file diff --git a/plugin/customParseFormat.d.ts b/plugin/customParseFormat.d.ts new file mode 100644 index 000000000..1b41c0d8d --- /dev/null +++ b/plugin/customParseFormat.d.ts @@ -0,0 +1,8 @@ +import { PluginFunc } from 'dayjs' + +declare interface PluginOptions { + parseTwoDigitYear?: (yearString: string) => number +} + +declare const plugin: PluginFunc +export = plugin diff --git a/plugin/customParseFormat.js b/plugin/customParseFormat.js new file mode 100644 index 000000000..66d608951 --- /dev/null +++ b/plugin/customParseFormat.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d\d/,r=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(e){var t=h("months"),n=(h("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=h("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f-1)return new Date(("X"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date("")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""))}else i.call(this,e)}}})); \ No newline at end of file diff --git a/plugin/dayOfYear.d.ts b/plugin/dayOfYear.d.ts new file mode 100644 index 000000000..4fd660112 --- /dev/null +++ b/plugin/dayOfYear.d.ts @@ -0,0 +1,11 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + dayOfYear(): number + dayOfYear(value: number): Dayjs + } +} diff --git a/plugin/dayOfYear.js b/plugin/dayOfYear.js new file mode 100644 index 000000000..4a5700001 --- /dev/null +++ b/plugin/dayOfYear.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_dayOfYear=t()}(this,(function(){"use strict";return function(e,t,n){t.prototype.dayOfYear=function(e){var t=Math.round((n(this).startOf("day")-n(this).startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"day")}}})); \ No newline at end of file diff --git a/plugin/devHelper.d.ts b/plugin/devHelper.d.ts new file mode 100644 index 000000000..30ec75e5d --- /dev/null +++ b/plugin/devHelper.d.ts @@ -0,0 +1,4 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin diff --git a/plugin/devHelper.js b/plugin/devHelper.js new file mode 100644 index 000000000..a3f6daff9 --- /dev/null +++ b/plugin/devHelper.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_devHelper=t()}(this,(function(){"use strict";return function(e,t,o){if(!process||"production"!==process.env.NODE_ENV){var s=t.prototype,n=s.parse;s.parse=function(e){var t=e.date;return"string"==typeof t&&13===t.length&&console.warn("To parse a Unix timestamp like "+t+", you should pass it as a Number. https://day.js.org/docs/en/parse/unix-timestamp-milliseconds"),"number"==typeof t&&4===String(t).length&&console.warn("Guessing you may want to parse the Year "+t+", you should pass it as a String "+t+", not a Number. Otherwise, "+t+" will be treated as a Unix timestamp"),e.args.length>=2&&!o.p.customParseFormat&&console.warn("To parse a date-time string like "+t+" using the given format, you should enable customParseFormat plugin first. https://day.js.org/docs/en/parse/string-format"),n.bind(this)(e)};var a=o.locale;o.locale=function(e,t,s){return void 0===t&&"string"==typeof e&&(o.Ls[e]||console.warn("Guessing you may want to use locale "+e+", you have to load it before using it. https://day.js.org/docs/en/i18n/loading-into-nodejs")),a(e,t,s)}}}})); \ No newline at end of file diff --git a/plugin/duration.d.ts b/plugin/duration.d.ts new file mode 100644 index 000000000..9675a80b8 --- /dev/null +++ b/plugin/duration.d.ts @@ -0,0 +1,88 @@ +import { PluginFunc } from 'dayjs' +import { OpUnitType, UnitTypeLongPlural } from 'dayjs'; + +declare const plugin: PluginFunc +export as namespace plugin; +export = plugin + +declare namespace plugin { + /** + * @deprecated Please use more strict types + */ + type DurationInputType = string | number | object + /** + * @deprecated Please use more strict types + */ + type DurationAddType = number | object | Duration + + type DurationUnitsObjectType = Partial<{ + [unit in Exclude | "weeks"]: number + }>; + type DurationUnitType = Exclude + type CreateDurationType = + ((units: DurationUnitsObjectType) => Duration) + & ((time: number, unit?: DurationUnitType) => Duration) + & ((ISO_8601: string) => Duration) + type AddDurationType = CreateDurationType & ((duration: Duration) => Duration) + + interface Duration { + new (input: string | number | object, unit?: string, locale?: string): Duration + + clone(): Duration + + humanize(withSuffix?: boolean): string + + milliseconds(): number + asMilliseconds(): number + + seconds(): number + asSeconds(): number + + minutes(): number + asMinutes(): number + + hours(): number + asHours(): number + + days(): number + asDays(): number + + weeks(): number + asWeeks(): number + + months(): number + asMonths(): number + + years(): number + asYears(): number + + as(unit: DurationUnitType): number + + get(unit: DurationUnitType): number + + add: AddDurationType + + subtract: AddDurationType + + toJSON(): string + + toISOString(): string + + format(formatStr?: string): string + + locale(locale: string): Duration + } +} + +declare module 'dayjs' { + interface Dayjs { + add(duration: plugin.Duration): Dayjs + subtract(duration: plugin.Duration): Dayjs + } + + /** + * @param time If unit is not present, time treated as number of milliseconds + */ + export const duration: plugin.CreateDurationType; + export function isDuration(d: any): d is plugin.Duration +} \ No newline at end of file diff --git a/plugin/duration.js b/plugin/duration.js new file mode 100644 index 000000000..4578f0644 --- /dev/null +++ b/plugin/duration.js @@ -0,0 +1 @@ +!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_duration=s()}(this,(function(){"use strict";var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,d=2628e6,a=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:d,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof g},f=function(t,s,n){return new g(t,n,s.$l)},m=function(t){return s.p(t)+"s"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},v=function(t,s){return t?l(t)?{negative:!0,format:""+y(t)+s}:{negative:!1,format:""+t+s}:{negative:!1,format:""}},g=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*h[m(s)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s]})),this.calMilliseconds(),this;if("string"==typeof t){var e=t.match(a);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*h[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/d),t%=d,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t},y.toISOString=function(){var t=v(this.$d.years,"Y"),s=v(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,"D"),e=v(this.$d.hours,"H"),r=v(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var u=v(o,"S"),d=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?"T":"",h=(d?"-":"")+"P"+t.format+s.format+i.format+a+e.format+r.format+u.format;return"P"===h||"-P"===h?"P0D":h},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return n.replace(o,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/h[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return"milliseconds"===n?s%=1e3:s="weeks"===n?$(s/h[n]):this.$d[n],s||0},y.add=function(t,s,n){var i;return i=s?t*h[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!s)},y.valueOf=function(){return this.asMilliseconds()},y.milliseconds=function(){return this.get("milliseconds")},y.asMilliseconds=function(){return this.as("milliseconds")},y.seconds=function(){return this.get("seconds")},y.asSeconds=function(){return this.as("seconds")},y.minutes=function(){return this.get("minutes")},y.asMinutes=function(){return this.as("minutes")},y.hours=function(){return this.get("hours")},y.asHours=function(){return this.as("hours")},y.days=function(){return this.get("days")},y.asDays=function(){return this.as("days")},y.weeks=function(){return this.get("weeks")},y.asWeeks=function(){return this.as("weeks")},y.months=function(){return this.get("months")},y.asMonths=function(){return this.as("months")},y.years=function(){return this.get("years")},y.asYears=function(){return this.as("years")},l}(),p=function(t,s,n){return t.add(s.years()*n,"y").add(s.months()*n,"M").add(s.days()*n,"d").add(s.hours()*n,"h").add(s.minutes()*n,"m").add(s.seconds()*n,"s").add(s.milliseconds()*n,"ms")};return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)?p(this,t,1):r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)?p(this,t,-1):o.bind(this)(t,s)}}})); \ No newline at end of file diff --git a/plugin/isBetween.d.ts b/plugin/isBetween.d.ts new file mode 100644 index 000000000..431fff80b --- /dev/null +++ b/plugin/isBetween.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc, ConfigType, OpUnitType } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + isBetween(a: ConfigType, b: ConfigType, c?: OpUnitType | null, d?: '()' | '[]' | '[)' | '(]'): boolean + } +} diff --git a/plugin/isBetween.js b/plugin/isBetween.js new file mode 100644 index 000000000..68046cb81 --- /dev/null +++ b/plugin/isBetween.js @@ -0,0 +1 @@ +!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isBetween=i()}(this,(function(){"use strict";return function(e,i,t){i.prototype.isBetween=function(e,i,s,f){var n=t(e),o=t(i),r="("===(f=f||"()")[0],u=")"===f[1];return(r?this.isAfter(n,s):!this.isBefore(n,s))&&(u?this.isBefore(o,s):!this.isAfter(o,s))||(r?this.isBefore(n,s):!this.isAfter(n,s))&&(u?this.isAfter(o,s):!this.isBefore(o,s))}}})); \ No newline at end of file diff --git a/plugin/isLeapYear.d.ts b/plugin/isLeapYear.d.ts new file mode 100644 index 000000000..5be74092b --- /dev/null +++ b/plugin/isLeapYear.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + isLeapYear(): boolean + } +} diff --git a/plugin/isLeapYear.js b/plugin/isLeapYear.js new file mode 100644 index 000000000..030bd46e5 --- /dev/null +++ b/plugin/isLeapYear.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isLeapYear=t()}(this,(function(){"use strict";return function(e,t){t.prototype.isLeapYear=function(){return this.$y%4==0&&this.$y%100!=0||this.$y%400==0}}})); \ No newline at end of file diff --git a/plugin/isMoment.d.ts b/plugin/isMoment.d.ts new file mode 100644 index 000000000..dac24f6f7 --- /dev/null +++ b/plugin/isMoment.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + + export function isMoment(input: any): boolean + +} diff --git a/plugin/isMoment.js b/plugin/isMoment.js new file mode 100644 index 000000000..be2641251 --- /dev/null +++ b/plugin/isMoment.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isMoment=n()}(this,(function(){"use strict";return function(e,n,t){t.isMoment=function(e){return t.isDayjs(e)}}})); \ No newline at end of file diff --git a/plugin/isSameOrAfter.d.ts b/plugin/isSameOrAfter.d.ts new file mode 100644 index 000000000..916bc801c --- /dev/null +++ b/plugin/isSameOrAfter.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc, ConfigType, OpUnitType } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + isSameOrAfter(date?: ConfigType, unit?: OpUnitType): boolean + } +} diff --git a/plugin/isSameOrAfter.js b/plugin/isSameOrAfter.js new file mode 100644 index 000000000..76f8a3355 --- /dev/null +++ b/plugin/isSameOrAfter.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrAfter=t()}(this,(function(){"use strict";return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}})); \ No newline at end of file diff --git a/plugin/isSameOrBefore.d.ts b/plugin/isSameOrBefore.d.ts new file mode 100644 index 000000000..d52b0955c --- /dev/null +++ b/plugin/isSameOrBefore.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc, ConfigType, OpUnitType } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + isSameOrBefore(date?: ConfigType, unit?: OpUnitType): boolean + } +} diff --git a/plugin/isSameOrBefore.js b/plugin/isSameOrBefore.js new file mode 100644 index 000000000..57a767e6b --- /dev/null +++ b/plugin/isSameOrBefore.js @@ -0,0 +1 @@ +!function(e,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrBefore=i()}(this,(function(){"use strict";return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)}}})); \ No newline at end of file diff --git a/plugin/isToday.d.ts b/plugin/isToday.d.ts new file mode 100644 index 000000000..04ac5818d --- /dev/null +++ b/plugin/isToday.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + isToday(): boolean + } +} diff --git a/plugin/isToday.js b/plugin/isToday.js new file mode 100644 index 000000000..ee9f9cdbe --- /dev/null +++ b/plugin/isToday.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isToday=o()}(this,(function(){"use strict";return function(e,o,t){o.prototype.isToday=function(){var e="YYYY-MM-DD",o=t();return this.format(e)===o.format(e)}}})); \ No newline at end of file diff --git a/plugin/isTomorrow.d.ts b/plugin/isTomorrow.d.ts new file mode 100644 index 000000000..08110b6e2 --- /dev/null +++ b/plugin/isTomorrow.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + isTomorrow(): boolean + } +} diff --git a/plugin/isTomorrow.js b/plugin/isTomorrow.js new file mode 100644 index 000000000..ca850440c --- /dev/null +++ b/plugin/isTomorrow.js @@ -0,0 +1 @@ +!function(o,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(o="undefined"!=typeof globalThis?globalThis:o||self).dayjs_plugin_isTomorrow=e()}(this,(function(){"use strict";return function(o,e,t){e.prototype.isTomorrow=function(){var o="YYYY-MM-DD",e=t().add(1,"day");return this.format(o)===e.format(o)}}})); \ No newline at end of file diff --git a/plugin/isYesterday.d.ts b/plugin/isYesterday.d.ts new file mode 100644 index 000000000..2d8ae9e1a --- /dev/null +++ b/plugin/isYesterday.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + isYesterday(): boolean + } +} diff --git a/plugin/isYesterday.js b/plugin/isYesterday.js new file mode 100644 index 000000000..b63b68ac9 --- /dev/null +++ b/plugin/isYesterday.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isYesterday=t()}(this,(function(){"use strict";return function(e,t,n){t.prototype.isYesterday=function(){var e="YYYY-MM-DD",t=n().subtract(1,"day");return this.format(e)===t.format(e)}}})); \ No newline at end of file diff --git a/plugin/isoWeek.d.ts b/plugin/isoWeek.d.ts new file mode 100644 index 000000000..3f4d88f62 --- /dev/null +++ b/plugin/isoWeek.d.ts @@ -0,0 +1,27 @@ +import { PluginFunc, OpUnitType, ConfigType } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +type ISOUnitType = OpUnitType | 'isoWeek'; + +declare module 'dayjs' { + interface Dayjs { + isoWeekYear(): number + isoWeek(): number + isoWeek(value: number): Dayjs + + isoWeekday(): number + isoWeekday(value: number): Dayjs + + startOf(unit: ISOUnitType): Dayjs + + endOf(unit: ISOUnitType): Dayjs + + isSame(date?: ConfigType, unit?: ISOUnitType): boolean + + isBefore(date?: ConfigType, unit?: ISOUnitType): boolean + + isAfter(date?: ConfigType, unit?: ISOUnitType): boolean + } +} diff --git a/plugin/isoWeek.js b/plugin/isoWeek.js new file mode 100644 index 000000000..202ade7d1 --- /dev/null +++ b/plugin/isoWeek.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isoWeek=t()}(this,(function(){"use strict";var e="day";return function(t,i,s){var a=function(t){return t.add(4-t.isoWeekday(),e)},d=i.prototype;d.isoWeekYear=function(){return a(this).year()},d.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),e);var i,d,n,o,r=a(this),u=(i=this.isoWeekYear(),d=this.$u,n=(d?s.utc:s)().year(i).startOf("year"),o=4-n.isoWeekday(),n.isoWeekday()>4&&(o+=7),n.add(o,e));return r.diff(u,"week")+1},d.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var n=d.startOf;d.startOf=function(e,t){var i=this.$utils(),s=!!i.u(t)||t;return"isoweek"===i.p(e)?s?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):n.bind(this)(e,t)}}})); \ No newline at end of file diff --git a/plugin/isoWeeksInYear.d.ts b/plugin/isoWeeksInYear.d.ts new file mode 100644 index 000000000..2bc02cddf --- /dev/null +++ b/plugin/isoWeeksInYear.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + isoWeeksInYear(): number + } +} diff --git a/plugin/isoWeeksInYear.js b/plugin/isoWeeksInYear.js new file mode 100644 index 000000000..2bd20cd5b --- /dev/null +++ b/plugin/isoWeeksInYear.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isoWeeksInYear=n()}(this,(function(){"use strict";return function(e,n){n.prototype.isoWeeksInYear=function(){var e=this.isLeapYear(),n=this.endOf("y").day();return 4===n||e&&5===n?53:52}}})); \ No newline at end of file diff --git a/plugin/localeData.d.ts b/plugin/localeData.d.ts new file mode 100644 index 000000000..ae9e55766 --- /dev/null +++ b/plugin/localeData.d.ts @@ -0,0 +1,44 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + type WeekdayNames = [string, string, string, string, string, string, string]; + type MonthNames = [string, string, string, string, string, string, string, string, string, string, string, string]; + + interface InstanceLocaleDataReturn { + firstDayOfWeek(): number; + weekdays(instance?: Dayjs): WeekdayNames; + weekdaysShort(instance?: Dayjs): WeekdayNames; + weekdaysMin(instance?: Dayjs): WeekdayNames; + months(instance?: Dayjs): MonthNames; + monthsShort(instance?: Dayjs): MonthNames; + longDateFormat(format: string): string; + meridiem(hour?: number, minute?: number, isLower?: boolean): string; + ordinal(n: number): string + } + + interface GlobalLocaleDataReturn { + firstDayOfWeek(): number; + weekdays(): WeekdayNames; + weekdaysShort(): WeekdayNames; + weekdaysMin(): WeekdayNames; + months(): MonthNames; + monthsShort(): MonthNames; + longDateFormat(format: string): string; + meridiem(hour?: number, minute?: number, isLower?: boolean): string; + ordinal(n: number): string + } + + interface Dayjs { + localeData(): InstanceLocaleDataReturn; + } + + export function weekdays(localOrder?: boolean): WeekdayNames; + export function weekdaysShort(localOrder?: boolean): WeekdayNames; + export function weekdaysMin(localOrder?: boolean): WeekdayNames; + export function monthsShort(): MonthNames; + export function months(): MonthNames; + export function localeData(): GlobalLocaleDataReturn; +} diff --git a/plugin/localeData.js b/plugin/localeData.js new file mode 100644 index 000000000..55e01ee7b --- /dev/null +++ b/plugin/localeData.js @@ -0,0 +1 @@ +!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n="undefined"!=typeof globalThis?globalThis:n||self).dayjs_plugin_localeData=e()}(this,(function(){"use strict";return function(n,e,t){var r=e.prototype,o=function(n){return n&&(n.indexOf?n:n.s)},u=function(n,e,t,r,u){var i=n.name?n:n.$locale(),a=o(i[e]),s=o(i[t]),f=a||s.map((function(n){return n.slice(0,r)}));if(!u)return f;var d=i.weekStart;return f.map((function(n,e){return f[(e+(d||0))%7]}))},i=function(){return t.Ls[t.locale()]},a=function(n,e){return n.formats[e]||function(n){return n.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,e,t){return e||t.slice(1)}))}(n.formats[e.toUpperCase()])},s=function(){var n=this;return{months:function(e){return e?e.format("MMMM"):u(n,"months")},monthsShort:function(e){return e?e.format("MMM"):u(n,"monthsShort","months",3)},firstDayOfWeek:function(){return n.$locale().weekStart||0},weekdays:function(e){return e?e.format("dddd"):u(n,"weekdays")},weekdaysMin:function(e){return e?e.format("dd"):u(n,"weekdaysMin","weekdays",2)},weekdaysShort:function(e){return e?e.format("ddd"):u(n,"weekdaysShort","weekdays",3)},longDateFormat:function(e){return a(n.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return s.bind(this)()},t.localeData=function(){var n=i();return{firstDayOfWeek:function(){return n.weekStart||0},weekdays:function(){return t.weekdays()},weekdaysShort:function(){return t.weekdaysShort()},weekdaysMin:function(){return t.weekdaysMin()},months:function(){return t.months()},monthsShort:function(){return t.monthsShort()},longDateFormat:function(e){return a(n,e)},meridiem:n.meridiem,ordinal:n.ordinal}},t.months=function(){return u(i(),"months")},t.monthsShort=function(){return u(i(),"monthsShort","months",3)},t.weekdays=function(n){return u(i(),"weekdays",null,null,n)},t.weekdaysShort=function(n){return u(i(),"weekdaysShort","weekdays",3,n)},t.weekdaysMin=function(n){return u(i(),"weekdaysMin","weekdays",2,n)}}})); \ No newline at end of file diff --git a/plugin/localizedFormat.d.ts b/plugin/localizedFormat.d.ts new file mode 100644 index 000000000..30ec75e5d --- /dev/null +++ b/plugin/localizedFormat.d.ts @@ -0,0 +1,4 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin diff --git a/plugin/localizedFormat.js b/plugin/localizedFormat.js new file mode 100644 index 000000000..2aa466526 --- /dev/null +++ b/plugin/localizedFormat.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}})); \ No newline at end of file diff --git a/plugin/minMax.d.ts b/plugin/minMax.d.ts new file mode 100644 index 000000000..4c5f6dcd7 --- /dev/null +++ b/plugin/minMax.d.ts @@ -0,0 +1,11 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + export function max(dayjs: Dayjs[]): Dayjs | null + export function max(...dayjs: Dayjs[]): Dayjs | null + export function min(dayjs: Dayjs[]): Dayjs | null + export function min(...dayjs: Dayjs[]): Dayjs | null +} diff --git a/plugin/minMax.js b/plugin/minMax.js new file mode 100644 index 000000000..ce063146a --- /dev/null +++ b/plugin/minMax.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_minMax=n()}(this,(function(){"use strict";return function(e,n,t){var i=function(e,n){if(!n||!n.length||1===n.length&&!n[0]||1===n.length&&Array.isArray(n[0])&&!n[0].length)return null;var t;1===n.length&&n[0].length>0&&(n=n[0]);t=(n=n.filter((function(e){return e})))[0];for(var i=1;i=0?1:a.date()),s=u.year||a.year(),d=u.month>=0?u.month:u.year||u.day?0:a.month(),f=u.hour||0,b=u.minute||0,h=u.second||0,y=u.millisecond||0;return o?new Date(Date.UTC(s,d,c,f,b,h,y)):new Date(s,d,c,f,b,h,y)}return r},o=i.parse;i.parse=function(t){t.date=r.bind(this)(t),o.bind(this)(t)};var u=i.set,a=i.add,c=i.subtract,s=function(t,n,e,i){void 0===i&&(i=1);var r=Object.keys(n),o=this;return r.forEach((function(e){o=t.bind(o)(n[e]*i,e)})),o};i.set=function(t,n){return n=void 0===n?t:n,"Object"===t.constructor.name?s.bind(this)((function(t,n){return u.bind(this)(n,t)}),n,t):u.bind(this)(t,n)},i.add=function(t,n){return"Object"===t.constructor.name?s.bind(this)(a,t,n):a.bind(this)(t,n)},i.subtract=function(t,n){return"Object"===t.constructor.name?s.bind(this)(a,t,n,-1):c.bind(this)(t,n)}}})); \ No newline at end of file diff --git a/plugin/pluralGetSet.d.ts b/plugin/pluralGetSet.d.ts new file mode 100644 index 000000000..ab2d89aaf --- /dev/null +++ b/plugin/pluralGetSet.d.ts @@ -0,0 +1,44 @@ +import { PluginFunc, UnitType, ConfigType } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + years(): number + + years(value: number): Dayjs + + months(): number + + months(value: number): Dayjs + + dates(): number + + dates(value: number): Dayjs + + weeks(): number + + weeks(value: number): Dayjs + + days(): number + + days(value: number): Dayjs + + hours(): number + + hours(value: number): Dayjs + + minutes(): number + + minutes(value: number): Dayjs + + seconds(): number + + seconds(value: number): Dayjs + + milliseconds(): number + + milliseconds(value: number): Dayjs + } +} diff --git a/plugin/pluralGetSet.js b/plugin/pluralGetSet.js new file mode 100644 index 000000000..d75849407 --- /dev/null +++ b/plugin/pluralGetSet.js @@ -0,0 +1 @@ +!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o():"function"==typeof define&&define.amd?define(o):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_pluralGetSet=o()}(this,(function(){"use strict";return function(e,o){var s=o.prototype;["milliseconds","seconds","minutes","hours","days","weeks","isoWeeks","months","quarters","years","dates"].forEach((function(e){s[e]=s[e.replace(/s$/,"")]}))}})); \ No newline at end of file diff --git a/plugin/preParsePostFormat.d.ts b/plugin/preParsePostFormat.d.ts new file mode 100644 index 000000000..30ec75e5d --- /dev/null +++ b/plugin/preParsePostFormat.d.ts @@ -0,0 +1,4 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin diff --git a/plugin/preParsePostFormat.js b/plugin/preParsePostFormat.js new file mode 100644 index 000000000..5611d107d --- /dev/null +++ b/plugin/preParsePostFormat.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_preParsePostFormat=e()}(this,(function(){"use strict";return function(t,e){var o=e.prototype.parse;e.prototype.parse=function(t){if("string"==typeof t.date){var e=this.$locale();t.date=e&&e.preparse?e.preparse(t.date):t.date}return o.bind(this)(t)};var r=e.prototype.format;e.prototype.format=function(){for(var t=arguments.length,e=new Array(t),o=0;o number + thresholds?: RelativeTimeThreshold[] +} + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + fromNow(withoutSuffix?: boolean): string + from(compared: ConfigType, withoutSuffix?: boolean): string + toNow(withoutSuffix?: boolean): string + to(compared: ConfigType, withoutSuffix?: boolean): string + } +} diff --git a/plugin/relativeTime.js b/plugin/relativeTime.js new file mode 100644 index 000000000..898eee6d0 --- /dev/null +++ b/plugin/relativeTime.js @@ -0,0 +1 @@ +!function(r,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(r="undefined"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){"use strict";return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return"function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}})); \ No newline at end of file diff --git a/plugin/timezone.d.ts b/plugin/timezone.d.ts new file mode 100644 index 000000000..049bb0870 --- /dev/null +++ b/plugin/timezone.d.ts @@ -0,0 +1,20 @@ +import { PluginFunc, ConfigType } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + tz(timezone?: string, keepLocalTime?: boolean): Dayjs + offsetName(type?: 'short' | 'long'): string | undefined + } + + interface DayjsTimezone { + (date?: ConfigType, timezone?: string): Dayjs + (date: ConfigType, format: string, timezone?: string): Dayjs + guess(): string + setDefault(timezone?: string): void + } + + const tz: DayjsTimezone +} diff --git a/plugin/timezone.js b/plugin/timezone.js new file mode 100644 index 000000000..b778bef4d --- /dev/null +++ b/plugin/timezone.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){"use strict";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||"short",o=t+"|"+i,r=e[o];return r||(r=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},u=function(e,n){for(var i=a(e,n),r=[],u=0;u=0&&(r[c]=parseInt(m,10))}var d=r[3],l=24===d?0:d,h=r[0]+"-"+r[1]+"-"+r[2]+" "+l+":"+r[4]+":"+r[5]+":000",v=+e;return(o.utc(h).valueOf()-(v-=v%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),a=i.toLocaleString("en-US",{timeZone:t}),u=Math.round((i-new Date(a))/1e3/60),f=o(a,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-u,!0);if(e){var s=f.utcOffset();f=f.add(n-s,"minute")}return f.$x.$timezone=t,f},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return"timezonename"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if("string"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return[i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}})); \ No newline at end of file diff --git a/plugin/toArray.d.ts b/plugin/toArray.d.ts new file mode 100644 index 000000000..45f1f0c3c --- /dev/null +++ b/plugin/toArray.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + toArray(): number[] + } +} diff --git a/plugin/toArray.js b/plugin/toArray.js new file mode 100644 index 000000000..ac06750eb --- /dev/null +++ b/plugin/toArray.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_toArray=e()}(this,(function(){"use strict";return function(t,e){e.prototype.toArray=function(){return[this.$y,this.$M,this.$D,this.$H,this.$m,this.$s,this.$ms]}}})); \ No newline at end of file diff --git a/plugin/toObject.d.ts b/plugin/toObject.d.ts new file mode 100644 index 000000000..ca12aaf00 --- /dev/null +++ b/plugin/toObject.d.ts @@ -0,0 +1,20 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +interface DayjsObject { + years: number + months: number + date: number + hours: number + minutes: number + seconds: number + milliseconds: number +} + +declare module 'dayjs' { + interface Dayjs { + toObject(): DayjsObject + } +} diff --git a/plugin/toObject.js b/plugin/toObject.js new file mode 100644 index 000000000..573b49e6f --- /dev/null +++ b/plugin/toObject.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_toObject=e()}(this,(function(){"use strict";return function(t,e){e.prototype.toObject=function(){return{years:this.$y,months:this.$M,date:this.$D,hours:this.$H,minutes:this.$m,seconds:this.$s,milliseconds:this.$ms}}}})); \ No newline at end of file diff --git a/plugin/updateLocale.d.ts b/plugin/updateLocale.d.ts new file mode 100644 index 000000000..ef1c01df9 --- /dev/null +++ b/plugin/updateLocale.d.ts @@ -0,0 +1,8 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + export function updateLocale(localeName: string, customConfig: Record): Record +} diff --git a/plugin/updateLocale.js b/plugin/updateLocale.js new file mode 100644 index 000000000..811d9e912 --- /dev/null +++ b/plugin/updateLocale.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_updateLocale=n()}(this,(function(){"use strict";return function(e,n,t){t.updateLocale=function(e,n){var o=t.Ls[e];if(o)return(n?Object.keys(n):[]).forEach((function(e){o[e]=n[e]})),o}}})); \ No newline at end of file diff --git a/plugin/utc.d.ts b/plugin/utc.d.ts new file mode 100644 index 000000000..544ea4e70 --- /dev/null +++ b/plugin/utc.d.ts @@ -0,0 +1,19 @@ +import { PluginFunc, ConfigType } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + + utc(keepLocalTime?: boolean): Dayjs + + local(): Dayjs + + isUTC(): boolean + + utcOffset(offset: number | string, keepLocalTime?: boolean): Dayjs + } + + export function utc(config?: ConfigType, format?: string, strict?: boolean): Dayjs +} diff --git a/plugin/utc.js b/plugin/utc.js new file mode 100644 index 000000000..af07564f0 --- /dev/null +++ b/plugin/utc.js @@ -0,0 +1 @@ +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t="undefined"!=typeof globalThis?globalThis:t||self).dayjs_plugin_utc=i()}(this,(function(){"use strict";var t="minute",i=/[+-]\d\d(?::?\d\d)?/g,e=/([+-]|\d\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var r=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else r.call(this)};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if("string"==typeof s&&(s=function(t){void 0===t&&(t="");var s=t.match(i);if(!s)return null;var f=(""+s[0]).match(e)||["-",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:"+"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(f)return o.$offset=u,o.$u=0===s,o;if(0!==s){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+r,t)).$offset=u,o.$x.$localOffset=r}else o=this.utc();return o};var h=u.format;u.format=function(t){var i=t||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return"s"===t&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)}}})); \ No newline at end of file diff --git a/plugin/weekOfYear.d.ts b/plugin/weekOfYear.d.ts new file mode 100644 index 000000000..d98801455 --- /dev/null +++ b/plugin/weekOfYear.d.ts @@ -0,0 +1,12 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + week(): number + + week(value : number): Dayjs + } +} diff --git a/plugin/weekOfYear.js b/plugin/weekOfYear.js new file mode 100644 index 000000000..7e234c425 --- /dev/null +++ b/plugin/weekOfYear.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekOfYear=t()}(this,(function(){"use strict";var e="week",t="year";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),"day");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,"millisecond"),o=this.diff(a,e,!0);return o<0?r(this).startOf("week").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}})); \ No newline at end of file diff --git a/plugin/weekYear.d.ts b/plugin/weekYear.d.ts new file mode 100644 index 000000000..df2533123 --- /dev/null +++ b/plugin/weekYear.d.ts @@ -0,0 +1,10 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + weekYear(): number + } +} diff --git a/plugin/weekYear.js b/plugin/weekYear.js new file mode 100644 index 000000000..d90d137ec --- /dev/null +++ b/plugin/weekYear.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekYear=t()}(this,(function(){"use strict";return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return 1===t&&11===e?n+1:0===e&&t>=52?n-1:n}}})); \ No newline at end of file diff --git a/plugin/weekday.d.ts b/plugin/weekday.d.ts new file mode 100644 index 000000000..87a8025a3 --- /dev/null +++ b/plugin/weekday.d.ts @@ -0,0 +1,12 @@ +import { PluginFunc } from 'dayjs' + +declare const plugin: PluginFunc +export = plugin + +declare module 'dayjs' { + interface Dayjs { + weekday(): number + + weekday(value: number): Dayjs + } +} diff --git a/plugin/weekday.js b/plugin/weekday.js new file mode 100644 index 000000000..ae2276b83 --- /dev/null +++ b/plugin/weekday.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekday=t()}(this,(function(){"use strict";return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,i=this.$W,n=(i other.toISOString() + } + return dayjs(that) < this.startOf(units) } isBefore(that, units) { + if (units === undefined) { + const other = dayjs(that) + if (!this.isValid() || !other.isValid()) { + return false + } + return this.toISOString() < other.toISOString() + } + return this.endOf(units) < dayjs(that) }