All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.cjs.utils.datetime.js.map Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
{"version":3,"file":"datetime.js","names":["_dayjs","_interopRequireDefault","require","getDefaultFormat","_globalProps$user$dat","_globalProps","_globalProps$user","globalProps","user","dateFormat","timeFormat","exports","fromNow","time","dayjs","format","timeWithSeconds","date","dateWeek","dateWeekDayExtended","dateWeekWithoutYear","dateWeekWithoutYearDayExtended","dateTime","dateTimeWithSeconds","dateWeekTime","dateWeekTimeDayExtended","extended","concat","default","defaultWithTime"],"sources":["../../../src/utils/datetime.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/use-standard-date-time-formats */\nimport dayjs from \"./dayjs\";\n\nconst getDefaultFormat = () => globalProps?.user?.dateFormat ?? \"DD/MM/YYYY\";\n\nexport const timeFormat = {\n  fromNow: time => dayjs(time).fromNow(),\n  time: time => dayjs(time).format(\"LT\"),\n  timeWithSeconds: time => dayjs(time).format(\"LTS\"),\n  date: time => dayjs(time).format(\"ll\"),\n  dateWeek: time => dayjs(time).format(\"ll ddd\"),\n  dateWeekDayExtended: time => dayjs(time).format(\"ll dddd\"),\n  dateWeekWithoutYear: time => dayjs(time).format(\"MMM D, ddd\"),\n  dateWeekWithoutYearDayExtended: time => dayjs(time).format(\"MMM D, dddd\"),\n  dateTime: time => dayjs(time).format(\"ll LT\"),\n  dateTimeWithSeconds: time => dayjs(time).format(\"ll LTS\"),\n  dateWeekTime: time => dayjs(time).format(\"ll ddd LT\"),\n  dateWeekTimeDayExtended: time => dayjs(time).format(\"ll dddd LT\"),\n  extended: time => {\n    const dateTime = dayjs(time).format(\"dddd LL LT\");\n    const fromNow = dayjs(time).fromNow();\n\n    return `${dateTime} (${fromNow})`;\n  },\n  default: time => dayjs(time).format(getDefaultFormat()),\n  defaultWithTime: time => dayjs(time).format(`${getDefaultFormat()} LTS`),\n};\n\nex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