MCPcopy Create free account
hub / github.com/baiwumm/react-admin / timeFix

Function timeFix

Xmw_web/src/utils/index.ts:183–187  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

181 * @Author: 白雾茫茫丶
182 */
183export const timeFix = (): string => {
184 const time = new Date()
185 const hour = time.getHours()
186 return hour < 9 ? '早上好' : hour <= 11 ? '上午好' : hour <= 13 ? '中午好' : hour < 20 ? '下午好' : '夜深了'
187}
188
189/**
190 * @description: 随机欢迎语

Callers 2

RenderContentFunction · 0.90
LoginPageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected