package.cjs.cypress-utils.utils.date.js.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neeto-commons-frontend Show documentation
Show all versions of neeto-commons-frontend Show documentation
A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.
{"version":3,"file":"date.js","names":["_dayjs","_interopRequireDefault","require","currentDate","dayjs","format","futureDate","numberOfDays","arguments","length","undefined","date","add","pastDate","subtract","dateUtils","exports"],"sources":["../../../../src/cypress-utils/utils/date.js"],"sourcesContent":["import dayjs from \"dayjs\";\n\nconst currentDate = () => dayjs().format(\"YYYY-MM-DD\");\n\nconst futureDate = (numberOfDays = 1) => {\n const date = dayjs().add(numberOfDays, \"day\").format(\"YYYY-MM-DD\");\n\n return date;\n};\n\nconst pastDate = (numberOfDays = 1) => {\n const date = dayjs().subtract(numberOfDays, \"day\").format(\"YYYY-MM-DD\");\n\n return date;\n};\n\nexport const dateUtils = { currentDate, futureDate, pastDate };\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAA;EAAA,OAAS,IAAAC,iBAAK,GAAE,CAACC,MAAM,CAAC,YAAY,CAAC;AAAA;AAEtD,IAAMC,UAAU,GAAG,SAAbA,UAAUA,CAAA,EAAyB;EAAA,IAArBC,YAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EAClC,IAAMG,IAAI,GAAG,IAAAP,iBAAK,GAAE,CAACQ,GAAG,CAACL,YAAY,EAAE,KAAK,CAAC,CAACF,MAAM,CAAC,YAAY,CAAC;EAElE,OAAOM,IAAI;AACb,CAAC;AAED,IAAME,QAAQ,GAAG,SAAXA,QAAQA,CAAA,EAAyB;EAAA,IAArBN,YAAY,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC;EAChC,IAAMG,IAAI,GAAG,IAAAP,iBAAK,GAAE,CAACU,QAAQ,CAACP,YAAY,EAAE,KAAK,CAAC,CAACF,MAAM,CAAC,YAAY,CAAC;EAEvE,OAAOM,IAAI;AACb,CAAC;AAEM,IAAMI,SAAS,GAAG;EAAEZ,WAAW,EAAXA,WAAW;EAAEG,UAAU,EAAVA,UAAU;EAAEO,QAAQ,EAARA;AAAS,CAAC;AAACG,OAAA,CAAAD,SAAA,GAAAA,SAAA"}