Display correct welcome message when hour is exactly 6, 12 or 18
This commit is contained in:
parent
49fb7f03b1
commit
e17583fb63
1 changed files with 128 additions and 128 deletions
|
@ -22,11 +22,11 @@
|
|||
$("#hello-message").fadeOut(2400, function() {
|
||||
var date = new Date()
|
||||
var hours = date.getHours()
|
||||
if (hours > 6 && hours < 12) {
|
||||
if (hours >= 6 && hours < 12) {
|
||||
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-morning') . ', ' . $name ?>');
|
||||
} else if (hours > 12 && hours < 18) {
|
||||
} else if (hours >= 12 && hours < 18) {
|
||||
$(this).html('<span class="fa fa-sun-o"></span><?php echo $L->g('good-afternoon') . ', ' . $name ?>');
|
||||
} else if (hours > 18 && hours < 22) {
|
||||
} else if (hours >= 18 && hours < 22) {
|
||||
$(this).html('<span class="fa fa-moon-o"></span><?php echo $L->g('good-evening') . ', ' . $name ?>');
|
||||
} else {
|
||||
$(this).html('<span class="fa fa-moon-o"></span><span><?php echo $L->g('good-night') . ', ' . $name ?></span>');
|
||||
|
|
Loading…
Reference in a new issue