Display message according to time of day


this is probably super simple - but then so am I!
Does anyone know where I may find some actionscript code that will get the time froma user’s computer and then display a message according to wether it is day or night

1am-11am = “Good morning”

12pm- 12am= “Good evening”

thanks in adavnce