Skip to content

ccusage / data-loader / formatDateCompact

Function: formatDateCompact()

ts
function formatDateCompact(dateStr): string;

Formats a date string to compact format with year on first line and month-day on second

Parameters

ParameterTypeDescription
dateStrstringInput date string

Returns

string

Formatted date string with newline separator (YYYY\nMM-DD)

Released under the MIT License.