@lobehub/chat
Version:
Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.
15 lines (13 loc) • 321 B
text/typescript
export const parseGreetingTime = () => {
const now = new Date();
const hours = now.getHours();
if (hours >= 4 && hours < 11) {
return 'morning';
} else if (hours >= 11 && hours < 14) {
return 'noon';
} else if (hours >= 14 && hours < 18) {
return 'afternoon';
} else {
return 'night';
}
};