fecha.js 263 B

1234567
  1. export function getLocalDateString() {
  2. const now = new Date();
  3. const year = now.getFullYear();
  4. const month = String(now.getMonth() + 1).padStart(2, "0");
  5. const day = String(now.getDate()).padStart(2, "0");
  6. return `${year}-${month}-${day}`;
  7. }