날짜포멧 수정
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
/**
|
||||
* 매매 시그널 알림 표시용 포맷·라벨
|
||||
*/
|
||||
import { formatUnixWithChartPattern, splitChartTimePattern } from './chartTimeFormat';
|
||||
import { getKoreanName } from './marketNameCache';
|
||||
import { formatUnixDateTime, formatUnixClock, getDisplayTimezone } from './timezone';
|
||||
import { getTradeAlertTimeFormat } from './tradeAlertTimeFormat';
|
||||
import { getDisplayTimezone } from './timezone';
|
||||
|
||||
export interface TradeSignalDisplaySource {
|
||||
market: string;
|
||||
@@ -31,8 +33,12 @@ export function formatSignalPrice(price: number): string {
|
||||
export function formatSignalTime(unixSec: number, withDate = true): string {
|
||||
if (!unixSec) return '—';
|
||||
const tz = getDisplayTimezone();
|
||||
if (!withDate) return formatUnixClock(unixSec, tz, true);
|
||||
return formatUnixDateTime(unixSec, tz);
|
||||
const fmt = getTradeAlertTimeFormat();
|
||||
if (!withDate) {
|
||||
const { time } = splitChartTimePattern(fmt);
|
||||
return formatUnixWithChartPattern(unixSec, time || 'HH:mm', tz);
|
||||
}
|
||||
return formatUnixWithChartPattern(unixSec, fmt, tz);
|
||||
}
|
||||
|
||||
export function getSignalTypeKo(type: 'BUY' | 'SELL'): string {
|
||||
|
||||
Reference in New Issue
Block a user