module.exports = {
  getGreet: getGreet
}

function getGreet() {
  const now = new Date();
  const hour = now.getHours();
  var greeting;
  if (hour >= 5 && hour < 12) {
    greeting = '上午好';
  } else if (hour >= 12 && hour < 18) {
    greeting = '下午好';
  } else {
    greeting = '晚上好';
  }
  return greeting;
};