Night and evening are different words
The key distinction is between tun, meaning night, and kech, meaning evening. Xayrli kech is a greeting when meeting someone in the evening, while Xayrli tun is for finishing an encounter. This matters when you arrive somewhere after dark: a literal translation of an English farewell will not do the job of saying hello. Use the context of arriving or leaving as your guide instead of relying solely on the time.
How the ending signals courtesy
Yaxshi uxlang contains a polite imperative, making it a useful sleep wish when addressing someone respectfully. The shorter Yaxshi uxla is for one familiar person. English speakers sometimes miss this difference because Sleep well does not change according to the listener. If you are unsure how familiar to be, start with the polite wording. You can still use the standard night-time farewell regardless of whether your relationship is close or formal.
Rest and dreams in a bedtime conversation
Yaxshi dam oling refers to resting rather than sleeping specifically. It suits a traveller and host who are taking leave after a tiring day, but could also be used before an afternoon rest. Shirin tushlar, by contrast, belongs to a more affectionate bedtime exchange. A personal message to a partner or child can combine it with the usual night-time farewell. You do not need to add the dreaming wish to an ordinary courteous goodbye.