release v2.0.0 #4

Merged
crimsen merged 481 commits from develop into master 2024-01-18 15:15:08 +00:00
2 changed files with 6 additions and 2 deletions
Showing only changes of commit 6f053d849a - Show all commits

View File

@ -127,7 +127,7 @@ export default defineComponent({
}
function modifyDate(v: string, d: Date | undefined = props.modelValue) {
if (!d) d = new Date();
if (!d) d = q_date.buildDate({ hours: 0, minutes: 0, seconds: 0 });
if (/^\d{4}-\d\d-\d\d$/.test(v)) {
const split = v.split('-');
return q_date.adjustDate(d, {

View File

@ -17,8 +17,12 @@ export function formatDateTime(
return dateTimeFormat.format(date);
}
export function asDate(date?: Date) {
return date ? formatDateTime(date, true) : '';
}
export function asHour(date?: Date) {
if (date) return formatDateTime(date, false, true);
return date ? formatDateTime(date, false, true) : '';
}
export function startOfWeek(date: Date, startMonday = true) {