Dayfl class
Constructors
-
Dayfl([dynamic datetime, String formatStr = ''])
-
datetime
支持传入格式 Dayfl | String | int | DateTime
Methods
-
add(DateLocationEnum type, int num)
→ Dayfl
-
添加日期
-
compareTo(dynamic date)
→ int
-
和DateTime 的 compareTo 方法一样
-
difference(dynamic date)
→ Duration
-
时间差 两个时间相差 小时数
-
format([String formatStr = Location.defaultFormatStr, String locale = '', dynamic dayFormat = false])
→ String
-
格式化
-
getLocale([String name = ''])
→ Locale
-
获取当前使用语言包
-
getWeek([String locale = ''])
→ Map<String, dynamic>
-
获取week
-
isAfter(dynamic date)
→ bool
-
之后
-
isBefore(dynamic date)
→ bool
-
之前
-
isSame(Dayfl dayfl, [DateLocationEnum type = DateLocationEnum.millisecondsSinceEpoch])
→ bool
-
判断日期是否相同
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
subtract(DateLocationEnum type, int num)
→ Dayfl
-
减去日期
-
toArray()
→ List<int>
-
转换成数组
dayfl('2019-01-25').toArray() //
2019, 0, 25, 0, 0, 0, 0
-
toString()
→ String
-
A string representation of this object.
inherited