## 道历节日 道历对象提供以下方法获取道历节日: 1. .getFestivals() > 返回道历节日对象数组 道历节日对象提供如下方法: 1. getName() > 获取名称,例如:何仙姑圣诞 2. getRemark() > 获取备注(字符串),如果没有,返回空字符串,例如:天腊,此日五帝会于束方九炁青天 3. toString() > 字符串输出名称,例如:何仙姑圣诞 4. toFullString() > 字符串输出名称和备注,例如:天腊之辰[天腊,此日五帝会于束方九炁青天] ### 示例代码
javascript
java
csharp
php
python
go
var d = Tao.fromLunar(Lunar.fromYmd(2021, 10, 14)); var l = d.getFestivals(); for (var i=0, j=l.length; i<j; i++){ console.log(l[i]); }
Tao d = Tao.fromLunar(Lunar.fromYmd(2021, 10, 14)); List<String> l = d.getFestivals(); for (String s:l){ System.out.println(s); }
Tao d = Tao.fromLunar(Lunar.fromYmd(2021, 10, 14)); List<string> l = d.getFestivals(); foreach(string s in l) { Console.WriteLine(s); }
$d = Tao::fromLunar(Lunar::fromYmd(2021, 10, 14)); $l = $d->getFestivals(); foreach ($l as $s) { echo $s . "\n"; }
d = Tao.fromLunar(Lunar.fromYmd(2021, 10, 14)) l = d.getFestivals() for s in l: print s
d := calendar.NewTaoFromLunar(calendar.NewLunarFromYmd(2021, 10, 14)) l := d.GetFestivals() for i := l.Front(); i != nil; i = i.Next() { f := i.Value.(*calendar.TaoFestival) fmt.Println(f.ToString()) }
### 输出