chore: replace all cn comments of fe to en version by volc api (#320)

This commit is contained in:
tecvan
2025-07-31 10:32:15 +08:00
committed by GitHub
parent 716ec0cba8
commit 71f6245a01
2960 changed files with 15545 additions and 15545 deletions

View File

@@ -56,13 +56,13 @@ describe('Date', () => {
expect(getCurrentTZ().utcOffset()).toBe(60 * 8);
});
it('#formatDate', () => {
// 使用固定的时间戳,但验证格式而不是具体的时区值
// Uses a fixed timestamp, but verifies the format rather than a specific timezone value
const timestamp = 1718782764;
const date = formatDate(timestamp);
// 验证格式是否正确:YYYY/MM/DD HH:mm:ss
// Verify that the format is correct: YYYY/MM/DD HH: mm: ss
expect(date).toMatch(/^\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}$/);
// 验证时间戳转换的一致性格式化后再解析应该得到相同的dayjs对象的日期部分
// Verify consistency of timestamp conversions: Formatting and parsing should result in the same date portion of the dayjs object
const formattedDayjs = dayjs(date, 'YYYY/MM/DD HH:mm:ss');
const originalDayjs = dayjs.unix(timestamp);
expect(formattedDayjs.unix()).toBe(originalDayjs.unix());