Whenever you want to greet someone in a polite and neutral way:
You walk into a pharmacy at 9 am:
Buenos días.
Morning.
You show up at a birthday party a bit late:
Buenas noches a todos.
Evening, everyone.
You pass the tamale lady on the street at 3 pm:
Buenas tardes.
Afternoon.
Checking login…