cronstrue 3.45.0 → 3.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cronstrue-i18n.js +342 -890
- package/dist/cronstrue-i18n.min.js +1 -1
- package/dist/cronstrue.js +263 -348
- package/dist/cronstrue.min.js +1 -1
- package/dist/expressionDescriptor.d.ts +17 -9
- package/dist/i18n/allLocales.d.ts +6 -6
- package/dist/i18n/locale.d.ts +4 -4
- package/dist/i18n/locales/af.d.ts +1 -4
- package/dist/i18n/locales/ar.d.ts +0 -4
- package/dist/i18n/locales/az.d.ts +2 -4
- package/dist/i18n/locales/be.d.ts +0 -4
- package/dist/i18n/locales/bg.d.ts +1 -5
- package/dist/i18n/locales/ca.d.ts +0 -4
- package/dist/i18n/locales/cs.d.ts +0 -4
- package/dist/i18n/locales/da.d.ts +0 -4
- package/dist/i18n/locales/de.d.ts +0 -4
- package/dist/i18n/locales/en.d.ts +4 -6
- package/dist/i18n/locales/es.d.ts +0 -4
- package/dist/i18n/locales/fa.d.ts +0 -4
- package/dist/i18n/locales/fi.d.ts +1 -4
- package/dist/i18n/locales/fr.d.ts +0 -4
- package/dist/i18n/locales/he.d.ts +0 -4
- package/dist/i18n/locales/hr.d.ts +0 -4
- package/dist/i18n/locales/hu.d.ts +0 -4
- package/dist/i18n/locales/id.d.ts +0 -4
- package/dist/i18n/locales/it.d.ts +0 -4
- package/dist/i18n/locales/ja.d.ts +0 -4
- package/dist/i18n/locales/ko.d.ts +0 -4
- package/dist/i18n/locales/my.d.ts +0 -4
- package/dist/i18n/locales/nb.d.ts +0 -4
- package/dist/i18n/locales/nl.d.ts +0 -4
- package/dist/i18n/locales/nn.d.ts +0 -4
- package/dist/i18n/locales/pl.d.ts +0 -4
- package/dist/i18n/locales/pt_BR.d.ts +2 -6
- package/dist/i18n/locales/pt_PT.d.ts +0 -4
- package/dist/i18n/locales/ru.d.ts +0 -4
- package/dist/i18n/locales/sk.d.ts +0 -4
- package/dist/i18n/locales/sl.d.ts +0 -4
- package/dist/i18n/locales/sr.d.ts +0 -4
- package/dist/i18n/locales/sv.d.ts +0 -4
- package/dist/i18n/locales/sw.d.ts +0 -4
- package/dist/i18n/locales/tg.d.ts +0 -4
- package/dist/i18n/locales/th.d.ts +0 -4
- package/dist/i18n/locales/tr.d.ts +0 -4
- package/dist/i18n/locales/uk.d.ts +0 -4
- package/dist/i18n/locales/vi.d.ts +0 -4
- package/dist/i18n/locales/zh_CN.d.ts +1 -4
- package/dist/i18n/locales/zh_TW.d.ts +1 -4
- package/locales/af.js +0 -9
- package/locales/af.min.js +1 -1
- package/locales/ar.js +0 -12
- package/locales/ar.min.js +1 -1
- package/locales/az.js +0 -6
- package/locales/az.min.js +1 -1
- package/locales/be.js +0 -12
- package/locales/be.min.js +1 -1
- package/locales/bg.js +67 -64
- package/locales/bg.min.js +1 -1
- package/locales/ca.js +0 -12
- package/locales/ca.min.js +1 -1
- package/locales/cs.js +0 -12
- package/locales/cs.min.js +1 -1
- package/locales/da.js +0 -12
- package/locales/da.min.js +1 -1
- package/locales/de.js +0 -12
- package/locales/de.min.js +1 -1
- package/locales/en.js +7 -13
- package/locales/en.min.js +1 -1
- package/locales/es.js +0 -12
- package/locales/es.min.js +1 -1
- package/locales/fa.js +0 -12
- package/locales/fa.min.js +1 -1
- package/locales/fi.js +0 -9
- package/locales/fi.min.js +1 -1
- package/locales/fr.js +0 -12
- package/locales/fr.min.js +1 -1
- package/locales/he.js +0 -12
- package/locales/he.min.js +1 -1
- package/locales/hr.js +1 -21
- package/locales/hr.min.js +1 -1
- package/locales/hu.js +0 -12
- package/locales/hu.min.js +1 -1
- package/locales/id.js +0 -12
- package/locales/id.min.js +1 -1
- package/locales/it.js +0 -12
- package/locales/it.min.js +1 -1
- package/locales/ja.js +0 -12
- package/locales/ja.min.js +1 -1
- package/locales/ko.js +0 -12
- package/locales/ko.min.js +1 -1
- package/locales/my.js +0 -12
- package/locales/my.min.js +1 -1
- package/locales/nb.js +0 -12
- package/locales/nb.min.js +1 -1
- package/locales/nl.js +0 -12
- package/locales/nl.min.js +1 -1
- package/locales/nn.js +0 -12
- package/locales/nn.min.js +1 -1
- package/locales/pl.js +0 -12
- package/locales/pl.min.js +1 -1
- package/locales/pt_BR.js +6 -18
- package/locales/pt_BR.min.js +1 -1
- package/locales/pt_PT.js +6 -18
- package/locales/pt_PT.min.js +1 -1
- package/locales/ru.js +0 -12
- package/locales/ru.min.js +1 -1
- package/locales/sk.js +0 -12
- package/locales/sk.min.js +1 -1
- package/locales/sl.js +0 -12
- package/locales/sl.min.js +1 -1
- package/locales/sr.js +1 -21
- package/locales/sr.min.js +1 -1
- package/locales/sv.js +0 -12
- package/locales/sv.min.js +1 -1
- package/locales/sw.js +0 -12
- package/locales/sw.min.js +1 -1
- package/locales/tg.js +0 -12
- package/locales/tg.min.js +1 -1
- package/locales/th.js +0 -12
- package/locales/th.min.js +1 -1
- package/locales/tr.js +0 -12
- package/locales/tr.min.js +1 -1
- package/locales/uk.js +0 -12
- package/locales/uk.min.js +1 -1
- package/locales/vi.js +0 -12
- package/locales/vi.min.js +1 -1
- package/locales/zh_CN.js +0 -9
- package/locales/zh_CN.min.js +1 -1
- package/locales/zh_TW.js +0 -9
- package/locales/zh_TW.min.js +1 -1
- package/package.json +10 -11
package/dist/cronstrue.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cronstrue",[],e):"object"==typeof exports?exports.cronstrue=e():t.cronstrue=e()}(globalThis,(()=>(()=>{"use strict";var t={6949(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.CronParser=void 0;var r=n(9515),o=function(){function t(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=n}return t.prototype.parse=function(){var t,e,n=null!==(t=this.expression)&&void 0!==t?t:"";if("@reboot"===n)return e=["@reboot","","","","","",""];if(n.startsWith("@")){var r=this.parseSpecial(this.expression);e=this.extractParts(r)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},t.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 JAN *","@annually":"0 0 1 JAN *","@monthly":"0 0 1 * *","@weekly":"0 0 * * SUN","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"}[t];if(!e)throw new Error("Unknown special expression.");return e},t.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),n=0;n<e.length;n++)if(e[n].includes(",")){var r=e[n].split(",").map((function(t){return t.trim()})).filter((function(t){return""!==t})).map((function(t){return isNaN(Number(t))?t:Number(t)})).filter((function(t){return null!==t&&""!==t}));0===r.length&&r.push("*"),r.sort((function(t,e){return null!==t&&null!==e?t-e:0})),e[n]=r.map((function(t){return null!==t?t.toString():""})).join(",")}if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(1==e.length?"":"s",". At least 5 parts are required."));if(5==e.length)e.unshift(""),e.push("");else if(6==e.length){/\d{4}$/.test(e[5])||"?"==e[4]||"?"==e[2]?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},t.prototype.normalize=function(t){for(var e=this,n=0;n<t.length;n++)t[n]=t[n].toUpperCase();t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*"),0==t[0].indexOf("0/")&&(t[0]=t[0].replace("0/","*/")),0==t[1].indexOf("0/")&&(t[1]=t[1].replace("0/","*/")),0==t[2].indexOf("0/")&&(t[2]=t[2].replace("0/","*/")),0==t[3].indexOf("1/")&&(t[3]=t[3].replace("1/","*/")),this.monthStartIndexZero||0!=t[4].indexOf("1/")||(t[4]=t[4].replace("1/","*/")),0==t[6].indexOf("1/")&&(t[6]=t[6].replace("1/","*/")),this.dayOfWeekStartIndexZero&&(t[5]=t[5].split(",").map((function(t){return t.replace(/^0-7(?=\/|$)/,"0-6")})).join(",")),t[5]=t[5].replace(/(^\d+)|([^#/\s\d]\d+)/g,(function(t){var n=t.replace(/\D/,""),r=n;return e.dayOfWeekStartIndexZero?"7"==n&&(r="0"):r=(parseInt(n)-1).toString(),t.replace(n,r)})),t[5]=t[5].split(",").map((function(t){return"L"==t?"6":t})).join(","),"?"==t[3]&&(t[3]="*");if(t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||/[-+]/.test(t[3]))&&!/^\d{1,2}W[+-]\d{1,2}$/.test(t[3]))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var r={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var o in r)t[5]=t[5].replace(new RegExp(o,"gi"),r[o].toString());t[5]=t[5].split(",").filter((function(t,e,n){return""===t||n.indexOf(t)===e})).join(","),t[4]=t[4].replace(/(^\d{1,2})|([^#/\s\d]\d{1,2})/g,(function(t){var n=t.replace(/\D/,""),r=n;return e.monthStartIndexZero&&(r=(parseInt(n)+1).toString()),t.replace(n,r)}));var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var a in i)t[4]=t[4].replace(new RegExp(a,"gi"),i[a].toString());"0"==t[0]&&(t[0]=""),/\*|\-|\,|\//.test(t[2])||!/\*|\//.test(t[1])&&!/\*|\//.test(t[0])||(t[2]+="-".concat(t[2]));for(n=0;n<t.length;n++)if(-1!=t[n].indexOf(",")&&(t[n]=t[n].split(",").filter((function(t){return""!==t})).join(",")||"*"),"*/1"==t[n]&&(t[n]="*"),t[n].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[n])){var s=null;switch(n){case 4:s="12";break;case 5:s="6";break;case 6:s="9999";break;default:s=null}if(null!==s){var u=t[n].split("/");t[n]="".concat(u[0],"-").concat(s,"/").concat(u[1])}}},t.prototype.validate=function(t){var e="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(t[0],e),this.validateOnlyExpectedCharactersFound(t[1],e),this.validateOnlyExpectedCharactersFound(t[2],e),this.validateOnlyExpectedCharactersFound(t[3].replace(/^(\d{1,2}W)[+-]\d{1,2}$/,"$1"),"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(t[4],e),this.validateOnlyExpectedCharactersFound(t[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(t[6],e),this.validateAnyRanges(t)},t.prototype.validateAnyRanges=function(t){t.forEach((function(t){return r.default.stepRange(t)})),r.default.secondRange(t[0]),r.default.minuteRange(t[1]),r.default.hourRange(t[2]),r.default.dayOfMonthRange(t[3]),r.default.monthRange(t[4],this.monthStartIndexZero),r.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},t.prototype.validateOnlyExpectedCharactersFound=function(t,e){var n=t.match(new RegExp("[^".concat(e,"]+"),"gi"));if(n&&n.length)throw new Error("Expression contains invalid values: '".concat(n.toString(),"'"))},t}();e.CronParser=o},8333(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.ExpressionDescriptor=void 0;var r=n(1823),o=n(6949),i=function(){function t(e,n){if(this.expression=e,this.options=n,this.expressionParts=new Array(5),!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var r=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=t.locales[this.options.locale],void 0===n.use24HourTimeFormat&&(n.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,n){var r=void 0===n?{}:n,o=r.throwExceptionOnParseError,i=void 0===o||o,a=r.verbose,s=void 0!==a&&a,u=r.dayOfWeekStartIndexZero,c=void 0===u||u,h=r.monthStartIndexZero,f=void 0!==h&&h,p=r.use24HourTimeFormat,l=r.trimHoursLeadingZero,d=void 0!==l&&l,m=r.locale,y=void 0===m?null:m,g=r.logicalAndDayFields,v={throwExceptionOnParseError:i,verbose:s,dayOfWeekStartIndexZero:c,monthStartIndexZero:f,use24HourTimeFormat:p,trimHoursLeadingZero:d,locale:y,logicalAndDayFields:void 0!==g&&g};return v.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported."),new t(e,v).getFullDescription()},t.initialize=function(e,n){void 0===n&&(n="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=n,e.load(t.locales)},t.prototype.getFullDescription=function(){var t,e,n="";try{var r=new o.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=r.parse(),"@reboot"===this.expressionParts[0])return(null===(e=(t=this.i18n).atReboot)||void 0===e?void 0:e.call(t))||"Run once, at startup";var i=this.getTimeOfDayDescription(),a=this.getDayOfMonthDescription(),s=this.getMonthDescription();n+=i+a+this.getDayOfWeekDescription()+s+this.getYearDescription(),n=(n=this.transformVerbosity(n,!!this.options.verbose)).charAt(0).toLocaleUpperCase()+n.substr(1)}catch(t){if(this.options.throwExceptionOnParseError)throw"".concat(t);n=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD()}return n},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],n=this.expressionParts[1],o=this.expressionParts[2],i="";if(r.StringUtilities.containsAny(n,t.specialCharacters)||r.StringUtilities.containsAny(o,t.specialCharacters)||r.StringUtilities.containsAny(e,t.specialCharacters))if(e||!(n.indexOf("-")>-1)||n.indexOf(",")>-1||n.indexOf("/")>-1||r.StringUtilities.containsAny(o,t.specialCharacters))if(!e&&o.indexOf(",")>-1&&-1==o.indexOf("-")&&-1==o.indexOf("/")&&!r.StringUtilities.containsAny(n,t.specialCharacters)){var a=o.split(",");i+=this.i18n.at();for(var s=0;s<a.length;s++)i&&(i+=" "),i+=this.formatTime(a[s],n,""),s<a.length-2&&(i+=","),s==a.length-2&&(i+=this.i18n.spaceAnd())}else{var u=this.getSecondsDescription(),c=this.getMinutesDescription(),h=this.getHoursDescription();if((i+=u)&&c&&(i+=", "),i+=c,c===h)return i;i&&h&&(i+=", "),i+=h}else{var f=n.split("-");i+=r.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(o,f[0],""),this.formatTime(o,f[1],""))}else i+=this.i18n.atSpace()+this.formatTime(o,n,e);return i},t.prototype.getSecondsDescription=function(){var t=this;return this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),(function(t){return t}),(function(e){return r.StringUtilities.format(t.i18n.everyX0Seconds(e),e)}),(function(e){return t.i18n.secondsX0ThroughX1PastTheMinute()}),(function(e){return"0"==e?"":parseInt(e)<20?t.i18n.atX0SecondsPastTheMinute(e):t.i18n.atX0SecondsPastTheMinuteGt20()||t.i18n.atX0SecondsPastTheMinute(e)}),{min:0,max:59})},t.prototype.getMinutesDescription=function(){var t=this,e=this.expressionParts[0],n=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),(function(t){return t}),(function(e){return r.StringUtilities.format(t.i18n.everyX0Minutes(e),e)}),(function(e){return t.i18n.minutesX0ThroughX1PastTheHour()}),(function(r){var o,i;try{return"0"==r&&-1==n.indexOf("/")&&""==e?t.i18n.everyHour():"0"==r?(null===(i=(o=t.i18n).onTheHour)||void 0===i?void 0:i.call(o))||t.i18n.atX0MinutesPastTheHour(r):parseInt(r)<20?t.i18n.atX0MinutesPastTheHour(r):t.i18n.atX0MinutesPastTheHourGt20()||t.i18n.atX0MinutesPastTheHour(r)}catch(e){return t.i18n.atX0MinutesPastTheHour(r)}}),{min:0,max:59})},t.prototype.getHoursDescription=function(){var t=this,e=this.expressionParts[2],n=0,o=[];e.split("/")[0].split(",").forEach((function(t){var e=t.split("-");2===e.length&&o.push({value:e[1],index:n+1}),n+=e.length}));var i=0;return this.getSegmentDescription(e,this.i18n.everyHour(),(function(e){var n=o.find((function(t){return t.value===e&&t.index===i}))&&"0"!==t.expressionParts[1];return i++,n?t.formatTime(e,"59",""):t.formatTime(e,"0","")}),(function(e){return r.StringUtilities.format(t.i18n.everyX0Hours(e),e)}),(function(e){return t.i18n.betweenX0AndX1()}),(function(e){return t.i18n.atX0()}),{min:0,max:23})},t.prototype.getDayOfWeekDescription=function(e){var n,o,i,a,s=this;void 0===e&&(e=this.expressionParts[5]);var u=this.i18n.daysOfTheWeek(),c=null;if("*"==e)c="";else{var h=e.split(","),f=h.filter((function(t){return/[#L]/.test(t)})),p=h.filter((function(t){return!/[#L]/.test(t)}));if(p.length>0&&f.some((function(t){return t.indexOf("#")>-1}))){var l=null!==(n=this.getDayOfWeekDescription(f.join(",")))&&void 0!==n?n:"";return(null!==(o=this.getDayOfWeekDescription(p.join(",")))&&void 0!==o?o:"")+"".concat(this.i18n.spaceAnd()," ")+t.removeLeadingComma(l)}var d=h.filter((function(t){return t.indexOf("L")>-1})),m=h.filter((function(t){return-1===t.indexOf("L")}));if(d.length>0&&m.length>0){var y=null!==(i=this.getDayOfWeekDescription(d.join(",")))&&void 0!==i?i:"";return(null!==(a=this.getDayOfWeekDescription(m.join(",")))&&void 0!==a?a:"")+"".concat(this.i18n.spaceAnd()," ")+t.removeLeadingComma(y)}c=this.getSegmentDescription(e,this.i18n.commaEveryDay(),(function(t,e){var n=t;t.indexOf("#")>-1?n=t.substring(0,t.indexOf("#")):t.indexOf("L")>-1&&(n=n.replace("L",""));var r=parseInt(n),o=s.i18n.daysOfTheWeekInCase?s.i18n.daysOfTheWeekInCase(e)[r]:u[r];if(t.indexOf("#")>-1){var i=null,a=t.substring(t.indexOf("#")+1),c=t.substring(0,t.indexOf("#"));switch(a){case"1":i=s.i18n.first(c);break;case"2":i=s.i18n.second(c);break;case"3":i=s.i18n.third(c);break;case"4":i=s.i18n.fourth(c);break;case"5":i=s.i18n.fifth(c)}o=i+" "+o}return o}),(function(t){return 1==parseInt(t)?"":r.StringUtilities.format(s.i18n.commaEveryX0DaysOfTheWeek(t),t)}),(function(t){var e=t.substring(0,t.indexOf("-"));return"*"!=s.expressionParts[3]?s.i18n.commaAndX0ThroughX1(e):s.i18n.commaX0ThroughX1(e)}),(function(t){var e=null;if(t.indexOf("#")>-1){var n=t.substring(t.indexOf("#")+1),r=t.substring(0,t.indexOf("#"));e=s.i18n.commaOnThe(n,r).trim()+s.i18n.spaceX0OfTheMonth()}else if(t.indexOf("L")>-1)e=s.i18n.commaOnTheLastX0OfTheMonth(t.split(",")[0].replace("L",""));else{e="*"!=s.expressionParts[3]?s.options.logicalAndDayFields?s.i18n.commaOnlyOnX0(t):s.i18n.commaAndOnX0():s.i18n.commaOnlyOnX0(t)}return e}))}return c},t.prototype.getMonthDescription=function(){var t=this,e=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],"",(function(n,r){return r&&t.i18n.monthsOfTheYearInCase?t.i18n.monthsOfTheYearInCase(r)[parseInt(n)-1]:e[parseInt(n)-1]}),(function(e){return 1==parseInt(e)?"":r.StringUtilities.format(t.i18n.commaEveryX0Months(e),e)}),(function(e){return t.i18n.commaMonthX0ThroughMonthX1()||t.i18n.commaX0ThroughX1()}),(function(e){return t.i18n.commaOnlyInMonthX0?t.i18n.commaOnlyInMonthX0():t.i18n.commaOnlyInX0()}))},t.removeLeadingComma=function(t){return t.replace(/^[,،,、] ?/,"")},t.hasLeadingComma=function(t){return/^[,،,、]/.test(t)},t.prototype.getDayOfMonthDescription=function(e){var n,o,i,a,s=this;void 0===e&&(e=this.expressionParts[3]);var u=null,c=e,h=c.split(",");if(h.length>1){var f=function(t){return/^L-\d{1,2}$/.test(t)},p=h.filter((function(t){return f(t)})),l=h.filter((function(t){return!f(t)})).sort((function(t,e){return Number(t.indexOf("L")>-1)-Number(e.indexOf("L")>-1)}));if(p.length>0)return(l.length>0?[l.join(",")]:[]).concat(p).map((function(t){var e;return null!==(e=s.getDayOfMonthDescription(t))&&void 0!==e?e:""})).filter((function(t){return""!==t})).map((function(e,n){return 0===n?e:"".concat(s.i18n.spaceAnd()," ")+t.removeLeadingComma(e)})).join("");c=l.join(",")}switch(c){case"L":u=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":u=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var d=c.match(/^(?:(\d{1,2})W|W(\d{1,2}))(?:([+-])(\d{1,2}))?$/);if(d){var m=parseInt(d[1]||d[2]),y=1==m?this.i18n.firstWeekday():r.StringUtilities.format(this.i18n.weekdayNearestDayX0(),m.toString()),g=d[4];u=g?"-"==d[3]?r.StringUtilities.format((null===(o=(n=this.i18n).commaDaysBeforeTheX0OfTheMonth)||void 0===o?void 0:o.call(n,g))||", %s days before the %s of the month",g,y):r.StringUtilities.format((null===(a=(i=this.i18n).commaDaysAfterTheX0OfTheMonth)||void 0===a?void 0:a.call(i,g))||", %s days after the %s of the month",g,y):r.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),y);break}var v=c.match(/L-(\d{1,2})/);if(v){var O=v[1];u=r.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(O),O);break}if("*"==c&&"*"!=this.expressionParts[5])return"";u=this.getSegmentDescription(c,this.i18n.commaEveryDay(),(function(t){return"L"==t?s.i18n.lastDay():s.i18n.dayX0?r.StringUtilities.format(s.i18n.dayX0(),t):t}),(function(t){return"1"==t?s.i18n.commaEveryDay():s.i18n.commaEveryX0Days(t)}),(function(t){return s.i18n.commaBetweenDayX0AndX1OfTheMonth(t)}),(function(t){return"L"==t?s.i18n.commaOnTheLastDayOfTheMonth():s.i18n.commaOnDayX0OfTheMonth(t)}))}return u},t.prototype.getYearDescription=function(){var t=this;return this.getSegmentDescription(this.expressionParts[6],"",(function(t){return/^\d+$/.test(t)?new Date(parseInt(t),1).getFullYear().toString():t}),(function(e){return r.StringUtilities.format(t.i18n.commaEveryX0Years(e),e)}),(function(e){return t.i18n.commaYearX0ThroughYearX1()||t.i18n.commaX0ThroughX1()}),(function(e){return t.i18n.commaOnlyInYearX0?t.i18n.commaOnlyInYearX0():t.i18n.commaOnlyInX0()}))},t.prototype.getSegmentDescription=function(e,n,o,i,a,s,u){var c=null,h=e.indexOf("/")>-1,f=e.indexOf("-")>-1,p=e.indexOf(",")>-1;if(e)if("*"===e)c=n;else if(h||f||p)if(p){for(var l=e.split(","),d="",m=this.i18n.spaceAnd(),y=0;y<l.length;y++)if(y>0&&l.length>2&&(d+=",",y<l.length-1&&(d+=" ")),y>0&&l.length>1&&(y==l.length-1||2==l.length)&&(d+=","==m&&l.length>2?" ":"".concat(m," ")),l[y].indexOf("/")>-1||l[y].indexOf("-")>-1){var g=l[y].indexOf("-")>-1&&-1==l[y].indexOf("/"),v=this.getSegmentDescription(l[y],n,o,i,g?this.i18n.commaX0ThroughX1:a,s);(g||y>0)&&(v=t.removeLeadingComma(v)),d+=v}else if(h){var O=this.getSegmentDescription(l[y],n,o,i,a,s);y>0&&O&&(O=t.removeLeadingComma(O)),d+=O}else d+=o(l[y]);c=h?d:r.StringUtilities.format(s(e),d)}else if(h){l=e.split("/");if(c=r.StringUtilities.format(i(l[1]),l[1]),l[0].indexOf("-")>-1){var x=this.generateRangeSegmentDescription(l[0],a,o);t.hasLeadingComma(x)||(c+=", "),c+=x}else if(-1==l[0].indexOf("*")){var T=r.StringUtilities.format(s(l[0]),o(l[0]));T=t.removeLeadingComma(T),c+=r.StringUtilities.format(this.i18n.commaStartingX0(),T)}c+=this.getWrappingIncrementDescription(e,u,n,o,i,a,s)}else f&&(c=this.generateRangeSegmentDescription(e,a,o));else c=r.StringUtilities.format(s(e),o(e));else c="";return c},t.prototype.getWrappingIncrementDescription=function(t,e,n,r,o,i,a){if(!this.options.verbose||!e)return"";var s=t.split("/"),u=s[0],c=s[1],h=parseInt(c),f=e.max-e.min+1,p="*"===u,l=Number.isInteger(h)&&h>1;if(!p||!l||l&&f%h==0)return"";for(var d=[],m=e.min;m<=e.max;m+=h)d.push(m);if(d.length<2)return"";var y=this.getSegmentDescription(d.join(","),n,r,o,i,a);return y?", ".concat(y):""},t.prototype.generateRangeSegmentDescription=function(t,e,n){var o="",i=t.split("-"),a=n(i[0],1),s=n(i[1],2),u=e(t);return o+=r.StringUtilities.format(u,a,s)},t.prototype.formatTime=function(t,e,n){var r=parseInt(t)+0,o=parseInt(e)+0;o>=60?(o-=60,r+=1):o<0&&(o+=60,r-=1),r>=24?r-=24:r<0&&(r=24+r);var i="",a=!1;this.options.use24HourTimeFormat||(i=(a=!(!this.i18n.setPeriodBeforeTime||!this.i18n.setPeriodBeforeTime()))?"".concat(this.getPeriod(r)," "):" ".concat(this.getPeriod(r)),r>12&&(r-=12),0===r&&(r=12));var s="";n&&(s=":".concat(("00"+n).substring(n.length)));var u=r.toString(),c=("00"+u).substring(u.length),h=o.toString(),f=("00"+h).substring(h.length),p=this.options.trimHoursLeadingZero?u:c;return"".concat(a?i:"").concat(p,":").concat(f).concat(s).concat(a?"":i)},t.prototype.transformVerbosity=function(t,e){if(!e&&(t=(t=(t=(t=t.replace(new RegExp(", ".concat(this.i18n.everyMinute(),"(?!\\s*[\\p{L}\\p{N}])"),"gu"),"")).replace(new RegExp(", ".concat(this.i18n.everyHour(),"(?!\\s*[\\p{L}\\p{N}])"),"gu"),"")).replace(new RegExp("".concat(this.i18n.commaEveryDay(),"(?!\\s*[\\p{L}\\p{N}])"),"gu"),"")).replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var n=0,r=Object.entries(this.i18n.conciseVerbosityReplacements());n<r.length;n++){var o=r[n],i=o[0],a=o[1];t=t.replace(new RegExp(i,"g"),a)}return t},t.prototype.getPeriod=function(t){return t>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},t.locales={},t}();e.ExpressionDescriptor=i},3747(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.enLocaleLoader=void 0;var r=n(9486),o=function(){function t(){}return t.prototype.load=function(t){t.en=new r.en},t}();e.enLocaleLoader=o},9486(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.en=void 0;var n=function(t){return 1===Number(t)},r=function(){function t(){}return t.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},t.prototype.atX0MinutesPastTheHourGt20=function(){return null},t.prototype.commaMonthX0ThroughMonthX1=function(){return null},t.prototype.commaYearX0ThroughYearX1=function(){return null},t.prototype.use24HourTimeFormatByDefault=function(){return!1},t.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},t.prototype.everyMinute=function(){return"every minute"},t.prototype.everyHour=function(){return"every hour"},t.prototype.atSpace=function(){return"At "},t.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},t.prototype.at=function(){return"At"},t.prototype.spaceAnd=function(){return" and"},t.prototype.everySecond=function(){return"every second"},t.prototype.everyX0Seconds=function(t){return n(t)?"every %s second":"every %s seconds"},t.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},t.prototype.atX0SecondsPastTheMinute=function(t){return n(t)?"at %s second past the minute":"at %s seconds past the minute"},t.prototype.everyX0Minutes=function(t){return n(t)?"every %s minute":"every %s minutes"},t.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},t.prototype.atX0MinutesPastTheHour=function(t){return n(t)?"at %s minute past the hour":"at %s minutes past the hour"},t.prototype.everyX0Hours=function(t){return n(t)?"every %s hour":"every %s hours"},t.prototype.betweenX0AndX1=function(){return"between %s and %s"},t.prototype.atX0=function(){return"at %s"},t.prototype.commaEveryDay=function(){return", every day"},t.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},t.prototype.commaX0ThroughX1=function(){return", %s through %s"},t.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},t.prototype.first=function(){return"first"},t.prototype.second=function(){return"second"},t.prototype.third=function(){return"third"},t.prototype.fourth=function(){return"fourth"},t.prototype.fifth=function(){return"fifth"},t.prototype.commaOnThe=function(){return", on the "},t.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},t.prototype.lastDay=function(){return"the last day"},t.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},t.prototype.commaOnlyOnX0=function(){return", only on %s"},t.prototype.commaAndOnX0=function(){return", and on %s"},t.prototype.commaEveryX0Months=function(){return", every %s months"},t.prototype.commaOnlyInX0=function(){return", only in %s"},t.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},t.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},t.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(t){return n(t)?", %s day before the last day of the month":", %s days before the last day of the month"},t.prototype.firstWeekday=function(){return"first weekday"},t.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},t.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},t.prototype.commaDaysBeforeTheX0OfTheMonth=function(t){return n(t)?", %s day before the %s of the month":", %s days before the %s of the month"},t.prototype.commaDaysAfterTheX0OfTheMonth=function(t){return n(t)?", %s day after the %s of the month":", %s days after the %s of the month"},t.prototype.commaEveryX0Days=function(){return", every %s days in a month"},t.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},t.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},t.prototype.commaEveryHour=function(){return", every hour"},t.prototype.commaEveryX0Years=function(t){return n(t)?", every %s year":", every %s years"},t.prototype.commaStartingX0=function(){return", starting %s"},t.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},t.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},t.prototype.atReboot=function(){return"Run once, at startup"},t.prototype.onTheHour=function(){return"on the hour"},t}();e.en=r},9515(t,e){function n(t,e){if(!t)throw new Error(e)}function r(t){var e=[];if(!isNaN(parseInt(t,10))){e.push(parseInt(t,10));var n=t.match(/^\d+-(-?\d+)/);n&&e.push(parseInt(n[1],10))}return e}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(){}return t.stepRange=function(t){for(var e=t.split(","),r=0;r<e.length;r++){var o=e[r].split("/")[1];n(void 0===o||!/^0+$/.test(o),"step value must be greater than 0")}},t.secondRange=function(t){for(var e=t.split(","),o=0;o<e.length;o++)for(var i=0,a=r(e[o]);i<a.length;i++){var s=a[i];n(s>=0&&s<=59,"seconds part must be >= 0 and <= 59")}},t.minuteRange=function(t){for(var e=t.split(","),o=0;o<e.length;o++)for(var i=0,a=r(e[o]);i<a.length;i++){var s=a[i];n(s>=0&&s<=59,"minutes part must be >= 0 and <= 59")}},t.hourRange=function(t){for(var e=t.split(","),o=0;o<e.length;o++)for(var i=0,a=r(e[o]);i<a.length;i++){var s=a[i];n(s>=0&&s<=23,"hours part must be >= 0 and <= 23")}},t.dayOfMonthRange=function(t){for(var e=t.split(","),o=0;o<e.length;o++)for(var i=0,a=r(e[o]);i<a.length;i++){var s=a[i];n(s>=1&&s<=31,"DOM part must be >= 1 and <= 31")}},t.monthRange=function(t,e){for(var o=t.split(","),i=0;i<o.length;i++)for(var a=0,s=r(o[i]);a<s.length;a++){var u=s[a];n(u>=1&&u<=12,e?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},t.dayOfWeekRange=function(t,e){for(var o=t.split(","),i=0;i<o.length;i++){if(o[i].indexOf("#")>-1){var a=o[i].substring(o[i].indexOf("#")+1);n(/^[1-5]$/.test(a),"DOW nth weekday must be >= 1 and <= 5")}for(var s=0,u=r(o[i]);s<u.length;s++){var c=u[s];n(c>=0&&c<=6,e?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}}},t}();e.default=o},1823(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.StringUtilities=void 0;var n=function(){function t(){}return t.format=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.replace(/%s/g,(function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return e.shift()}))},t.containsAny=function(t,e){return e.some((function(e){return t.indexOf(e)>-1}))},t}();e.StringUtilities=n}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}var r={};return(()=>{var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.toString=void 0;var e=n(8333),o=n(3747);e.ExpressionDescriptor.initialize(new o.enLocaleLoader),t.default=e.ExpressionDescriptor;var i=e.ExpressionDescriptor.toString;t.toString=i})(),r})()));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("cronstrue",[],e):"object"==typeof exports?exports.cronstrue=e():t.cronstrue=e()}(globalThis,(()=>(()=>{"use strict";var t={6949(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.CronParser=void 0;var r=n(9515),o={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6},i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12},a={4:"12",5:"6",6:"9999"},s=function(){function t(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=!1),this.expression=t,this.dayOfWeekStartIndexZero=e,this.monthStartIndexZero=n}return t.prototype.parse=function(){var t,e,n=null!==(t=this.expression)&&void 0!==t?t:"";if("@reboot"===n)return e=["@reboot","","","","","",""];if(n.startsWith("@")){var r=this.parseSpecial(this.expression);e=this.extractParts(r)}else e=this.extractParts(this.expression);return this.normalize(e),this.validate(e),e},t.prototype.parseSpecial=function(t){var e={"@yearly":"0 0 1 JAN *","@annually":"0 0 1 JAN *","@monthly":"0 0 1 * *","@weekly":"0 0 * * SUN","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"}[t];if(!e)throw new Error("Unknown special expression.");return e},t.prototype.extractParts=function(t){if(!this.expression)throw new Error("cron expression is empty");for(var e=t.trim().split(/[ ]+/),n=0;n<e.length;n++)if(e[n].includes(",")){var r=e[n].split(",").map((function(t){return t.trim()})).filter((function(t){return""!==t})).map((function(t){return isNaN(Number(t))?t:Number(t)})).filter((function(t){return null!==t&&""!==t}));0===r.length&&r.push("*"),r.sort((function(t,e){return null!==t&&null!==e?t-e:0})),e[n]=r.map((function(t){return null!==t?t.toString():""})).join(",")}if(e.length<5)throw new Error("Expression has only ".concat(e.length," part").concat(1==e.length?"":"s",". At least 5 parts are required."));if(5==e.length)e.unshift(""),e.push("");else if(6==e.length){/\d{4}$/.test(e[5])||"?"==e[4]||"?"==e[2]?e.unshift(""):e.push("")}else if(e.length>7)throw new Error("Expression has ".concat(e.length," parts; too many!"));return e},t.prototype.normalize=function(t){for(var e=this,n=0;n<t.length;n++)t[n]=t[n].toUpperCase();t[3]=t[3].replace("?","*"),t[5]=t[5].replace("?","*"),t[2]=t[2].replace("?","*");var r={0:"0/",1:"0/",2:"0/",3:"1/",6:"1/"};this.monthStartIndexZero||(r[4]="1/");for(var s=0,u=Object.keys(r).map(Number);s<u.length;s++){var c=u[s];0==t[c].indexOf(r[c])&&(t[c]=t[c].replace(r[c],"*/"))}this.dayOfWeekStartIndexZero&&(t[5]=t[5].split(",").map((function(t){return t.replace(/^0-7(?=\/|$)/,"0-6")})).join(",")),t[5]=t[5].replace(/(^\d+)|([^#/\s\d]\d+)/g,(function(t){var n=t.replace(/\D/,""),r=n;return e.dayOfWeekStartIndexZero?"7"==n&&(r="0"):r=(parseInt(n)-1).toString(),t.replace(n,r)})),t[5]=t[5].split(",").map((function(t){return"L"==t?"6":t})).join(",");if(t[3].indexOf("W")>-1&&(t[3].indexOf(",")>-1||/[-+]/.test(t[3]))&&!/^\d{1,2}W[+-]\d{1,2}$/.test(t[3]))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");for(var h in o)t[5]=t[5].replace(new RegExp(h,"gi"),o[h].toString());for(var f in t[5]=t[5].split(",").filter((function(t,e,n){return""===t||n.indexOf(t)===e})).join(","),t[4]=t[4].replace(/(^\d{1,2})|([^#/\s\d]\d{1,2})/g,(function(t){var n=t.replace(/\D/,""),r=n;return e.monthStartIndexZero&&(r=(parseInt(n)+1).toString()),t.replace(n,r)})),i)t[4]=t[4].replace(new RegExp(f,"gi"),i[f].toString());"0"==t[0]&&(t[0]=""),/\*|\-|\,|\//.test(t[2])||!/\*|\//.test(t[1])&&!/\*|\//.test(t[0])||(t[2]+="-".concat(t[2]));for(n=0;n<t.length;n++){-1!=t[n].indexOf(",")&&(t[n]=t[n].split(",").filter((function(t){return""!==t})).join(",")||"*"),"*/1"==t[n]&&(t[n]="*");var p=a[n];if(p&&t[n].indexOf("/")>-1&&!/^\*|\-|\,/.test(t[n])){var l=t[n].split("/");t[n]="".concat(l[0],"-").concat(p,"/").concat(l[1])}}},t.prototype.validate=function(t){var e="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(t[0],e),this.validateOnlyExpectedCharactersFound(t[1],e),this.validateOnlyExpectedCharactersFound(t[2],e),this.validateOnlyExpectedCharactersFound(t[3].replace(/^(\d{1,2}W)[+-]\d{1,2}$/,"$1"),"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(t[4],e),this.validateOnlyExpectedCharactersFound(t[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(t[6],e),this.validateAnyRanges(t)},t.prototype.validateAnyRanges=function(t){t.forEach((function(t){return r.default.stepRange(t)})),r.default.secondRange(t[0]),r.default.minuteRange(t[1]),r.default.hourRange(t[2]),r.default.dayOfMonthRange(t[3]),r.default.monthRange(t[4],this.monthStartIndexZero),r.default.dayOfWeekRange(t[5],this.dayOfWeekStartIndexZero)},t.prototype.validateOnlyExpectedCharactersFound=function(t,e){var n=t.match(new RegExp("[^".concat(e,"]+"),"gi"));if(n&&n.length)throw new Error("Expression contains invalid values: '".concat(n.toString(),"'"))},t}();e.CronParser=s},8333(t,e,n){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.ExpressionDescriptor=void 0;var o=n(1823),i=n(6949),a=new(n(9486).en),s=function(){function t(e,n){if(this.expression=e,this.options=n,this.expressionParts=[],!this.options.locale&&t.defaultLocale&&(this.options.locale=t.defaultLocale),!t.locales[this.options.locale]){var r=Object.keys(t.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(r,"'.")),this.options.locale=r}this.i18n=t.locales[this.options.locale],void 0===n.use24HourTimeFormat&&(n.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return t.toString=function(e,n){var r=void 0===n?{}:n,o=r.throwExceptionOnParseError,i=void 0===o||o,a=r.verbose,s=void 0!==a&&a,u=r.dayOfWeekStartIndexZero,c=void 0===u||u,h=r.monthStartIndexZero,f=void 0!==h&&h,p=r.use24HourTimeFormat,l=r.trimHoursLeadingZero,m=void 0!==l&&l,d=r.locale,y=void 0===d?null:d,g=r.logicalAndDayFields;return new t(e,{throwExceptionOnParseError:i,verbose:s,dayOfWeekStartIndexZero:c,monthStartIndexZero:f,use24HourTimeFormat:p,trimHoursLeadingZero:m,locale:y,logicalAndDayFields:void 0!==g&&g}).getFullDescription()},t.initialize=function(e,n){void 0===n&&(n="en"),t.specialCharacters=["/","-",",","*"],t.defaultLocale=n,e.load(t.locales)},t.prototype.getFullDescription=function(){var t,e,n="";try{var r=new i.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=r.parse(),"@reboot"===this.expressionParts[0])return(null===(e=(t=this.i18n).atReboot)||void 0===e?void 0:e.call(t))||a.atReboot();var o=this.getTimeOfDayDescription(),s=this.getDayOfMonthDescription(),u=this.getMonthDescription();n+=o+s+this.getDayOfWeekDescription()+u+this.getYearDescription(),n=(n=this.transformVerbosity(n,!!this.options.verbose)).charAt(0).toLocaleUpperCase()+n.substring(1)}catch(t){if(this.options.throwExceptionOnParseError)throw"".concat(t);n=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD()}return n},t.prototype.getTimeOfDayDescription=function(){var e=this.expressionParts[0],n=this.expressionParts[1],r=this.expressionParts[2],i="";if(o.StringUtilities.containsAny(n,t.specialCharacters)||o.StringUtilities.containsAny(r,t.specialCharacters)||o.StringUtilities.containsAny(e,t.specialCharacters))if(e||!(n.indexOf("-")>-1)||n.indexOf(",")>-1||n.indexOf("/")>-1||o.StringUtilities.containsAny(r,t.specialCharacters))if(!e&&r.indexOf(",")>-1&&-1==r.indexOf("-")&&-1==r.indexOf("/")&&!o.StringUtilities.containsAny(n,t.specialCharacters)){var a=r.split(",");i+=this.i18n.at();for(var s=0;s<a.length;s++)i&&(i+=" "),i+=this.formatTime(a[s],n,""),s<a.length-2&&(i+=","),s==a.length-2&&(i+=this.i18n.spaceAnd())}else{var u=this.getSecondsDescription(),c=this.getMinutesDescription(),h=this.getHoursDescription();if((i+=u)&&c&&(i+=", "),i+=c,c===h)return i;i&&h&&(i+=", "),i+=h}else{var f=n.split("-");i+=o.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(r,f[0],""),this.formatTime(r,f[1],""))}else i+=this.i18n.atSpace()+this.formatTime(r,n,e);return i},t.prototype.getSecondsDescription=function(){var t=this;return this.getSegmentDescription(this.expressionParts[0],{all:this.i18n.everySecond(),single:function(t){return t},increment:function(e){return o.StringUtilities.format(t.i18n.everyX0Seconds(e),e)},range:function(){return t.i18n.secondsX0ThroughX1PastTheMinute()},format:function(e){var n,r;return"0"==e?"":parseInt(e)<20?t.i18n.atX0SecondsPastTheMinute(e):(null===(r=(n=t.i18n).atX0SecondsPastTheMinuteGt20)||void 0===r?void 0:r.call(n))||t.i18n.atX0SecondsPastTheMinute(e)},bounds:{min:0,max:59}})},t.prototype.getMinutesDescription=function(){var t=this,e=this.expressionParts[0],n=this.expressionParts[2];return this.getSegmentDescription(this.expressionParts[1],{all:this.i18n.everyMinute(),single:function(t){return t},increment:function(e){return o.StringUtilities.format(t.i18n.everyX0Minutes(e),e)},range:function(){return t.i18n.minutesX0ThroughX1PastTheHour()},format:function(r){var o,i,a,s;return"0"==r&&-1==n.indexOf("/")&&""==e?t.i18n.everyHour():"0"==r?(null===(i=(o=t.i18n).onTheHour)||void 0===i?void 0:i.call(o))||t.i18n.atX0MinutesPastTheHour(r):parseInt(r)<20?t.i18n.atX0MinutesPastTheHour(r):(null===(s=(a=t.i18n).atX0MinutesPastTheHourGt20)||void 0===s?void 0:s.call(a))||t.i18n.atX0MinutesPastTheHour(r)},bounds:{min:0,max:59}})},t.prototype.getHoursDescription=function(){var t=this,e=this.expressionParts[2],n=0,r=[];e.split("/")[0].split(",").forEach((function(t){var e=t.split("-");2===e.length&&r.push({value:e[1],index:n+1}),n+=e.length}));var i=0;return this.getSegmentDescription(e,{all:this.i18n.everyHour(),single:function(e){var n=r.find((function(t){return t.value===e&&t.index===i}))&&"0"!==t.expressionParts[1];return i++,n?t.formatTime(e,"59",""):t.formatTime(e,"0","")},increment:function(e){return o.StringUtilities.format(t.i18n.everyX0Hours(e),e)},range:function(){return t.i18n.betweenX0AndX1()},format:function(){return t.i18n.atX0()},bounds:{min:0,max:23}})},t.prototype.getDayOfWeekDescription=function(e){var n=this;void 0===e&&(e=this.expressionParts[5]);var r=this.i18n.daysOfTheWeek(),i=null;if("*"==e)i="";else{var a=e.split(","),s=function(e,r){var o,i;return(null!==(o=n.getDayOfWeekDescription(e.join(",")))&&void 0!==o?o:"")+"".concat(n.i18n.spaceAnd()," ")+t.removeLeadingComma(null!==(i=n.getDayOfWeekDescription(r.join(",")))&&void 0!==i?i:"")},u=a.filter((function(t){return/[#L]/.test(t)})),c=a.filter((function(t){return!/[#L]/.test(t)}));if(c.length>0&&u.some((function(t){return t.indexOf("#")>-1})))return s(c,u);var h=a.filter((function(t){return t.indexOf("L")>-1})),f=a.filter((function(t){return-1===t.indexOf("L")}));if(h.length>0&&f.length>0)return s(f,h);var p="*"!=this.expressionParts[3]&&!this.options.logicalAndDayFields&&-1==e.indexOf(","),l=e.split("/"),m=l.length>1&&1!=parseInt(l[1]),d=this.getAndPrefix();i=this.getSegmentDescription(e,{all:this.i18n.commaEveryDay(),single:function(e,o){var i=e;e.indexOf("#")>-1?i=e.substring(0,e.indexOf("#")):e.indexOf("L")>-1&&(i=i.replace("L",""));var a=parseInt(i),s=n.i18n.daysOfTheWeekInCase?n.i18n.daysOfTheWeekInCase(o)[a]:r[a];if(e.indexOf("#")>-1){var u=parseInt(e.substring(e.indexOf("#")+1)),c=e.substring(0,e.indexOf("#")),h=t.ordinals[u-1];s=n.i18n[h](c)+" "+s}return s},increment:function(e){if(1==parseInt(e))return"";var r=n.i18n.commaEveryX0DaysOfTheWeek(e);return o.StringUtilities.format(p&&d?d+t.removeLeadingComma(r):r,e)},range:function(t){var e=t.substring(0,t.indexOf("-"));return!p||m&&d?n.i18n.commaX0ThroughX1(e):n.i18n.commaAndX0ThroughX1(e)},format:function(t){var e=null;if(t.indexOf("#")>-1){var r=t.substring(t.indexOf("#")+1),o=t.substring(0,t.indexOf("#"));e=n.i18n.commaOnThe(r,o).trim()+n.i18n.spaceX0OfTheMonth()}else if(t.indexOf("L")>-1)e=n.i18n.commaOnTheLastX0OfTheMonth(t.split(",")[0].replace("L",""));else{e="*"!=n.expressionParts[3]?n.options.logicalAndDayFields?n.i18n.commaOnlyOnX0(t):n.i18n.commaAndOnX0():n.i18n.commaOnlyOnX0(t)}return e}})}return i},t.prototype.getMonthDescription=function(){var t=this,e=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],{all:"",single:function(n,r){return r&&t.i18n.monthsOfTheYearInCase?t.i18n.monthsOfTheYearInCase(r)[parseInt(n)-1]:e[parseInt(n)-1]},increment:function(e){return 1==parseInt(e)?"":o.StringUtilities.format(t.i18n.commaEveryX0Months(e),e)},range:function(){var e,n;return(null===(n=(e=t.i18n).commaMonthX0ThroughMonthX1)||void 0===n?void 0:n.call(e))||t.i18n.commaX0ThroughX1()},format:function(){return t.i18n.commaOnlyInMonthX0?t.i18n.commaOnlyInMonthX0():t.i18n.commaOnlyInX0()}})},t.prototype.getAndPrefix=function(){var e=this.i18n.commaX0ThroughX1(),n=this.i18n.commaAndX0ThroughX1(),r=t.removeLeadingComma(e);return n==e||n.length<=r.length||n.slice(-r.length)!=r?null:n.slice(0,-r.length)},t.removeLeadingComma=function(t){return t.replace(/^[,،,、] ?/,"")},t.hasLeadingComma=function(t){return/^[,،,、]/.test(t)},t.prototype.getDayOfMonthDescription=function(e){var n,r,i,s,u=this;void 0===e&&(e=this.expressionParts[3]);var c=null,h=e,f=h.split(",");if(f.length>1){var p=function(t){return/^L-\d{1,2}$/.test(t)},l=f.filter((function(t){return p(t)})),m=f.filter((function(t){return!p(t)})).sort((function(t,e){return Number(t.indexOf("L")>-1)-Number(e.indexOf("L")>-1)}));if(l.length>0)return(m.length>0?[m.join(",")]:[]).concat(l).map((function(t){var e;return null!==(e=u.getDayOfMonthDescription(t))&&void 0!==e?e:""})).filter((function(t){return""!==t})).map((function(e,n){return 0===n?e:"".concat(u.i18n.spaceAnd()," ")+t.removeLeadingComma(e)})).join("");h=m.join(",")}switch(h){case"L":c=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":c=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var d=h.match(/^(?:(\d{1,2})W|W(\d{1,2}))(?:([+-])(\d{1,2}))?$/);if(d){var y=parseInt(d[1]||d[2]),g=1==y?this.i18n.firstWeekday():o.StringUtilities.format(this.i18n.weekdayNearestDayX0(),y.toString()),v=d[4];c=v?"-"==d[3]?o.StringUtilities.format((null===(r=(n=this.i18n).commaDaysBeforeTheX0OfTheMonth)||void 0===r?void 0:r.call(n,v))||a.commaDaysBeforeTheX0OfTheMonth(v),v,g):o.StringUtilities.format((null===(s=(i=this.i18n).commaDaysAfterTheX0OfTheMonth)||void 0===s?void 0:s.call(i,v))||a.commaDaysAfterTheX0OfTheMonth(v),v,g):o.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),g);break}var O=h.match(/L-(\d{1,2})/);if(O){var x=O[1];c=o.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(x),x);break}if("*"==h&&"*"!=this.expressionParts[5])return"";c=this.getSegmentDescription(h,{all:this.i18n.commaEveryDay(),single:function(t){return"L"==t?u.i18n.lastDay():u.i18n.dayX0?o.StringUtilities.format(u.i18n.dayX0(),t):t},increment:function(t){return"1"==t?u.i18n.commaEveryDay():u.i18n.commaEveryX0Days(t)},range:function(t){return u.i18n.commaBetweenDayX0AndX1OfTheMonth(t)},format:function(t){return"L"==t?u.i18n.commaOnTheLastDayOfTheMonth():u.i18n.commaOnDayX0OfTheMonth(t)}})}return c},t.prototype.getYearDescription=function(){var t=this;return this.getSegmentDescription(this.expressionParts[6],{all:"",single:function(t){return/^\d+$/.test(t)?new Date(parseInt(t),1).getFullYear().toString():t},increment:function(e){return o.StringUtilities.format(t.i18n.commaEveryX0Years(e),e)},range:function(){var e,n;return(null===(n=(e=t.i18n).commaYearX0ThroughYearX1)||void 0===n?void 0:n.call(e))||t.i18n.commaX0ThroughX1()},format:function(){return t.i18n.commaOnlyInYearX0?t.i18n.commaOnlyInYearX0():t.i18n.commaOnlyInX0()}})},t.prototype.getSegmentDescription=function(e,n){var i=r(r({},n),{bounds:void 0}),a=null,s=e.indexOf("/")>-1,u=e.indexOf("-")>-1,c=e.indexOf(",")>-1;if(e)if("*"===e)a=n.all;else if(s||u||c)if(c){for(var h=e.split(","),f="",p=this.i18n.spaceAnd(),l=0;l<h.length;l++)if(l>0&&h.length>2&&(f+=",",l<h.length-1&&(f+=" ")),l>0&&h.length>1&&(l==h.length-1||2==h.length)&&(f+=","==p&&h.length>2?" ":"".concat(p," ")),h[l].indexOf("/")>-1||h[l].indexOf("-")>-1){var m=h[l].indexOf("-")>-1&&-1==h[l].indexOf("/"),d=this.getSegmentDescription(h[l],m?r(r({},i),{range:this.i18n.commaX0ThroughX1}):i);(m||l>0)&&(d=t.removeLeadingComma(d)),f+=d}else if(s){var y=this.getSegmentDescription(h[l],i);l>0&&y&&(y=t.removeLeadingComma(y)),f+=y}else f+=n.single(h[l]);a=s?f:o.StringUtilities.format(n.format(e),f)}else if(s){h=e.split("/");if(a=o.StringUtilities.format(n.increment(h[1]),h[1]),h[0].indexOf("-")>-1){var g=this.generateRangeSegmentDescription(h[0],n);t.hasLeadingComma(g)||(a+=", "),a+=g}else if(-1==h[0].indexOf("*")){var v=o.StringUtilities.format(n.format(h[0]),n.single(h[0]));v=t.removeLeadingComma(v),a+=o.StringUtilities.format(this.i18n.commaStartingX0(),v)}a+=this.getWrappingIncrementDescription(e,n)}else u&&(a=this.generateRangeSegmentDescription(e,n));else a=o.StringUtilities.format(n.format(e),n.single(e));else a="";return a},t.prototype.getWrappingIncrementDescription=function(t,e){var n=e.bounds;if(!this.options.verbose||!n)return"";var o=t.split("/"),i=o[0],a=o[1],s=parseInt(a),u=n.max-n.min+1,c="*"===i,h=Number.isInteger(s)&&s>1;if(!c||!h||h&&u%s==0)return"";for(var f=[],p=n.min;p<=n.max;p+=s)f.push(p);if(f.length<2)return"";var l=this.getSegmentDescription(f.join(","),r(r({},e),{bounds:void 0}));return l?", ".concat(l):""},t.prototype.generateRangeSegmentDescription=function(t,e){var n=t.split("-");return o.StringUtilities.format(e.range(t),e.single(n[0],1),e.single(n[1],2))},t.prototype.formatTime=function(t,e,n){var r=parseInt(t),o=parseInt(e),i="",a=!1;this.options.use24HourTimeFormat||(i=(a=!(!this.i18n.setPeriodBeforeTime||!this.i18n.setPeriodBeforeTime()))?"".concat(this.getPeriod(r)," "):" ".concat(this.getPeriod(r)),r>12&&(r-=12),0===r&&(r=12));var s="";n&&(s=":".concat(("00"+n).substring(n.length)));var u=r.toString(),c=("00"+u).substring(u.length),h=o.toString(),f=("00"+h).substring(h.length),p=this.options.trimHoursLeadingZero?u:c;return"".concat(a?i:"").concat(p,":").concat(f).concat(s).concat(a?"":i)},t.prototype.transformVerbosity=function(t,e){if(!e&&(t=(t=(t=(t=t.replace(new RegExp(", ".concat(this.i18n.everyMinute(),"(?!\\s*[\\p{L}\\p{N}])"),"gu"),"")).replace(new RegExp(", ".concat(this.i18n.everyHour(),"(?!\\s*[\\p{L}\\p{N}])"),"gu"),"")).replace(new RegExp("".concat(this.i18n.commaEveryDay(),"(?!\\s*[\\p{L}\\p{N}])"),"gu"),"")).replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var n=0,r=Object.entries(this.i18n.conciseVerbosityReplacements());n<r.length;n++){var o=r[n],i=o[0],a=o[1];t=t.replace(new RegExp(i,"g"),a)}return t},t.prototype.getPeriod=function(t){var e,n,r,o;return t>=12?(null===(n=(e=this.i18n).pm)||void 0===n?void 0:n.call(e))||a.pm():(null===(o=(r=this.i18n).am)||void 0===o?void 0:o.call(r))||a.am()},t.locales={},t.ordinals=["first","second","third","fourth","fifth"],t}();e.ExpressionDescriptor=s},3747(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.enLocaleLoader=void 0;var r=n(9486),o=function(){function t(){}return t.prototype.load=function(t){t.en=new r.en},t}();e.enLocaleLoader=o},9486(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.en=void 0;var n=function(t){return 1===Number(t)},r=function(){function t(){}return t.prototype.use24HourTimeFormatByDefault=function(){return!1},t.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},t.prototype.everyMinute=function(){return"every minute"},t.prototype.everyHour=function(){return"every hour"},t.prototype.atSpace=function(){return"At "},t.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},t.prototype.at=function(){return"At"},t.prototype.spaceAnd=function(){return" and"},t.prototype.everySecond=function(){return"every second"},t.prototype.everyX0Seconds=function(t){return n(t)?"every %s second":"every %s seconds"},t.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},t.prototype.atX0SecondsPastTheMinute=function(t){return n(t)?"at %s second past the minute":"at %s seconds past the minute"},t.prototype.everyX0Minutes=function(t){return n(t)?"every %s minute":"every %s minutes"},t.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},t.prototype.atX0MinutesPastTheHour=function(t){return n(t)?"at %s minute past the hour":"at %s minutes past the hour"},t.prototype.everyX0Hours=function(t){return n(t)?"every %s hour":"every %s hours"},t.prototype.betweenX0AndX1=function(){return"between %s and %s"},t.prototype.atX0=function(){return"at %s"},t.prototype.commaEveryDay=function(){return", every day"},t.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},t.prototype.commaX0ThroughX1=function(){return", %s through %s"},t.prototype.commaAndX0ThroughX1=function(){return", and %s through %s"},t.prototype.first=function(){return"first"},t.prototype.second=function(){return"second"},t.prototype.third=function(){return"third"},t.prototype.fourth=function(){return"fourth"},t.prototype.fifth=function(){return"fifth"},t.prototype.commaOnThe=function(){return", on the "},t.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},t.prototype.lastDay=function(){return"the last day"},t.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},t.prototype.commaOnlyOnX0=function(){return", only on %s"},t.prototype.commaAndOnX0=function(){return", and on %s"},t.prototype.commaEveryX0Months=function(){return", every %s months"},t.prototype.commaOnlyInX0=function(){return", only in %s"},t.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},t.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},t.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(t){return n(t)?", %s day before the last day of the month":", %s days before the last day of the month"},t.prototype.firstWeekday=function(){return"first weekday"},t.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},t.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},t.prototype.commaDaysBeforeTheX0OfTheMonth=function(t){return n(t)?", %s day before the %s of the month":", %s days before the %s of the month"},t.prototype.commaDaysAfterTheX0OfTheMonth=function(t){return n(t)?", %s day after the %s of the month":", %s days after the %s of the month"},t.prototype.commaEveryX0Days=function(){return", every %s days in a month"},t.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},t.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},t.prototype.commaEveryHour=function(){return", every hour"},t.prototype.commaEveryX0Years=function(t){return n(t)?", every %s year":", every %s years"},t.prototype.commaStartingX0=function(){return", starting %s"},t.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},t.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},t.prototype.am=function(){return"AM"},t.prototype.pm=function(){return"PM"},t.prototype.atReboot=function(){return"Run once, at startup"},t.prototype.onTheHour=function(){return"on the hour"},t}();e.en=r},9515(t,e){function n(t,e){if(!t)throw new Error(e)}function r(t){var e=[];if(!isNaN(parseInt(t,10))){e.push(parseInt(t,10));var n=t.match(/^\d+-(-?\d+)/);n&&e.push(parseInt(n[1],10))}return e}function o(t,e,o,i){for(var a=0,s=t.split(",");a<s.length;a++)for(var u=0,c=r(s[a]);u<c.length;u++){var h=c[u];n(h>=e&&h<=o,i)}}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(){}return t.stepRange=function(t){for(var e=0,r=t.split(",");e<r.length;e++){var o=r[e].split("/")[1];n(void 0===o||!/^0+$/.test(o),"step value must be greater than 0")}},t.secondRange=function(t){o(t,0,59,"seconds part must be >= 0 and <= 59")},t.minuteRange=function(t){o(t,0,59,"minutes part must be >= 0 and <= 59")},t.hourRange=function(t){o(t,0,23,"hours part must be >= 0 and <= 23")},t.dayOfMonthRange=function(t){o(t,1,31,"DOM part must be >= 1 and <= 31")},t.monthRange=function(t,e){o(t,1,12,e?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")},t.dayOfWeekRange=function(t,e){for(var r=0,i=t.split(",");r<i.length;r++){var a=i[r];if(a.indexOf("#")>-1){var s=a.substring(a.indexOf("#")+1);n(/^[1-5]$/.test(s),"DOW nth weekday must be >= 1 and <= 5")}}o(t,0,6,e?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")},t}();e.default=i},1823(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.StringUtilities=void 0;var n=function(){function t(){}return t.format=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.replace(/%s/g,(function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return e.shift()}))},t.containsAny=function(t,e){return e.some((function(e){return t.indexOf(e)>-1}))},t}();e.StringUtilities=n}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}var r={};return(()=>{var t=r;Object.defineProperty(t,"__esModule",{value:!0}),t.toString=void 0;var e=n(8333),o=n(3747);e.ExpressionDescriptor.initialize(new o.enLocaleLoader),t.default=e.ExpressionDescriptor;var i=e.ExpressionDescriptor.toString;t.toString=i})(),r})()));
|
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
import { Options } from "./options";
|
|
2
2
|
import { Locale } from "./i18n/locale";
|
|
3
3
|
import { LocaleLoader } from "./i18n/localeLoader";
|
|
4
|
+
interface SegmentDescribers {
|
|
5
|
+
all: string;
|
|
6
|
+
single: (t: string, form?: number) => string;
|
|
7
|
+
increment: (t: string) => string;
|
|
8
|
+
range: (t: string) => string;
|
|
9
|
+
format: (t: string) => string;
|
|
10
|
+
bounds?: {
|
|
11
|
+
min: number;
|
|
12
|
+
max: number;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
4
15
|
export declare class ExpressionDescriptor {
|
|
5
16
|
static locales: {
|
|
6
17
|
[name: string]: Locale;
|
|
7
18
|
};
|
|
8
19
|
static defaultLocale: string;
|
|
9
20
|
static specialCharacters: string[];
|
|
21
|
+
private static readonly ordinals;
|
|
10
22
|
expression: string;
|
|
11
23
|
expressionParts: string[];
|
|
12
24
|
options: Options;
|
|
@@ -21,20 +33,16 @@ export declare class ExpressionDescriptor {
|
|
|
21
33
|
protected getHoursDescription(): string;
|
|
22
34
|
protected getDayOfWeekDescription(dayOfWeekExpression?: string): string | null;
|
|
23
35
|
protected getMonthDescription(): string;
|
|
36
|
+
private getAndPrefix;
|
|
24
37
|
private static removeLeadingComma;
|
|
25
38
|
private static hasLeadingComma;
|
|
26
39
|
protected getDayOfMonthDescription(dayOfMonthExpression?: string): string | null;
|
|
27
40
|
protected getYearDescription(): string;
|
|
28
|
-
protected getSegmentDescription(expression: string,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}): string | null;
|
|
32
|
-
protected getWrappingIncrementDescription(expression: string, range: {
|
|
33
|
-
min: number;
|
|
34
|
-
max: number;
|
|
35
|
-
} | undefined, allDescription: string, getSingleItemDescription: (t: string, form?: number) => string, getIncrementDescriptionFormat: (t: string) => string, getRangeDescriptionFormat: (t: string) => string, getDescriptionFormat: (t: string) => string): string;
|
|
36
|
-
protected generateRangeSegmentDescription(rangeExpression: string, getRangeDescriptionFormat: (t: string) => string, getSingleItemDescription: (t: string, form?: number) => string): string;
|
|
41
|
+
protected getSegmentDescription(expression: string, describers: SegmentDescribers): string | null;
|
|
42
|
+
protected getWrappingIncrementDescription(expression: string, describers: SegmentDescribers): string;
|
|
43
|
+
protected generateRangeSegmentDescription(rangeExpression: string, describers: SegmentDescribers): string;
|
|
37
44
|
protected formatTime(hourExpression: string, minuteExpression: string, secondExpression: string): string;
|
|
38
45
|
protected transformVerbosity(description: string, useVerboseFormat: boolean): string;
|
|
39
46
|
private getPeriod;
|
|
40
47
|
}
|
|
48
|
+
export {};
|
|
@@ -33,10 +33,10 @@ export { be } from "./locales/be";
|
|
|
33
33
|
export { hu } from "./locales/hu";
|
|
34
34
|
export { af } from "./locales/af";
|
|
35
35
|
export { th } from "./locales/th";
|
|
36
|
-
export { ar } from
|
|
37
|
-
export { vi } from
|
|
38
|
-
export { my } from
|
|
39
|
-
export { bg } from
|
|
40
|
-
export { hr } from
|
|
41
|
-
export { sr } from
|
|
36
|
+
export { ar } from "./locales/ar";
|
|
37
|
+
export { vi } from "./locales/vi";
|
|
38
|
+
export { my } from "./locales/my";
|
|
39
|
+
export { bg } from "./locales/bg";
|
|
40
|
+
export { hr } from "./locales/hr";
|
|
41
|
+
export { sr } from "./locales/sr";
|
|
42
42
|
export { az } from "./locales/az";
|
package/dist/i18n/locale.d.ts
CHANGED
|
@@ -15,11 +15,11 @@ export interface Locale {
|
|
|
15
15
|
everyX0Seconds(s?: string): string;
|
|
16
16
|
secondsX0ThroughX1PastTheMinute(): string;
|
|
17
17
|
atX0SecondsPastTheMinute(s?: string): string;
|
|
18
|
-
atX0SecondsPastTheMinuteGt20(): string
|
|
18
|
+
atX0SecondsPastTheMinuteGt20?(): string;
|
|
19
19
|
everyX0Minutes(s?: string): string;
|
|
20
20
|
minutesX0ThroughX1PastTheHour(): string;
|
|
21
21
|
atX0MinutesPastTheHour(s?: string): string;
|
|
22
|
-
atX0MinutesPastTheHourGt20(): string
|
|
22
|
+
atX0MinutesPastTheHourGt20?(): string;
|
|
23
23
|
everyX0Hours(s?: string): string;
|
|
24
24
|
betweenX0AndX1(): string;
|
|
25
25
|
atX0(): string;
|
|
@@ -27,8 +27,8 @@ export interface Locale {
|
|
|
27
27
|
commaEveryX0DaysOfTheWeek(s?: string): string;
|
|
28
28
|
commaX0ThroughX1(s?: string): string;
|
|
29
29
|
commaAndX0ThroughX1(s?: string): string;
|
|
30
|
-
commaMonthX0ThroughMonthX1(): string
|
|
31
|
-
commaYearX0ThroughYearX1(): string
|
|
30
|
+
commaMonthX0ThroughMonthX1?(): string;
|
|
31
|
+
commaYearX0ThroughYearX1?(): string;
|
|
32
32
|
first(s?: string): string;
|
|
33
33
|
second(s?: string): string;
|
|
34
34
|
third(s?: string): string;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class af implements Locale {
|
|
3
|
-
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
3
|
+
commaYearX0ThroughYearX1(): string;
|
|
7
4
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
5
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
6
|
everyMinute(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class ar implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
everyMinute(): string;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class az implements Locale {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
3
|
+
commaMonthX0ThroughMonthX1(): string;
|
|
4
|
+
commaYearX0ThroughYearX1(): string;
|
|
7
5
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
6
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
7
|
everyMinute(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class be implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
everyMinute(): string;
|
|
9
5
|
everyHour(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import type { Locale } from
|
|
1
|
+
import type { Locale } from "../locale";
|
|
2
2
|
export declare class bg implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
everyMinute(): string;
|
|
9
5
|
everyHour(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class ca implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
at(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class cs implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
everyMinute(): string;
|
|
@@ -45,10 +45,6 @@ export declare class da implements Locale {
|
|
|
45
45
|
lastDay(): string;
|
|
46
46
|
third(): string;
|
|
47
47
|
weekdayNearestDayX0(): string;
|
|
48
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
49
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
50
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
51
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
52
48
|
commaStartingX0(): string;
|
|
53
49
|
daysOfTheWeek(): string[];
|
|
54
50
|
monthsOfTheYear(): string[];
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class de implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
everyMinute(): string;
|
|
9
5
|
everyHour(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class en implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
everyMinute(): string;
|
|
@@ -45,8 +41,8 @@ export declare class en implements Locale {
|
|
|
45
41
|
firstWeekday(): string;
|
|
46
42
|
weekdayNearestDayX0(): string;
|
|
47
43
|
commaOnTheX0OfTheMonth(): string;
|
|
48
|
-
commaDaysBeforeTheX0OfTheMonth(s?: string): ", %s
|
|
49
|
-
commaDaysAfterTheX0OfTheMonth(s?: string): ", %s
|
|
44
|
+
commaDaysBeforeTheX0OfTheMonth(s?: string): ", %s day before the %s of the month" | ", %s days before the %s of the month";
|
|
45
|
+
commaDaysAfterTheX0OfTheMonth(s?: string): ", %s day after the %s of the month" | ", %s days after the %s of the month";
|
|
50
46
|
commaEveryX0Days(): string;
|
|
51
47
|
commaBetweenDayX0AndX1OfTheMonth(): string;
|
|
52
48
|
commaOnDayX0OfTheMonth(): string;
|
|
@@ -55,6 +51,8 @@ export declare class en implements Locale {
|
|
|
55
51
|
commaStartingX0(): string;
|
|
56
52
|
daysOfTheWeek(): string[];
|
|
57
53
|
monthsOfTheYear(): string[];
|
|
54
|
+
am(): string;
|
|
55
|
+
pm(): string;
|
|
58
56
|
atReboot(): string;
|
|
59
57
|
onTheHour(): string;
|
|
60
58
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class es implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
at(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class fa implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
everyMinute(): string;
|
|
@@ -6,7 +6,7 @@ export declare class fi implements Locale {
|
|
|
6
6
|
atSpace(): string;
|
|
7
7
|
atX0(): string;
|
|
8
8
|
atX0MinutesPastTheHour(): string;
|
|
9
|
-
atX0MinutesPastTheHourGt20(): string
|
|
9
|
+
atX0MinutesPastTheHourGt20(): string;
|
|
10
10
|
atX0SecondsPastTheMinute(): string;
|
|
11
11
|
betweenX0AndX1(): string;
|
|
12
12
|
commaBetweenDayX0AndX1OfTheMonth(): string;
|
|
@@ -48,9 +48,6 @@ export declare class fi implements Locale {
|
|
|
48
48
|
spaceX0OfTheMonth(): string;
|
|
49
49
|
third(): string;
|
|
50
50
|
weekdayNearestDayX0(): string;
|
|
51
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
52
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
53
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
54
51
|
lastDay(): string;
|
|
55
52
|
commaAndOnX0(): string;
|
|
56
53
|
daysOfTheWeek(): string[];
|
|
@@ -3,10 +3,6 @@ export declare class fr implements Locale {
|
|
|
3
3
|
conciseVerbosityReplacements(): {
|
|
4
4
|
"de le": string;
|
|
5
5
|
};
|
|
6
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
7
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
8
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
9
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
10
6
|
use24HourTimeFormatByDefault(): boolean;
|
|
11
7
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
12
8
|
everyMinute(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class he implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
everyMinute(): string;
|
|
@@ -45,10 +45,6 @@ export declare class hr implements Locale {
|
|
|
45
45
|
lastDay(): string;
|
|
46
46
|
third(): string;
|
|
47
47
|
weekdayNearestDayX0(): string;
|
|
48
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
49
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
50
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
51
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
52
48
|
commaStartingX0(): string;
|
|
53
49
|
daysOfTheWeek(): string[];
|
|
54
50
|
monthsOfTheYear(): string[];
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class hu implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
everyMinute(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class id implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
everyMinute(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class it implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
at(): string;
|
|
@@ -49,10 +49,6 @@ export declare class ja implements Locale {
|
|
|
49
49
|
aMPeriod(): string;
|
|
50
50
|
pMPeriod(): string;
|
|
51
51
|
commaDaysBeforeTheLastDayOfTheMonth(): string;
|
|
52
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
53
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
54
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
55
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
56
52
|
lastDay(): string;
|
|
57
53
|
commaAndOnX0(): string;
|
|
58
54
|
daysOfTheWeek(): string[];
|
|
@@ -3,10 +3,6 @@ export declare class ko implements Locale {
|
|
|
3
3
|
setPeriodBeforeTime(): boolean;
|
|
4
4
|
pm(): string;
|
|
5
5
|
am(): string;
|
|
6
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
7
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
8
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
9
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
10
6
|
use24HourTimeFormatByDefault(): boolean;
|
|
11
7
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
12
8
|
everyMinute(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class my implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
everyMinute(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class nb implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
at(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class nl implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
everyMinute(): string;
|
|
9
5
|
everyHour(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class nn implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
at(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class pl implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
at(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class pt_BR implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
at(): string;
|
|
@@ -18,8 +14,8 @@ export declare class pt_BR implements Locale {
|
|
|
18
14
|
commaEveryX0DaysOfTheWeek(): string;
|
|
19
15
|
commaEveryX0Months(): string;
|
|
20
16
|
commaOnDayX0OfTheMonth(): string;
|
|
21
|
-
commaOnlyInX0(s?: string): "
|
|
22
|
-
commaOnlyOnX0(s?: string): ", somente
|
|
17
|
+
commaOnlyInX0(s?: string): "somente %s" | ", somente em %s";
|
|
18
|
+
commaOnlyOnX0(s?: string): ", somente %s" | ", somente de %s";
|
|
23
19
|
commaAndOnX0(): string;
|
|
24
20
|
commaOnThe(s?: string, day?: string): ", no" | ", na ";
|
|
25
21
|
commaOnTheLastDayOfTheMonth(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class pt_PT implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
at(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class ru implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
everyMinute(): string;
|
|
9
5
|
everyHour(): string;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { Locale } from "../locale";
|
|
2
2
|
export declare class sk implements Locale {
|
|
3
|
-
atX0SecondsPastTheMinuteGt20(): string | null;
|
|
4
|
-
atX0MinutesPastTheHourGt20(): string | null;
|
|
5
|
-
commaMonthX0ThroughMonthX1(): string | null;
|
|
6
|
-
commaYearX0ThroughYearX1(): string | null;
|
|
7
3
|
use24HourTimeFormatByDefault(): boolean;
|
|
8
4
|
anErrorOccuredWhenGeneratingTheExpressionD(): string;
|
|
9
5
|
everyMinute(): string;
|