getDate

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'.

It is very important to be cautious because different date formats can lead into worng 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.

   brixxApi.getDate();
   brixxApi.getDate(new Date());
   brixxApi.getDate(new moment().add(1, "month"));

Last updated