Added date format helper
This commit is contained in:
parent
1f4bc947b4
commit
2770f0e8d8
1 changed files with 11 additions and 0 deletions
|
@ -73,6 +73,17 @@ export const helperService = {
|
||||||
return correctDate.toISOString();
|
return correctDate.toISOString();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converts a date object into a date-time-timezone string and only keeps the date.
|
||||||
|
*
|
||||||
|
* @param {*} date A date object
|
||||||
|
*
|
||||||
|
* @returns Date as string in YYYY-MM-DD format
|
||||||
|
*/
|
||||||
|
toISODateOnly(date) {
|
||||||
|
return helperService.toISODate(date).substring(0, 10);
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds current duration to a record.
|
* Adds current duration to a record.
|
||||||
* Copied from original juggl code.
|
* Copied from original juggl code.
|
||||||
|
|
Loading…
Reference in a new issue