update book code

This commit is contained in:
Unknwon
2015-03-03 12:25:25 -05:00
parent b8c82ba4e5
commit eab1d98ba8
465 changed files with 15392 additions and 1572 deletions

View File

@@ -0,0 +1,27 @@
package greetings
import "time"
func GoodDay(name string) string {
return "Good Day " + name
}
func GoodNight(name string) string{
return "Good Night " + name
}
func IsAM() bool {
localTime := time.Now()
return localTime.Hour() <= 12
}
func IsAfternoon() bool {
localTime := time.Now()
return localTime.Hour() <= 18
}
func IsEvening() bool {
localTime := time.Now()
return localTime.Hour() <= 22
}