@molopos/shared 2.1.3 → 2.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/date/index.d.ts CHANGED
@@ -14,12 +14,12 @@ export declare const dateTimeNowUtc: () => Date;
14
14
  export declare const formateDate: (date: Date, locale: string) => string;
15
15
  /**
16
16
  * @example
17
- * formateddMMYYYY("2026-01-01", "en-US"); // "1 Jan 2026"
17
+ * formateddMMYYYY("2026-01-01", "en-US"); // "1 January 2026"
18
18
  */
19
19
  export declare const formateddMMYYYY: (date: DateLike, locale: string) => string;
20
20
  /**
21
21
  * @example
22
- * formateddMMYYYYHHmm("2026-01-01", "en-US"); // "1 Jan 2026 00:00"
22
+ * formateddMMYYYYHHmm("2026-01-01", "en-US"); // "1 January 2026 00:00"
23
23
  */
24
24
  export declare const formateddMMYYYYHHmm: (date: DateLike, locale: string) => string;
25
25
  /**
package/date/index.js CHANGED
@@ -25,7 +25,7 @@ const formateDate = (date, locale) => {
25
25
  ? "MMM dd, p"
26
26
  : "dd MMM p"
27
27
  : (0, date_fns_1.isFuture)(date)
28
- ? "PPpp"
28
+ ? "PPPp"
29
29
  : "Pp";
30
30
  return (0, date_fns_1.format)(date, formatString, {
31
31
  locale: dataFnsLocale[locale],
@@ -34,20 +34,20 @@ const formateDate = (date, locale) => {
34
34
  exports.formateDate = formateDate;
35
35
  /**
36
36
  * @example
37
- * formateddMMYYYY("2026-01-01", "en-US"); // "1 Jan 2026"
37
+ * formateddMMYYYY("2026-01-01", "en-US"); // "1 January 2026"
38
38
  */
39
39
  const formateddMMYYYY = (date, locale) => {
40
- return (0, date_fns_1.format)(date, "PP", {
40
+ return (0, date_fns_1.format)(date, "PPP", {
41
41
  locale: dataFnsLocale[locale],
42
42
  });
43
43
  };
44
44
  exports.formateddMMYYYY = formateddMMYYYY;
45
45
  /**
46
46
  * @example
47
- * formateddMMYYYYHHmm("2026-01-01", "en-US"); // "1 Jan 2026 00:00"
47
+ * formateddMMYYYYHHmm("2026-01-01", "en-US"); // "1 January 2026 00:00"
48
48
  */
49
49
  const formateddMMYYYYHHmm = (date, locale) => {
50
- return (0, date_fns_1.format)(date, "PPpp", {
50
+ return (0, date_fns_1.format)(date, "PPPp", {
51
51
  locale: dataFnsLocale[locale],
52
52
  });
53
53
  };
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@molopos/shared","publishConfig":{"access":"public"},"version":"2.1.3","description":"Shared between backend and frontend repos","license":"ISC","repository":{"type":"git","url":"https://github.com/unicubate/molopos-shared.git"},"dependencies":{"class-transformer":"^0.5.1","date-fns":"^4.4.0","luxon":"^3.7.2"}}
1
+ {"name":"@molopos/shared","publishConfig":{"access":"public"},"version":"2.1.4","description":"Shared between backend and frontend repos","license":"ISC","repository":{"type":"git","url":"https://github.com/unicubate/molopos-shared.git"},"dependencies":{"class-transformer":"^0.5.1","date-fns":"^4.4.0","luxon":"^3.7.2"}}