nomadro/apps/nomadvip/config/promo.config.ts
eric 56b29205e7 Integrate four verticals into nomadro portal with shared packages and API gateway.
Mount /vip with nomadvip+payjsapi, add @nomadro/pay|pb|sdk, apps/api, /admin shell, and backup/rollback scripts under git.nomadro.cn workflow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 20:16:44 -05:00

29 lines
616 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/**
* 限时特惠 / 促销展示配置
* 恢复原价日期 = 当天 + 2 天
*/
const DAYS_OFFSET = 2;
function getRestoreDate(): Date {
const d = new Date();
d.setDate(d.getDate() + DAYS_OFFSET);
return d;
}
/**
* 格式化为中文展示:3月12日
*/
export function formatRestoreDateShort(): string {
const d = getRestoreDate();
return `${d.getMonth() + 1}月${d.getDate()}日`;
}
/**
* 格式化为完整中文:2025年3月12日
*/
export function formatRestoreDateFull(): string {
const d = getRestoreDate();
return `${d.getFullYear()}年${d.getMonth() + 1}月${d.getDate()}日`;
}