79717560

Date: 2025-07-28 15:36:33
Score: 0.5
Natty:
Report link

You can write a helper function to perform the transformation:

function formatDate(year) {
  if (year < 0) {
    return `${Math.abs(year)} BCE`;
  } else {
    return `${year}`;
  }
}

Then, you can call the helper using, for example, formatDate(-3600) to get "3600 BCE".

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: p011y