Skip to content

Commit

Permalink
UHM-7518, display the DOB without the timezone component
Browse files Browse the repository at this point in the history
  • Loading branch information
cioan committed Oct 30, 2023
1 parent 799931c commit 0c579bf
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ function RegisterPatientRelationship(patientRelationship) {
//returns Date in the String format YYYY-MM-DD
function formatDate(inputDate) {
if (inputDate) {
if ( inputDate.length > 23 ) {
//remove the timezone suffix
inputDate = inputDate.substring(0,23);
}
let date = new Date(inputDate);
let year = date.toLocaleString("default", { year: "numeric" });
let month = date.toLocaleString("default", { month: "short" });
Expand Down

0 comments on commit 0c579bf

Please sign in to comment.