date-fns
Version:
Modern JavaScript date utility library
1 lines • 14.2 kB
JavaScript
(()=>{function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n(e){for(var n=1;n<arguments.length;n++){var i=arguments[n]==null?{}:arguments[n];n%2?t(Object(i),!0).forEach(function(t){r(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function r(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(t){var n=a(t,`string`);return e(n)==`symbol`?n:n+``}function a(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}var o={lessThanXSeconds:{standalone:{one:`సెకను కన్నా తక్కువ`,other:`{{count}} సెకన్ల కన్నా తక్కువ`},withPreposition:{one:`సెకను`,other:`{{count}} సెకన్ల`}},xSeconds:{standalone:{one:`ఒక సెకను`,other:`{{count}} సెకన్ల`},withPreposition:{one:`ఒక సెకను`,other:`{{count}} సెకన్ల`}},halfAMinute:{standalone:`అర నిమిషం`,withPreposition:`అర నిమిషం`},lessThanXMinutes:{standalone:{one:`ఒక నిమిషం కన్నా తక్కువ`,other:`{{count}} నిమిషాల కన్నా తక్కువ`},withPreposition:{one:`ఒక నిమిషం`,other:`{{count}} నిమిషాల`}},xMinutes:{standalone:{one:`ఒక నిమిషం`,other:`{{count}} నిమిషాలు`},withPreposition:{one:`ఒక నిమిషం`,other:`{{count}} నిమిషాల`}},aboutXHours:{standalone:{one:`సుమారు ఒక గంట`,other:`సుమారు {{count}} గంటలు`},withPreposition:{one:`సుమారు ఒక గంట`,other:`సుమారు {{count}} గంటల`}},xHours:{standalone:{one:`ఒక గంట`,other:`{{count}} గంటలు`},withPreposition:{one:`ఒక గంట`,other:`{{count}} గంటల`}},xDays:{standalone:{one:`ఒక రోజు`,other:`{{count}} రోజులు`},withPreposition:{one:`ఒక రోజు`,other:`{{count}} రోజుల`}},aboutXWeeks:{standalone:{one:`సుమారు ఒక వారం`,other:`సుమారు {{count}} వారాలు`},withPreposition:{one:`సుమారు ఒక వారం`,other:`సుమారు {{count}} వారాలల`}},xWeeks:{standalone:{one:`ఒక వారం`,other:`{{count}} వారాలు`},withPreposition:{one:`ఒక వారం`,other:`{{count}} వారాలల`}},aboutXMonths:{standalone:{one:`సుమారు ఒక నెల`,other:`సుమారు {{count}} నెలలు`},withPreposition:{one:`సుమారు ఒక నెల`,other:`సుమారు {{count}} నెలల`}},xMonths:{standalone:{one:`ఒక నెల`,other:`{{count}} నెలలు`},withPreposition:{one:`ఒక నెల`,other:`{{count}} నెలల`}},aboutXYears:{standalone:{one:`సుమారు ఒక సంవత్సరం`,other:`సుమారు {{count}} సంవత్సరాలు`},withPreposition:{one:`సుమారు ఒక సంవత్సరం`,other:`సుమారు {{count}} సంవత్సరాల`}},xYears:{standalone:{one:`ఒక సంవత్సరం`,other:`{{count}} సంవత్సరాలు`},withPreposition:{one:`ఒక సంవత్సరం`,other:`{{count}} సంవత్సరాల`}},overXYears:{standalone:{one:`ఒక సంవత్సరం పైగా`,other:`{{count}} సంవత్సరాలకు పైగా`},withPreposition:{one:`ఒక సంవత్సరం`,other:`{{count}} సంవత్సరాల`}},almostXYears:{standalone:{one:`దాదాపు ఒక సంవత్సరం`,other:`దాదాపు {{count}} సంవత్సరాలు`},withPreposition:{one:`దాదాపు ఒక సంవత్సరం`,other:`దాదాపు {{count}} సంవత్సరాల`}}},s=function(e,t,n){var r,i=n!=null&&n.addSuffix?o[e].withPreposition:o[e].standalone;return r=typeof i==`string`?i:t===1?i.one:i.other.replace(`{{count}}`,String(t)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?r+`లో`:r+` క్రితం`:r};function c(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var l={date:c({formats:{full:`d, MMMM y, EEEE`,long:`d MMMM, y`,medium:`d MMM, y`,short:`dd-MM-yy`},defaultWidth:`full`}),time:c({formats:{full:`h:mm:ss a zzzz`,long:`h:mm:ss a z`,medium:`h:mm:ss a`,short:`h:mm a`},defaultWidth:`full`}),dateTime:c({formats:{full:`{{date}} {{time}}'కి'`,long:`{{date}} {{time}}'కి'`,medium:`{{date}} {{time}}`,short:`{{date}} {{time}}`},defaultWidth:`full`})},u={lastWeek:`'గత' eeee p`,yesterday:`'నిన్న' p`,today:`'ఈ రోజు' p`,tomorrow:`'రేపు' p`,nextWeek:`'తదుపరి' eeee p`,other:`P`},d=function(e,t,n,r){return u[e]};function f(e){return function(t,n){var r=n!=null&&n.context?String(n.context):`standalone`,i;if(r===`formatting`&&e.formattingValues){var a=e.defaultFormattingWidth||e.defaultWidth,o=n!=null&&n.width?String(n.width):a;i=e.formattingValues[o]||e.formattingValues[a]}else{var s=e.defaultWidth,c=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[c]||e.values[s]}var l=e.argumentCallback?e.argumentCallback(t):t;return i[l]}}var p={ordinalNumber:function(e,t){return Number(e)+`వ`},era:f({values:{narrow:[`క్రీ.పూ.`,`క్రీ.శ.`],abbreviated:[`క్రీ.పూ.`,`క్రీ.శ.`],wide:[`క్రీస్తు పూర్వం`,`క్రీస్తుశకం`]},defaultWidth:`wide`}),quarter:f({values:{narrow:[`1`,`2`,`3`,`4`],abbreviated:[`త్రై1`,`త్రై2`,`త్రై3`,`త్రై4`],wide:[`1వ త్రైమాసికం`,`2వ త్రైమాసికం`,`3వ త్రైమాసికం`,`4వ త్రైమాసికం`]},defaultWidth:`wide`,argumentCallback:function(e){return e-1}}),month:f({values:{narrow:[`జ`,`ఫి`,`మా`,`ఏ`,`మే`,`జూ`,`జు`,`ఆ`,`సె`,`అ`,`న`,`డి`],abbreviated:[`జన`,`ఫిబ్ర`,`మార్చి`,`ఏప్రి`,`మే`,`జూన్`,`జులై`,`ఆగ`,`సెప్టెం`,`అక్టో`,`నవం`,`డిసెం`],wide:[`జనవరి`,`ఫిబ్రవరి`,`మార్చి`,`ఏప్రిల్`,`మే`,`జూన్`,`జులై`,`ఆగస్టు`,`సెప్టెంబర్`,`అక్టోబర్`,`నవంబర్`,`డిసెంబర్`]},defaultWidth:`wide`}),day:f({values:{narrow:[`ఆ`,`సో`,`మ`,`బు`,`గు`,`శు`,`శ`],short:[`ఆది`,`సోమ`,`మంగళ`,`బుధ`,`గురు`,`శుక్ర`,`శని`],abbreviated:[`ఆది`,`సోమ`,`మంగళ`,`బుధ`,`గురు`,`శుక్ర`,`శని`],wide:[`ఆదివారం`,`సోమవారం`,`మంగళవారం`,`బుధవారం`,`గురువారం`,`శుక్రవారం`,`శనివారం`]},defaultWidth:`wide`}),dayPeriod:f({values:{narrow:{am:`పూర్వాహ్నం`,pm:`అపరాహ్నం`,midnight:`అర్ధరాత్రి`,noon:`మిట్టమధ్యాహ్నం`,morning:`ఉదయం`,afternoon:`మధ్యాహ్నం`,evening:`సాయంత్రం`,night:`రాత్రి`},abbreviated:{am:`పూర్వాహ్నం`,pm:`అపరాహ్నం`,midnight:`అర్ధరాత్రి`,noon:`మిట్టమధ్యాహ్నం`,morning:`ఉదయం`,afternoon:`మధ్యాహ్నం`,evening:`సాయంత్రం`,night:`రాత్రి`},wide:{am:`పూర్వాహ్నం`,pm:`అపరాహ్నం`,midnight:`అర్ధరాత్రి`,noon:`మిట్టమధ్యాహ్నం`,morning:`ఉదయం`,afternoon:`మధ్యాహ్నం`,evening:`సాయంత్రం`,night:`రాత్రి`}},defaultWidth:`wide`,formattingValues:{narrow:{am:`పూర్వాహ్నం`,pm:`అపరాహ్నం`,midnight:`అర్ధరాత్రి`,noon:`మిట్టమధ్యాహ్నం`,morning:`ఉదయం`,afternoon:`మధ్యాహ్నం`,evening:`సాయంత్రం`,night:`రాత్రి`},abbreviated:{am:`పూర్వాహ్నం`,pm:`అపరాహ్నం`,midnight:`అర్ధరాత్రి`,noon:`మిట్టమధ్యాహ్నం`,morning:`ఉదయం`,afternoon:`మధ్యాహ్నం`,evening:`సాయంత్రం`,night:`రాత్రి`},wide:{am:`పూర్వాహ్నం`,pm:`అపరాహ్నం`,midnight:`అర్ధరాత్రి`,noon:`మిట్టమధ్యాహ్నం`,morning:`ఉదయం`,afternoon:`మధ్యాహ్నం`,evening:`సాయంత్రం`,night:`రాత్రి`}},defaultFormattingWidth:`wide`})};function m(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(i);if(!a)return null;var o=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?g(s,function(e){return e.test(o)}):h(s,function(e){return e.test(o)}),l=e.valueCallback?e.valueCallback(c):c;l=n.valueCallback?n.valueCallback(l):l;var u=t.slice(o.length);return{value:l,rest:u}}}function h(e,t){for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function g(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}function _(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.match(e.matchPattern);if(!r)return null;var i=r[0],a=t.match(e.parsePattern);if(!a)return null;var o=e.valueCallback?e.valueCallback(a[0]):a[0];o=n.valueCallback?n.valueCallback(o):o;var s=t.slice(i.length);return{value:o,rest:s}}}var v={code:`te`,formatDistance:s,formatLong:l,formatRelative:d,localize:p,match:{ordinalNumber:_({matchPattern:/^(\d+)(వ)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}}),era:m({matchPatterns:{narrow:/^(క్రీ\.పూ\.|క్రీ\.శ\.)/i,abbreviated:/^(క్రీ\.?\s?పూ\.?|ప్ర\.?\s?శ\.?\s?పూ\.?|క్రీ\.?\s?శ\.?|సా\.?\s?శ\.?)/i,wide:/^(క్రీస్తు పూర్వం|ప్రస్తుత శకానికి పూర్వం|క్రీస్తు శకం|ప్రస్తుత శకం)/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/^(పూ|శ)/i,/^సా/i]},defaultParseWidth:`any`}),quarter:m({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^త్రై[1234]/i,wide:/^[1234](వ)? త్రైమాసికం/i},defaultMatchWidth:`wide`,parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:`any`,valueCallback:function(e){return e+1}}),month:m({matchPatterns:{narrow:/^(జూ|జు|జ|ఫి|మా|ఏ|మే|ఆ|సె|అ|న|డి)/i,abbreviated:/^(జన|ఫిబ్ర|మార్చి|ఏప్రి|మే|జూన్|జులై|ఆగ|సెప్|అక్టో|నవ|డిసె)/i,wide:/^(జనవరి|ఫిబ్రవరి|మార్చి|ఏప్రిల్|మే|జూన్|జులై|ఆగస్టు|సెప్టెంబర్|అక్టోబర్|నవంబర్|డిసెంబర్)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^జ/i,/^ఫి/i,/^మా/i,/^ఏ/i,/^మే/i,/^జూ/i,/^జు/i,/^ఆ/i,/^సె/i,/^అ/i,/^న/i,/^డి/i],any:[/^జన/i,/^ఫి/i,/^మా/i,/^ఏ/i,/^మే/i,/^జూన్/i,/^జులై/i,/^ఆగ/i,/^సె/i,/^అ/i,/^న/i,/^డి/i]},defaultParseWidth:`any`}),day:m({matchPatterns:{narrow:/^(ఆ|సో|మ|బు|గు|శు|శ)/i,short:/^(ఆది|సోమ|మం|బుధ|గురు|శుక్ర|శని)/i,abbreviated:/^(ఆది|సోమ|మం|బుధ|గురు|శుక్ర|శని)/i,wide:/^(ఆదివారం|సోమవారం|మంగళవారం|బుధవారం|గురువారం|శుక్రవారం|శనివారం)/i},defaultMatchWidth:`wide`,parsePatterns:{narrow:[/^ఆ/i,/^సో/i,/^మ/i,/^బు/i,/^గు/i,/^శు/i,/^శ/i],any:[/^ఆది/i,/^సోమ/i,/^మం/i,/^బుధ/i,/^గురు/i,/^శుక్ర/i,/^శని/i]},defaultParseWidth:`any`}),dayPeriod:m({matchPatterns:{narrow:/^(పూర్వాహ్నం|అపరాహ్నం|అర్ధరాత్రి|మిట్టమధ్యాహ్నం|ఉదయం|మధ్యాహ్నం|సాయంత్రం|రాత్రి)/i,any:/^(పూర్వాహ్నం|అపరాహ్నం|అర్ధరాత్రి|మిట్టమధ్యాహ్నం|ఉదయం|మధ్యాహ్నం|సాయంత్రం|రాత్రి)/i},defaultMatchWidth:`any`,parsePatterns:{any:{am:/^పూర్వాహ్నం/i,pm:/^అపరాహ్నం/i,midnight:/^అర్ధ/i,noon:/^మిట్ట/i,morning:/ఉదయం/i,afternoon:/మధ్యాహ్నం/i,evening:/సాయంత్రం/i,night:/రాత్రి/i}},defaultParseWidth:`any`})},options:{weekStartsOn:0,firstWeekContainsDate:1}};window.dateFns=n(n({},window.dateFns),{},{locale:n(n({},window.dateFns?.locale),{},{te:v})}),console.log(`date-fns CDN files have moved to @date-fns/cdn. Please update your URLs. See: https://date-fns.org/docs/CDN`)})();