Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update minimal-greetings.html #148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions minimal/minimal-greetings.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,29 +95,29 @@

function dispalyGreetings(today){
hrs = today.getHours();
name=""
name="Kiên Fox | Applus"
if (hrs < 12)
greet = 'Good Morning '+name;
greet = 'Chào Buổi Sáng '+name;
else if (hrs >= 12 && hrs <= 17)
greet = 'Good Afternoon '+name;
greet = 'Chào Buổi Chiều '+name;
else if (hrs >= 17 && hrs <= 24)
greet = 'Good Evening '+name;
greet = 'Chào Buổi Tối '+name;
document.getElementById('greet').innerHTML = greet;

}

function dispalyDate(today) {

const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
const monthNames = ["January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November", "December"
const days = ['Chủ Nhật', 'Thứ Hai', 'Thứ Ba', 'Thứ Tư', 'Thứ Năm', 'Thứ Sáu', 'Thứ Bảy'];
const monthNames = ["Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6",
"Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"
];

var dayName = days[today.getDay()];
var monthName = monthNames[today.getMonth()];
var date = today.getDate();
var year = today.getFullYear();
document.getElementById('date').innerHTML =dayName+", "+monthName+" "+date+" "+year;
document.getElementById('date').innerHTML =dayName+", "+date+" "+monthName+" "+year;

}

Expand Down Expand Up @@ -169,4 +169,4 @@
</script>

</body>
</html>
</html>