how to make a method that receives a whole parameter, and calculate the time, and tell me if it is: dawn, morning, day or night
what is your whole parameter? could you give an example?
Divide the 24 hours into 4 sections - 0.00 am to 6.00 am (night), 6.00am to 12.00am (morning), 12.00pm - 6.00pm (day), 6.00pm - 0.00am (evening). Perform a string manipulations with current time to make it comparable with those sections and here you go.