---
description: >-
  As the name suggests, this functions is to get date. This function when used
  without any arguments returns a date in this format 'yyyy-mm-dd'.
---

# getDate

It is very important to be cautious because different date formats can lead into wrong results when in comparison.

## Parameters

1. param - (optional). If empty it will return todays date. User is also allowed to provide a date or moment object of javascript.

## Example Usages

Following examples shows all three usages of getDate function. Lets suppose we want to know the new order placement date which is today then we can use 1st or second example. We also suppose that our order delivery date is after one month then we can use the third example and use this date as a delivery date.

```javascript
app.getDate();
app.getDate(new Date());
app.getDate(new moment().add(1, "month"));
```

### Return Values

The getDate function returns a string representing the date in the format "YYYY-MM-DD".
