MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / parseChineseUtcDate

Function parseChineseUtcDate

packages/parser/src/formats/google-chat-takeout.ts:134–147  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

132}
133
134function parseChineseUtcDate(value: string): number | null {
135 const match = normalizeSpaces(value).match(
136 /^(\d{4})年(\d{1,2})月(\d{1,2})日(?:星期[一二三四五六日天])?\s+UTC\s+(\d{1,2}):(\d{2}):(\d{2})$/
137 )
138 if (!match) return null
139 return createUtcTimestamp(
140 Number(match[1]),
141 Number(match[2]) - 1,
142 Number(match[3]),
143 Number(match[4]),
144 Number(match[5]),
145 Number(match[6])
146 )
147}
148
149function parseEnglishUtcDate(value: string): number | null {
150 const match = normalizeSpaces(value).match(

Callers 1

parseGoogleChatDateFunction · 0.85

Calls 2

normalizeSpacesFunction · 0.85
createUtcTimestampFunction · 0.85

Tested by

no test coverage detected