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

package.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","getDefaultFormat","_globalProps$user$dat","_globalProps","_globalProps$user","globalProps","user","dateFormat","timeFormat","fromNow","time","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\nexport const dateFormat = timeFormat;\n"],"mappings":"AA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