SolarUtil class

阳历工具 @author 6tail

Constructors

SolarUtil()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

FESTIVAL Map<String, String>
日期对应的节日
final
OTHER_FESTIVAL Map<String, List<String>>
日期对应的非正式节日
final
WEEK List<String>
星期
final
WEEK_FESTIVAL Map<String, String>
几月第几个星期几对应的节日
final
XING_ZUO List<String>
星座
final

Static Methods

getDaysBetween(int ay, int am, int ad, int by, int bm, int bd) int
获取两个日期之间相差的天数(如果日期a比日期b小,天数为正,如果日期a比日期b大,天数为负)
getDaysInYear(int year, int month, int day) int
获取某天为当年的第几天
getDaysOfMonth(int year, int month) int
获取某年某月有多少天
getDaysOfYear(int year) int
获取某年有多少天(平年365天,闰年366天)
getWeeksOfMonth(int year, int month, int start) int
获取某年某月有多少周
isLeapYear(int year) bool
是否闰年 @param year 年 @return true/false 闰年/非闰年

Constants

DAYS_OF_MONTH → const List<int>
每月天数