projects
/
lichviet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop'
[lichviet]
/
qml
/
LichViet
/
CacNgayLeTrongNam.js
diff --git
a/qml/LichViet/CacNgayLeTrongNam.js
b/qml/LichViet/CacNgayLeTrongNam.js
index
0af4c81
..
06db5ab
100644
(file)
--- a/
qml/LichViet/CacNgayLeTrongNam.js
+++ b/
qml/LichViet/CacNgayLeTrongNam.js
@@
-88,17
+88,17
@@
var Loi_Hay_Y_Dep = new Array(
"Hãy yêu mến lời khuyên can,<br>đừng yêu mếm lời tâng nịnh.<br><i>(Ngạn ngữ Nga)</i>"
);
"Hãy yêu mến lời khuyên can,<br>đừng yêu mếm lời tâng nịnh.<br><i>(Ngạn ngữ Nga)</i>"
);
-function get(obj) {
+function get(curDay, curMonth,lunarDay, lunarMonth) {
var day_info = "";
for (var i=0;i<AmLich.length;i++)
var day_info = "";
for (var i=0;i<AmLich.length;i++)
- if (AmLich[i][0] == obj.lunarDay && AmLich[i][1] == obj.lunarMonth){
+ if (AmLich[i][0] == lunarDay && AmLich[i][1] == lunarMonth){
day_info+=AmLich[i][2];
break;
}
for(i=0;i<DuongLich.length;i++)
day_info+=AmLich[i][2];
break;
}
for(i=0;i<DuongLich.length;i++)
- if (DuongLich[i][0] == obj.curDay && DuongLich[i][1] == obj.curMonth){
+ if (DuongLich[i][0] == curDay && DuongLich[i][1] == curMonth){
if (!day_info)
day_info=DuongLich[i][2];
else
if (!day_info)
day_info=DuongLich[i][2];
else
@@
-111,10
+111,15
@@
function get(obj) {
var rannum=Math.floor(Math.random()*Loi_Hay_Y_Dep.length)
day_info = Loi_Hay_Y_Dep[rannum];
}
var rannum=Math.floor(Math.random()*Loi_Hay_Y_Dep.length)
day_info = Loi_Hay_Y_Dep[rannum];
}
+
return day_info;
}
function is_holiday(day, month, lunar_day, lunar_month){
return day_info;
}
function is_holiday(day, month, lunar_day, lunar_month){
+
+ if (day === 0 || month === 0)
+ return false;
+
for(var i=0;i<DuongLich.length;i++)
if (DuongLich[i][0] == day && DuongLich[i][1] ==month)
return true;
for(var i=0;i<DuongLich.length;i++)
if (DuongLich[i][0] == day && DuongLich[i][1] ==month)
return true;