• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révisionf61d4d156da461f6cf0437ddf93260b0bd26a5dd (tree)
l'heure2020-04-07 22:08:48
AuteurKazuhiro Fujieda <fujieda@user...>
CommiterKazuhiro Fujieda

Message de Log

戦果の平均の割る日数が一日多いのを直す

Change Summary

Modification

--- a/LogViewer/tags.tag
+++ b/LogViewer/tags.tag
@@ -929,6 +929,7 @@ this.calcResult = function(data) {
929929 var lastDate = moment(0);
930930 var lastExp = -1;
931931 var nextDate = moment(0);
932+ var lastEmit = moment(0);
932933 for (var i = 0; i < data.length; i++) {
933934 var row = data[i];
934935 var date = this.parseDate(row[0]);
@@ -948,6 +949,7 @@ this.calcResult = function(data) {
948949 }
949950 if (nextDate.valueOf() !== 0) {
950951 var d = isNewDate ? nextDate.subtract(1, 'days') : endOfMonth;
952+ lastEmit = isNewDate ? d : moment(0);
951953 var m = d.format("YYYY-MM");
952954 if (!this.result[m])
953955 this.result[m] = [];
@@ -997,10 +999,10 @@ this.calcResult = function(data) {
997999 lastDate = date;
9981000 lastExp = exp;
9991001 }
1000- if (lastDate.isBefore(endOfMonth)) {
1002+ if (lastEmit.valueOf() !== 0) {
10011003 var eom = endOfMonth.format("YYYY-MM");
1002- var ave = (perMonth - carryOverAch) / lastDate.date();
1003- var estimate = perMonth + ave * (endOfMonth.date() - lastDate.date());
1004+ var ave = (perMonth - carryOverAch) / lastEmit.date();
1005+ var estimate = perMonth + ave * (endOfMonth.date() - lastEmit.date());
10041006 this.result[eom].push([endOfMonth.format("YYYY-MM-DD 予測"), ave.toFixed(1) + " 平均", estimate.toFixed(1) + " 予測", monthEo + " 合計", (estimate + monthEo).toFixed(1) + " 予測"]);
10051007 }
10061008 };