along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-import QtQuick 1.1
+import QtQuick 1.0
import "Themes.js" as Themes
import "main.js" as Script
horizontalAlignment: Text.AlignLeft
text: model ? model.day : ""
- color: model ? model.inmonth ? (model.current ? "red" : model.inholiday ? theme_manager.theme.markdate.holidays : "black") : "grey" : "red"
+ color: model ? model.inmonth ? (model.current ? "grey" : model.inholiday ? theme_manager.theme.markdate.holidays : "black") : "grey" : "red"
font.pointSize: parent.width > parent.height ? parent.width ? parent.width / 6 : 1 : parent.width / 4
font.bold: true
}
horizontalAlignment: Text.AlignBottom
text: model ? model.lunar_day : ""
- color: model ? model.inmonth ? (model.current ? "red" : "#700070") : "grey" : "red"
+ color: model ? model.inmonth ? (model.current ? "white" : "#700070") : "grey" : "red"
font.pointSize: parent.width > parent.height ? parent.width ? parent.width / 8 : 1 : parent.width / 5
}
var firstdayofthemonthyear = Script.getLunarDate(1,m_month,m_year).jd;
var startfrom = (firstdayofthemonthyear+1)%7;
- var daysofthemonthyear = Script.calDays(m_month,m_year);
+ var daysofthemonthyear = Script.calDaysX(m_month,m_year);
var j=1;
var totalslot = 42;
}
function get_prevmonth(startfrom){
- var cMonth=m_month;
+ var cMonth=m_month-1;
var cYear=m_year;
var pmonth = [];
- if (cMonth == 1){
- cMonth = 12
+
+ if (cMonth === 0){
+ cMonth = 12;
cYear--;
- }else
- cMonth--;
- var daysofthemonthyear = Script.calDays(cMonth,cYear);
+ }
+
+ var daysofthemonthyear = Script.calDaysX(cMonth,cYear);
for (var i=daysofthemonthyear;i>daysofthemonthyear-startfrom;i--){
var lunarcl = Script.getLunarDate(i,cMonth,cYear)
pmonth.push({duong:i, am:lunarcl.day, month:cMonth, year:cYear})
}
function get_nextmonth(startfrom){
- var cMonth=m_month;
+ var cMonth=m_month+1;
var cYear=m_year;
var pmonth = [];
- if (cMonth==12){
- cMonth = 1;
+
+ if (cMonth === 13){
+ cMonth=1;
cYear++;
- }else
- cMonth++;
+ }
for (var i=1;i<=startfrom;i++){
var lunarcl = Script.getLunarDate(i,cMonth,cYear)