X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=qml%2FLichViet%2Famlich-hnd.js;fp=qml%2FLichViet%2Famlich-hnd.js;h=ec77e95756df12abe845596817f7fa14b9b25d70;hb=07ef9831751a156dc69a724477e1804773775386;hp=fbcdae569ff770017f4cd70df0a35f18f67a74e1;hpb=3ddd466743c0ac6156183f2903ba1d58fe7bd5a4;p=lichviet diff --git a/qml/LichViet/amlich-hnd.js b/qml/LichViet/amlich-hnd.js index fbcdae5..ec77e95 100644 --- a/qml/LichViet/amlich-hnd.js +++ b/qml/LichViet/amlich-hnd.js @@ -157,6 +157,7 @@ function decodeLunarYear(yy, k) { LML = leapMonthLength; RMM = regularMonths; + return ly; } @@ -201,6 +202,7 @@ function getYearInfo(yyyy) { var FIRST_DAY = jdn(25, 1, 1800); // Tet am lich 1800 var LAST_DAY = jdn(31, 12, 2199); + function findLunarDate(jd, ly) { if (jd > LAST_DAY || jd < FIRST_DAY || ly[0].jd > jd) { return new LunarDate(0, 0, 0, 0, jd); @@ -211,6 +213,7 @@ function findLunarDate(jd, ly) { } var off = jd - ly[i].jd; var ret = new LunarDate(ly[i].day+off, ly[i].month, ly[i].year, ly[i].leap, jd); + return ret; }