3달간 수정 사항
This commit is contained in:
@@ -250,7 +250,7 @@ export const postFileDownload = (url: string, params: any) => {
|
||||
if (matches != null && matches[1])
|
||||
filename = matches[1].replace(/['"]/g, '');
|
||||
}
|
||||
const blob = new Blob([resp.data], {type: resp.headers['content-type']});
|
||||
const blob = new Blob([resp.data], {type: resp.headers['content-type'] as string | undefined});
|
||||
const link = document.createElement('a');
|
||||
link.href = window.URL.createObjectURL(blob);
|
||||
//link.download = filename;
|
||||
@@ -264,6 +264,25 @@ export const postFileDownload = (url: string, params: any) => {
|
||||
});
|
||||
}
|
||||
|
||||
// YYYY-MM-DD
|
||||
export const todayYMD = () => {
|
||||
const d = new Date();
|
||||
const y = d.getFullYear();
|
||||
const m = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return `${y}-${m}-${day}`;
|
||||
}
|
||||
|
||||
export const addDaysYMD = (days: number) => {
|
||||
const now = new Date();
|
||||
const d = new Date(now);
|
||||
d.setDate(d.getDate() + days);
|
||||
const y = d.getFullYear();
|
||||
const m = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return `${y}-${m}-${day}`;
|
||||
}
|
||||
|
||||
// DB TIMESTAMP DATETIME modify (yyyy-MM-dd HH:mm:ss.0 -> yyyy-MM-dd HH:mm)
|
||||
export const convertDateTime = (tsDateTime: string) => {
|
||||
if (tsDateTime == undefined)
|
||||
@@ -403,8 +422,7 @@ export function formatBusinessNumber(input: string): string {
|
||||
//console.log(isValidBusinessNumber("220-81-62517")); // true (실제 유효 번호 예시)
|
||||
export function isValidBusinessNumber(input: string): boolean {
|
||||
|
||||
return true;
|
||||
|
||||
//return true;
|
||||
|
||||
const digits = input.replace(/\D/g, "");
|
||||
if (digits.length !== 10)
|
||||
|
||||
Reference in New Issue
Block a user