@mll-lab/js-utils 2.28.0 → 2.29.0
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/dist/date.d.ts +2 -0
- package/dist/index.common.js +8 -0
- package/dist/index.common.js.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -16168,6 +16168,12 @@ function isToday(date) {
|
|
|
16168
16168
|
function isFuture(date) {
|
|
16169
16169
|
return isAfter(date, new Date());
|
|
16170
16170
|
}
|
|
16171
|
+
function isValidGermanDate(date) {
|
|
16172
|
+
return /^(\d{1,2}[.]\d{1,2}[.]\d{4})$/.test(date);
|
|
16173
|
+
}
|
|
16174
|
+
function isTimeWithHoursAndMinutes(time) {
|
|
16175
|
+
return /^(\d{2}:\d{2})$/.test(time);
|
|
16176
|
+
}
|
|
16171
16177
|
function parseDate(value, formatString) {
|
|
16172
16178
|
const parsedDate = parse(value, formatString, new Date());
|
|
16173
16179
|
return isValid(parsedDate) ? parsedDate : null;
|
|
@@ -16590,8 +16596,10 @@ exports.isOnlyDigits = isOnlyDigits;
|
|
|
16590
16596
|
exports.isPartialGermanNumber = isPartialGermanNumber;
|
|
16591
16597
|
exports.isRackBarcode = isRackBarcode;
|
|
16592
16598
|
exports.isString = isString;
|
|
16599
|
+
exports.isTimeWithHoursAndMinutes = isTimeWithHoursAndMinutes;
|
|
16593
16600
|
exports.isToday = isToday;
|
|
16594
16601
|
exports.isURL = isURL;
|
|
16602
|
+
exports.isValidGermanDate = isValidGermanDate;
|
|
16595
16603
|
exports.isWord = isWord;
|
|
16596
16604
|
exports.isZeroish = isZeroish;
|
|
16597
16605
|
exports.joinNonEmpty = joinNonEmpty;
|