FTime class
依赖intl 时间的工具类
Constructors
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 Methods
-
getDaysBetween(
int t1, int t2) → int -
t1
: eg: DateTime.now().millisecondsSinceEpoch) 返回相差的天数的整数部分的值(t1
比t2
差几天,前天就是-2,昨天就是-1,明天就是1) -
getDiff(
int? publishTime) → String -
--------------------比较类方法----------------------------
publishTime
: eg: DateTime.now().millisecondsSinceEpoch) return: n天前,n小时前,刚刚 -
isSameDay(
int t1, int t2) → bool -
t1
: eg: DateTime.now().millisecondsSinceEpoch) return: 是否是同一天 -
ts2chinese(
int publishTime) → String -
--------------------格式类方法----------------------------
publishTime
: eg: DateTime.now().millisecondsSinceEpoch) return: x年x月x日 -
ts2italic(
int publishTime) → String -
publishTime
: eg: DateTime.now().millisecondsSinceEpoch) return: yyyy/MM/dd -
ts2line(
int publishTime) → String -
publishTime
: eg: DateTime.now().millisecondsSinceEpoch) return: yyyy-MM-dd