asv-hlps 1.0.15 → 1.0.16

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.
@@ -59,3 +59,4 @@ export declare const validEmail: (email: string) => boolean;
59
59
  export declare const calculPercent: (nbr: number, percentage: number) => number;
60
60
  export declare const padStartWithZero: (num: any, targetLength: number) => any;
61
61
  export declare const padEndWithZero: (num: any, targetLength: number) => any;
62
+ export declare const isBirthday: (birthDayDate: any) => boolean;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.calculPercent = exports.validEmail = exports.convertToCfa = exports.packAndUnit = exports.arrayMultiChecked = exports.unCheckedAll = exports.checked = exports.getColorAccordingToDate = exports.genRandomColour = exports.formatNgbDate = exports.dateToString = exports.replaceSpacesWith = exports.replaceAllIn = exports.sesStorageGet = exports.sesStorageSet = exports.genSequenceRef = exports.removeBackSlashOccurences = exports.removeString = exports.deepClone = exports.findFirstSequenceMissing = exports.fillNumWithZero = exports.findSequencesMissing = exports.sequencesToNumbers = exports.absFromSequence = exports.reformatDates = exports.formatToStringCfa = exports.formatToString = exports.wakeUp = exports.sleep = exports.limitTo = exports.titleCase = exports.toObjectDate = exports.removeDuplicates = exports.getRandomColor = exports.getNbOfDaysBetweenTwoDates = exports.displayDateRangeFr = exports.calPercent = exports.percentOf = exports.genDateMinutesStep = exports.convertFrDateToEnDate = exports.convertEnDateToFr = exports.formatDateMd = exports.formatDateYm = exports.formatDateYmFirstDay = exports.formatDateYmd = exports.formatFromAndToDate = exports.formatDateYmHypen = exports.formatDateFirstDayFr = exports.formatDateYmdHypenFr = exports.formatDateYmdHypen = void 0;
4
- exports.padEndWithZero = exports.padStartWithZero = void 0;
4
+ exports.isBirthday = exports.padEndWithZero = exports.padStartWithZero = void 0;
5
5
  const formatDateYmdHypen = (date) => {
6
6
  return (0, exports.formatDateYmd)(date, '-');
7
7
  };
@@ -376,3 +376,11 @@ const padEndWithZero = (num, targetLength) => {
376
376
  return num.toString().padEnd(targetLength, 0);
377
377
  };
378
378
  exports.padEndWithZero = padEndWithZero;
379
+ const isBirthday = (birthDayDate) => {
380
+ if (birthDayDate) {
381
+ const toDay = (0, exports.formatDateMd)(new Date());
382
+ const birthDay = (0, exports.formatDateMd)(new Date(birthDayDate));
383
+ return toDay === birthDay;
384
+ }
385
+ };
386
+ exports.isBirthday = isBirthday;
@@ -59,3 +59,4 @@ export declare const validEmail: (email: string) => boolean;
59
59
  export declare const calculPercent: (nbr: number, percentage: number) => number;
60
60
  export declare const padStartWithZero: (num: any, targetLength: number) => any;
61
61
  export declare const padEndWithZero: (num: any, targetLength: number) => any;
62
+ export declare const isBirthday: (birthDayDate: any) => boolean;
@@ -320,3 +320,10 @@ export const padStartWithZero = (num, targetLength) => {
320
320
  export const padEndWithZero = (num, targetLength) => {
321
321
  return num.toString().padEnd(targetLength, 0);
322
322
  };
323
+ export const isBirthday = (birthDayDate) => {
324
+ if (birthDayDate) {
325
+ const toDay = formatDateMd(new Date());
326
+ const birthDay = formatDateMd(new Date(birthDayDate));
327
+ return toDay === birthDay;
328
+ }
329
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "description": "",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",