TWCalendarTool class

Constructors

TWCalendarTool()

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

today DateTime
今天
no setter
tomorrow DateTime
明天
no setter

Static Methods

dateIsBetweenIn(DateTime date, DateTime firstDate, DateTime lastDate) bool
在 firstDate 和 lastDate 之间
dateIsToday(DateTime date) bool
是否今天
formatPadLeft(int number, {int count = 2}) String
多少位,补充 0
getDayNumberSize(BuildContext context, double padding) double
getDaysInMonth(int year, int month) int
这个月多少天
getMonthName(int month, {List<String>? monthNames}) String
月份
getSelectedDays(DateTime? selectStartTime, DateTime? selectEndTime) int
选择天数
getSelectedDaysTitle(DateTime? selectStartTime, DateTime? selectEndTime) String?
选择标题
getYearName(int year, {String? title}) String
isHadSelected({required List<DateTime> selectedTimes, required DateTime dateTime}) bool
是否选择
isSameDate(DateTime firstDate, DateTime secondDate) bool
是否同一天
nowAfterDays(int days) DateTime
多少天以后
onlyDay(DateTime? date) DateTime?
确保去掉时分秒
removeSelected({required List<DateTime> selectedTimes, required DateTime dateTime}) → void
移除日期
sortDateTimes(List<DateTime> selectedTimes) → void
排序