in glean_parser/javascript.py [0:0]
def generate_build_date(date: Optional[str]) -> str:
"""
Generate the build Date object.
"""
ts = util.build_date(date)
data = [
str(ts.year),
# In JavaScript the first month of the year in calendars is JANUARY which is 0.
# In Python it's 1-based
str(ts.month - 1),
str(ts.day),
str(ts.hour),
str(ts.minute),
str(ts.second),
]
components = ", ".join(data)
# DatetimeMetricType takes a `Date` instance.
return f"new Date({components})" # noqa