## toString 佛历对象可以使用两种字符串输出方式: 1. .toString() > 佛历对象的默认字符串输出 2. .toFullString() > 佛历对象的全量字符串输出,包含尽量多的信息 ### 示例代码
javascript
java
csharp
php
python
go
//实例化 var d = Foto.fromLunar(Lunar.fromDate(new Date())); //默认字符串输出 console.log(d); console.log(d.toString()); //全量字符串输出 console.log(d.toFullString());
Foto d = Foto.fromLunar(Lunar.fromDate(new Date())); System.out.println(d); System.out.println(d.toString()); System.out.println(d.toFullString());
Foto d = Foto.fromLunar(Lunar.fromDate(new Date())); Console.WriteLine(d); Console.WriteLine(d.toString()); Console.WriteLine(d.toFullString());
$d = Foto::fromLunar(Lunar::fromDate(new DateTime())); echo $d."\n"; echo $d->toString()."\n"; echo $d->toFullString()."\n";
d = Foto.fromLunar(Lunar.fromDate(datetime.now())) print d print d.toString() print d.toFullString()
d := calendar.NewFotoFromLunar(calendar.NewLunarFromDate(time.Now())) fmt.Println(d) fmt.Println(d.ToString()) fmt.Println(d.ToFullString())
### 输出