Comments (12)
不好意思,沒表達準確。
是「農曆的日期」需要一個數字鍵値。比如三月廿二,分別有個3月22日的鍵值。
這樣,以時間起卦時就可以直接調用了。
謝謝
另,我想問問,農曆黃曆現在有算法嗎?還是查表?
from chinese-lunar.
閏月的數值和不閏的一樣,區別在是否閏月的標志值
from chinese-lunar.
計算、卜卦、定應期,全部使用中國的北京時間。卽使在外國,也必須轉換成中國時間。否則不驗,不驗就是不靈,不靈還預測什麼!
from chinese-lunar.
如果農曆的月份天數同時提供一個數字鍵值較好,這樣就無需另作轉換了。以實現閉包調用。謝謝。
謝謝提供建議。
確認一下,你指的月份天數是 lunarPerMonthHasDays
這個property嗎?
lunar('2020', '03', '28').getJson().lunarPerMonthHasDays;
// return [ '29', '30', '30', '30', '29', '30', '29', '29', '30', '29', '30', '29', '30' ]
如果是的話,請問一下你的需求是什麼呢?
from chinese-lunar.
不好意思,沒表達準確。
是「農曆的日期」需要一個數字鍵値。比如三月廿二,分別有個3月22日的鍵值。
這樣,以時間起卦時就可以直接調用了。
謝謝另,我想問問,農曆黃曆現在有算法嗎?還是查表?
非常好的建議~ 感謝 我會把它納入代辦清單中
目前農曆還是查表唷。 不過我的程式,會持續更新,因為背後有學術的研究以及實務上的應用正在運作中,我是程式底去跟他們學習的,有些命理通書上的算法還在學習當中。
from chinese-lunar.
@creatxrgithub 已經入清單內囉 歡迎有任何疑問都可以在這裡留言或是寄Mail與我討論。
3543c69#diff-04c6e90faac2675aa89e2176d2eec7d8R196
from chinese-lunar.
https://zh.wikisource.org/zh/%E5%A2%9E%E5%88%AA%E5%8D%9C%E6%98%93
from chinese-lunar.
@creatxrgithub 請問一下,像是今年會遇到閏四月,你會想如何呈現數值呢?
今年的5/23~6/20 是閏四月
from chinese-lunar.
這是我自己使用的格式。沒有節日。
{ year: 2020,
month: 4,
day: 2,
lunarMonth: '三月',
lunarMonthDigit: 3,
lunarDay: '初十',
lunarDayDigit: 10,
isLunarLeapMonth: false,
chineseYear: '庚子',
chineseMonth: '己卯',
chineseDay: '乙亥'
chineseTerm:'春分',
chineseTermOffset:'偏移,有可能是負數,因爲沒去讀前一年的日曆,就使用倒數的天數,加15也不見得準確'
}
from chinese-lunar.
了解,因為我也是打算加入Digit做區別,但想到閏月的問題,這樣我也加入 isLunarLeapMonth
這個property 謝謝囉
from chinese-lunar.
const data = lunar().setChineseAge('甲子').getJson();
{
year: '2020',
month: '04',
day: '02',
solarTerms: '春分',
lunarMonth: '三月',
lunarDay: '初十',
lunarMonthDigit: 3,
lunarDayDigit: 10,
isLunarLeapMonth: false,
leapMonth: 4,
chineseYear: '庚子',
chineseMonth: '己卯',
chineseDay: '乙亥',
chineseTimes: [
'丙子', '丁丑', '戊寅',
'己卯', '庚辰', '辛巳',
'壬午', '癸未', '甲申',
'乙酉', '丙戌', '丁亥'
],
week: '4',
animal: '鼠',
constellation: '牡羊座',
chineseFeb: true,
chineseTimesTenGod: [
'食', '傷', '才', '財',
'殺', '官', 'ㄗ', '印',
'比', '劫', '食', '傷'
],
dengGui: '丑酉',
lunarPerMonthHasDays: [
'29', '30', '30',
'30', '29', '30',
'29', '29', '30',
'29', '30', '29',
'30'
],
chineseTime: '壬午',
chineseTimeTenGod: 'ㄗ',
chineseYearTenGod: '殺',
chineseMonthTenGod: '財',
chineseDayTenGod: '劫',
solarTermDistance: {
previous: {
solarTerm: '驚蟄',
diffDistanceDay: 28,
diffDistanceDetail: 27.543935185185187
},
next: {
solarTerm: '清明',
diffDistanceDay: 2,
diffDistanceDetail: 2.651412037037037
}
},
nayin: '土',
purpleWhites: [
'八白', '七赤', '六白',
'五黃', '四綠', '三碧',
'二黑', '一白', '九紫',
'八白', '七赤', '六白'
]
}
from chinese-lunar.
的確!這部分我也想過,所以未來我也有規劃可以讓大家設定各地時區(經緯度),因應自己的所在地區進行計算。
from chinese-lunar.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chinese-lunar.