'Enjoy the rest of your day'. What is the name for such expressions?

Nowadays people everywhere will, after a conversation, invite you to 'enjoy the rest of your day'. When on holiday on one occasion I was urged to 'enjoy the rest of your holiday'.

What is the purpose of such expressions which seem to me to be there simply as a way of ending conversations?

Is there a name for such things?


While it's not specific to ending a conversation, consider pleasantries:

An inconsequential remark made as part of a polite conversation


These phrases are specifically called valedictions (WP) :

A valediction (derivation from Latin vale dicere, 'to say farewell'), or complimentary close in American English, is an expression used to say farewell, especially a word or phrase used to end a letter or message, or the act of saying parting words whether brief or extensive.

As to "why": to explicitly (and politely) inform you that the other party considers the conversation complete and ended: over and out.

Yours sincerely,

-Dan


This type of communication is phatic:

ADJECTIVE

Denoting or relating to language used for general purposes of social interaction, rather than to convey information or ask questions. Utterances such as hello, how are you? and nice morning, isn’t it? are phatic.

(Definition from Oxforddictionaries.com.)


It's a farewell,

An expression of good wishes at parting

Essentially you are right, it's a polite way to end a conversation.


You could probably use salutation. Typically it is used to refer greetings at the start of a conversation but can also be used to describe parting phrases such as enjoy the rest of your holiday.

A gesture or utterance made as a greeting or acknowledgement of another’s arrival or departure.

(Source: Oxford Dictionaries)