// resources/js/helpers/formatter.js
export const formatRupiah = (value) => {
    if (!value && value !== 0) return "0";
    return new Intl.NumberFormat("id-ID").format(value);
};

export const formatDate = (date) => {
    if (!date) return "-";
    return new Date(date).toLocaleDateString("id-ID", {
        day: "numeric",
        month: "long",
        year: "numeric",
        hour: "2-digit",
        minute: "2-digit",
    });
};
