Skip to content

getFormattedDate

The getFormattedDate function converts a date into a standardized DD.MM.YYYY format using dots as separators.

{date | getFormattedDate}
  • input (string/Date): A date string or Date object to format

A string in the format DD.MM.YYYY with:

  • Two-digit day (padded with zero if needed)
  • Two-digit month (padded with zero if needed)
  • Four-digit year
  • Dots as separators
{"2024-01-15" | getFormattedDate}
// Returns: "15.01.2024"
{"2024-03-05" | getFormattedDate}
// Returns: "05.03.2024"
{"2024-12-31" | getFormattedDate}
// Returns: "31.12.2024"
{"2024-07-20T14:30:00Z" | getFormattedDate}
// Returns: "20.07.2024"
{project.completion_date | getFormattedDate}
// Returns formatted completion date with dots
{report.generated_at | getFormattedDate}
// Returns: "15.01.2024" format
  • European-style date formatting
  • Standardized date display in reports
  • File naming with dates
  • Audit timestamps
  • Document versioning dates

While formatDate offers multiple format options, getFormattedDate specifically provides:

  • Always returns DD.MM.YYYY format
  • Uses dots instead of slashes
  • No format parameter needed
  • Consistent European date style