meemup-library 1.0.45 → 1.0.46
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.
|
@@ -16,5 +16,6 @@ declare const _default: {
|
|
|
16
16
|
convertTimeStringToDateByT(data?: Date | string | null): Date | string | null;
|
|
17
17
|
formatAMPMDate(date: Date | string | null): string;
|
|
18
18
|
formatDateTime(dateTime: string, mode?: string): string;
|
|
19
|
+
createDateOption(count?: number): ITextValue[];
|
|
19
20
|
};
|
|
20
21
|
export default _default;
|
|
@@ -298,4 +298,14 @@ export default new class DateTimeController {
|
|
|
298
298
|
return dateTime;
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
|
+
createDateOption(count = 30) {
|
|
302
|
+
let date = new Date();
|
|
303
|
+
date.setDate(date.getDate() - count);
|
|
304
|
+
let list = [];
|
|
305
|
+
for (let index = 0; index <= count; index++) {
|
|
306
|
+
list.push(this.toDateString(date));
|
|
307
|
+
date.setDate(date.getDate() + 1);
|
|
308
|
+
}
|
|
309
|
+
return list.reverse().map(i => ({ text: i, value: i }));
|
|
310
|
+
}
|
|
301
311
|
}();
|