Comparing version
@@ -1,2 +0,2 @@ | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("date-fns"));else if("function"==typeof define&&define.amd)define(["date-fns"],t);else{var n=t("object"==typeof exports?require("date-fns"):e["date-fns"]);for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}("undefined"!=typeof self?self:this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRelativeDate=void 0;var r=n(1),o={en:["s","m","h","d","YYYY-MM-DD"],fr:["s","m","h","j","DD/MM/YYYY"],de:["S","M","Std.","T","YYYY-MM-DD"],da:["s","m","t","d","YYYY-MM-DD"]},c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",n=[new Date,e],c=r.differenceInSeconds.apply(void 0,n),f=r.differenceInMinutes.apply(void 0,n),a=r.differenceInHours.apply(void 0,n),i=r.differenceInDays.apply(void 0,n),u=r.differenceInWeeks.apply(void 0,n);switch(!0){case f<1:return"".concat(c).concat(o[t][0]);case a<1:return"".concat(f).concat(o[t][1]);case i<1:return"".concat(a).concat(o[t][2]);case u<1:return"".concat(i).concat(o[t][3]);default:return(0,r.format)(e,"".concat(o[t][4]))}};t.getRelativeDate=c},function(t,n){t.exports=e}])}); | ||
!function(e,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n(require("date-fns"));else if("function"==typeof define&&define.amd)define(["date-fns"],n);else{var t=n("object"==typeof exports?require("date-fns"):e["date-fns"]);for(var o in t)("object"==typeof exports?exports:e)[o]=t[o]}}("undefined"!=typeof self?self:this,function(e){return function(e){function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}var t={};return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=1)}([function(e,n){function t(e){var n=[];for(var t in e)e.hasOwnProperty(t)&&n.push(t);var r=o.concat(n).sort().reverse();return new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+r.join("|")+"|.)","g")}var o=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];e.exports=t},function(e,n,t){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.getDate=n.getRelativeDate=void 0;var r=t(2),u=o(t(3)),a=o(t(6)),i=o(t(9)),s=o(t(12)),c={en:["s","m","h","d","YYYY-MM-DD"],fr:["s","m","h","j","DD/MM/YYYY"],de:["S","M","Std.","T","YYYY-MM-DD"],da:["s","m","t","d","YYYY-MM-DD"]},d=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",t=[new Date,e],o=r.differenceInSeconds.apply(void 0,t),u=r.differenceInMinutes.apply(void 0,t),a=r.differenceInHours.apply(void 0,t),i=r.differenceInDays.apply(void 0,t),s=r.differenceInWeeks.apply(void 0,t);switch(!0){case u<1:return"".concat(o).concat(c[n][0]);case a<1:return"".concat(u).concat(c[n][1]);case i<1:return"".concat(a).concat(c[n][2]);case s<1:return"".concat(i).concat(c[n][3]);default:return(0,r.format)(e,"".concat(c[n][4]))}};n.getRelativeDate=d;var f=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en",t={fr:u.default,en:a.default,da:s.default,de:i.default};return(0,r.format)(e,"MMMM DD, YYYY",{locale:t[n]})};n.getDate=f},function(n,t){n.exports=e},function(e,n,t){var o=t(4),r=t(5);e.exports={distanceInWords:o(),format:r()}},function(e,n){function t(){function e(e,t,o){o=o||{};var r;return r="string"==typeof n[e]?n[e]:1===t?n[e].one:n[e].other.replace("{{count}}",t),o.addSuffix?o.comparison>0?"dans "+r:"il y a "+r:r}var n={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}};return{localize:e}}e.exports=t},function(e,n,t){function o(){var e=["janv.","févr.","mars","avr.","mai","juin","juill.","août","sept.","oct.","nov.","déc."],n=["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],t=["di","lu","ma","me","je","ve","sa"],o=["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],i=["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],s=["AM","PM"],c=["am","pm"],d=["du matin","de l’après-midi","du soir"],f={MMM:function(n){return e[n.getMonth()]},MMMM:function(e){return n[e.getMonth()]},dd:function(e){return t[e.getDay()]},ddd:function(e){return o[e.getDay()]},dddd:function(e){return i[e.getDay()]},A:function(e){return e.getHours()/12>=1?s[1]:s[0]},a:function(e){return e.getHours()/12>=1?c[1]:c[0]},aa:function(e){var n=e.getHours();return n<=12?d[0]:n<=16?d[1]:d[2]},Wo:function(e,n){return u(n.W(e))}};return["M","D","DDD","d","Q"].forEach(function(e){f[e+"o"]=function(n,t){return r(t[e](n))}}),["MMM","MMMM"].forEach(function(e){f["Do "+e]=function(n,t){var o=1===n.getDate()?"Do":"D";return(f[o]||t[o])(n,t)+" "+f[e](n)}}),{formatters:f,formattingTokensRegExp:a(f)}}function r(e){return 1===e?"1er":e+"e"}function u(e){return 1===e?"1re":e+"e"}var a=t(0);e.exports=o},function(e,n,t){var o=t(7),r=t(8);e.exports={distanceInWords:o(),format:r()}},function(e,n){function t(){function e(e,t,o){o=o||{};var r;return r="string"==typeof n[e]?n[e]:1===t?n[e].one:n[e].other.replace("{{count}}",t),o.addSuffix?o.comparison>0?"in "+r:r+" ago":r}var n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};return{localize:e}}e.exports=t},function(e,n,t){function o(){var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],n=["January","February","March","April","May","June","July","August","September","October","November","December"],t=["Su","Mo","Tu","We","Th","Fr","Sa"],o=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],a=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i=["AM","PM"],s=["am","pm"],c=["a.m.","p.m."],d={MMM:function(n){return e[n.getMonth()]},MMMM:function(e){return n[e.getMonth()]},dd:function(e){return t[e.getDay()]},ddd:function(e){return o[e.getDay()]},dddd:function(e){return a[e.getDay()]},A:function(e){return e.getHours()/12>=1?i[1]:i[0]},a:function(e){return e.getHours()/12>=1?s[1]:s[0]},aa:function(e){return e.getHours()/12>=1?c[1]:c[0]}};return["M","D","DDD","d","Q","W"].forEach(function(e){d[e+"o"]=function(n,t){return r(t[e](n))}}),{formatters:d,formattingTokensRegExp:u(d)}}function r(e){var n=e%100;if(n>20||n<10)switch(n%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"}var u=t(0);e.exports=o},function(e,n,t){var o=t(10),r=t(11);e.exports={distanceInWords:o(),format:r()}},function(e,n){function t(){function e(e,t,o){o=o||{};var r,u=o.addSuffix?n[e].withPreposition:n[e].standalone;return r="string"==typeof u?u:1===t?u.one:u.other.replace("{{count}}",t),o.addSuffix?o.comparison>0?"in "+r:"vor "+r:r}var n={lessThanXSeconds:{standalone:{one:"weniger als eine Sekunde",other:"weniger als {{count}} Sekunden"},withPreposition:{one:"weniger als einer Sekunde",other:"weniger als {{count}} Sekunden"}},xSeconds:{standalone:{one:"eine Sekunde",other:"{{count}} Sekunden"},withPreposition:{one:"einer Sekunde",other:"{{count}} Sekunden"}},halfAMinute:{standalone:"eine halbe Minute",withPreposition:"einer halben Minute"},lessThanXMinutes:{standalone:{one:"weniger als eine Minute",other:"weniger als {{count}} Minuten"},withPreposition:{one:"weniger als einer Minute",other:"weniger als {{count}} Minuten"}},xMinutes:{standalone:{one:"eine Minute",other:"{{count}} Minuten"},withPreposition:{one:"einer Minute",other:"{{count}} Minuten"}},aboutXHours:{standalone:{one:"etwa eine Stunde",other:"etwa {{count}} Stunden"},withPreposition:{one:"etwa einer Stunde",other:"etwa {{count}} Stunden"}},xHours:{standalone:{one:"eine Stunde",other:"{{count}} Stunden"},withPreposition:{one:"einer Stunde",other:"{{count}} Stunden"}},xDays:{standalone:{one:"ein Tag",other:"{{count}} Tage"},withPreposition:{one:"einem Tag",other:"{{count}} Tagen"}},aboutXMonths:{standalone:{one:"etwa ein Monat",other:"etwa {{count}} Monate"},withPreposition:{one:"etwa einem Monat",other:"etwa {{count}} Monaten"}},xMonths:{standalone:{one:"ein Monat",other:"{{count}} Monate"},withPreposition:{one:"einem Monat",other:"{{count}} Monaten"}},aboutXYears:{standalone:{one:"etwa ein Jahr",other:"etwa {{count}} Jahre"},withPreposition:{one:"etwa einem Jahr",other:"etwa {{count}} Jahren"}},xYears:{standalone:{one:"ein Jahr",other:"{{count}} Jahre"},withPreposition:{one:"einem Jahr",other:"{{count}} Jahren"}},overXYears:{standalone:{one:"mehr als ein Jahr",other:"mehr als {{count}} Jahre"},withPreposition:{one:"mehr als einem Jahr",other:"mehr als {{count}} Jahren"}},almostXYears:{standalone:{one:"fast ein Jahr",other:"fast {{count}} Jahre"},withPreposition:{one:"fast einem Jahr",other:"fast {{count}} Jahren"}}};return{localize:e}}e.exports=t},function(e,n,t){function o(){var e=["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],n=["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],t=["So","Mo","Di","Mi","Do","Fr","Sa"],o=["Son","Mon","Die","Mit","Don","Fre","Sam"],a=["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],i=["AM","PM"],s=["am","pm"],c=["a.m.","p.m."],d={MMM:function(n){return e[n.getMonth()]},MMMM:function(e){return n[e.getMonth()]},dd:function(e){return t[e.getDay()]},ddd:function(e){return o[e.getDay()]},dddd:function(e){return a[e.getDay()]},A:function(e){return e.getHours()/12>=1?i[1]:i[0]},a:function(e){return e.getHours()/12>=1?s[1]:s[0]},aa:function(e){return e.getHours()/12>=1?c[1]:c[0]}};return["M","D","DDD","d","Q","W"].forEach(function(e){d[e+"o"]=function(n,t){return r(t[e](n))}}),{formatters:d,formattingTokensRegExp:u(d)}}function r(e){return e+"."}var u=t(0);e.exports=o},function(e,n,t){var o=t(13),r=t(14);e.exports={distanceInWords:o(),format:r()}},function(e,n){function t(){function e(e,t,o){o=o||{};var r;return r="string"==typeof n[e]?n[e]:1===t?n[e].one:n[e].other.replace("{{count}}",t),o.addSuffix?o.comparison>0?"om "+r:r+" siden":r}var n={lessThanXSeconds:{one:"mindre end et sekund",other:"mindre end {{count}} sekunder"},xSeconds:{one:"1 sekund",other:"{{count}} sekunder"},halfAMinute:"et halvt minut",lessThanXMinutes:{one:"mindre end et minut",other:"mindre end {{count}} minutter"},xMinutes:{one:"1 minut",other:"{{count}} minutter"},aboutXHours:{one:"cirka 1 time",other:"cirka {{count}} timer"},xHours:{one:"1 time",other:"{{count}} timer"},xDays:{one:"1 dag",other:"{{count}} dage"},aboutXMonths:{one:"cirka 1 måned",other:"cirka {{count}} måneder"},xMonths:{one:"1 måned",other:"{{count}} måneder"},aboutXYears:{one:"cirka 1 år",other:"cirka {{count}} år"},xYears:{one:"1 år",other:"{{count}} år"},overXYears:{one:"over 1 år",other:"over {{count}} år"},almostXYears:{one:"næsten 1 år",other:"næsten {{count}} år"}};return{localize:e}}e.exports=t},function(e,n,t){function o(){var e=["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],n=["januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december"],t=["sø","ma","ti","on","to","fr","lø"],o=["søn","man","tir","ons","tor","fre","lør"],a=["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"],i=["AM","PM"],s=["am","pm"],c=["a.m.","p.m."],d={MMM:function(n){return e[n.getMonth()]},MMMM:function(e){return n[e.getMonth()]},dd:function(e){return t[e.getDay()]},ddd:function(e){return o[e.getDay()]},dddd:function(e){return a[e.getDay()]},A:function(e){return e.getHours()/12>=1?i[1]:i[0]},a:function(e){return e.getHours()/12>=1?s[1]:s[0]},aa:function(e){return e.getHours()/12>=1?c[1]:c[0]}};return["M","D","DDD","d","Q","W"].forEach(function(e){d[e+"o"]=function(n,t){return r(t[e](n))}}),{formatters:d,formattingTokensRegExp:u(d)}}function r(e){return e+"."}var u=t(0);e.exports=o}])}); | ||
//# sourceMappingURL=bundle.js.map |
{ | ||
"name": "@ied/date", | ||
"version": "1.0.0-beta.0", | ||
"version": "1.0.0-beta.1", | ||
"main": "dist/bundle.js", | ||
@@ -5,0 +5,0 @@ "author": "Didier Franc <mail@didierfranc.com>", |
Sorry, the diff of this file is not supported yet
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
88665
512.33%47
571.43%0
-100%