Skip to content

Commit

Permalink
Update convertDateLocale filter
Browse files Browse the repository at this point in the history
Changed numeric to 2-digit to have 2021/08/01 instead of 2021/8/1
  • Loading branch information
yeln4ts committed Aug 25, 2021
1 parent 51e48ed commit 876b96d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/lib/report-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ expressions.filters.convertDate = function(input, s) {
expressions.filters.convertDateLocale = function(input, locale, style) {
var date = new Date(input);
if (date != "Invalid Date") {
var options = { year: 'numeric', month: 'numeric', day: 'numeric'}
var options = { year: 'numeric', month: '2-digit', day: '2-digit'}

if (style === "full")
options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric'}
Expand Down

0 comments on commit 876b96d

Please sign in to comment.