Browse Source

fix:update format date

pull/1/head
wahyun 6 months ago
parent
commit
313c7e5e72
  1. 17
      edit-mode/function/function.js

17
edit-mode/function/function.js

@ -314,16 +314,17 @@ function formatReplaceTitikRibuan(param) {
} }
function formatDate(params) { function formatDate(params) {
let today = new Date(params); const months = [
let yyyy = today.getFullYear(); 'January', 'February', 'March', 'April', 'May', 'June',
let mm = today.getMonth() + 1; // Months start at 0! 'July', 'August', 'September', 'October', 'November', 'December'
let dd = today.getDate(); ];
if (dd < 10) dd = '0' + dd; let today = new Date(params);
if (mm < 10) mm = '0' + mm; let yyyy = today.getFullYear();
let mm = today.getMonth(); // Bulan dimulai dari 0!
let dd = today.getDate();
today = dd + '/' + mm + '/' + yyyy; return `${dd} ${months[mm]} ${yyyy}`;
return today;
} }
function roundToTwo(num) { function roundToTwo(num) {

Loading…
Cancel
Save