asv-hlps 1.3.26 → 1.3.27

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.
@@ -88,7 +88,7 @@ export declare const returnBool: (tob?: boolean) => boolean;
88
88
  export declare const monthStringName: (date: string | Date, format?: "MMM" | "MMMM", options?: {
89
89
  en?: true;
90
90
  }) => string;
91
- export declare const dateFormatter: (date: Date | string, format?: "y" | "ymd" | "dmy" | "ago" | "md" | "dmy-hm" | "dmyfr" | "myfr" | "mfr-short" | "mfr-long", separator?: "/" | "" | "-") => string;
91
+ export declare const dateFormatter: (date: Date | string, format?: "y" | "ym" | "ymd" | "dmy" | "ago" | "md" | "dmy-hm" | "dmyfr" | "myfr" | "mfr-short" | "mfr-long", separator?: "/" | "" | "-") => string;
92
92
  export declare const countryIsoToFlag: (code: string) => string;
93
93
  export declare const removeParamKeyName: (params: any, name?: string) => any;
94
94
  export declare const toggleProp: (tob: any, propToToggle: string) => any;
package/lib/cjs/utils.js CHANGED
@@ -620,6 +620,8 @@ const dateFormatter = (date, format = "dmy", separator = "/") => {
620
620
  switch (format) {
621
621
  case "y":
622
622
  return (0, dayjs_1.default)(date).format("YYYY");
623
+ case "ym":
624
+ return (0, dayjs_1.default)(date).format(`YYYY${separator}MM`);
623
625
  case "ymd":
624
626
  return (0, dayjs_1.default)(date).format(`YYYY${separator}MM${separator}DD`);
625
627
  case "md":
@@ -88,7 +88,7 @@ export declare const returnBool: (tob?: boolean) => boolean;
88
88
  export declare const monthStringName: (date: string | Date, format?: "MMM" | "MMMM", options?: {
89
89
  en?: true;
90
90
  }) => string;
91
- export declare const dateFormatter: (date: Date | string, format?: "y" | "ymd" | "dmy" | "ago" | "md" | "dmy-hm" | "dmyfr" | "myfr" | "mfr-short" | "mfr-long", separator?: "/" | "" | "-") => string;
91
+ export declare const dateFormatter: (date: Date | string, format?: "y" | "ym" | "ymd" | "dmy" | "ago" | "md" | "dmy-hm" | "dmyfr" | "myfr" | "mfr-short" | "mfr-long", separator?: "/" | "" | "-") => string;
92
92
  export declare const countryIsoToFlag: (code: string) => string;
93
93
  export declare const removeParamKeyName: (params: any, name?: string) => any;
94
94
  export declare const toggleProp: (tob: any, propToToggle: string) => any;
package/lib/esm/utils.js CHANGED
@@ -550,6 +550,8 @@ export const dateFormatter = (date, format = "dmy", separator = "/") => {
550
550
  switch (format) {
551
551
  case "y":
552
552
  return dayjs(date).format("YYYY");
553
+ case "ym":
554
+ return dayjs(date).format(`YYYY${separator}MM`);
553
555
  case "ymd":
554
556
  return dayjs(date).format(`YYYY${separator}MM${separator}DD`);
555
557
  case "md":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.3.26",
3
+ "version": "1.3.27",
4
4
  "description": "helpers",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",