package.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","currentDate","format","futureDate","numberOfDays","arguments","length","undefined","date","add","pastDate","subtract","dateUtils"],"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,OAAOA,KAAK,MAAM,OAAO;AAEzB,IAAMC,WAAW,GAAG,SAAdA,WAAWA,CAAA;EAAA,OAASD,KAAK,EAAE,CAACE,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,GAAGR,KAAK,EAAE,CAACS,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,GAAGR,KAAK,EAAE,CAACW,QAAQ,CAACP,YAAY,EAAE,KAAK,CAAC,CAACF,MAAM,CAAC,YAAY,CAAC;EAEvE,OAAOM,IAAI;AACb,CAAC;AAED,OAAO,IAAMI,SAAS,GAAG;EAAEX,WAAW,EAAXA,WAAW;EAAEE,UAAU,EAAVA,UAAU;EAAEO,QAAQ,EAARA;AAAS,CAAC"}