Update vendor compliance report UI
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
@@ -8,6 +8,14 @@ export function toDateInput(dateString?: string | null): string {
|
||||
return dateString.split('T')[0];
|
||||
}
|
||||
|
||||
export function todayAsDateInput(): string {
|
||||
const now = new Date();
|
||||
const year = now.getFullYear();
|
||||
const month = String(now.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(now.getDate()).padStart(2, "0");
|
||||
return `${year}-${month}-${day}`;
|
||||
}
|
||||
|
||||
export function formatDate(dateInput?: string | null): string {
|
||||
if (!dateInput) return "";
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ export {
|
||||
formatDatetime,
|
||||
formatDate,
|
||||
toDateInput,
|
||||
todayAsDateInput,
|
||||
formatDuration,
|
||||
parseDate,
|
||||
} from "./date";
|
||||
|
||||
Reference in New Issue
Block a user