DateHelper class

use this code for Indonesian await initializeDateFormatting('id_ID', null);

Constructors

DateHelper()

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

convertDateFromSecondToMilliSecond(int dateInMilliSecond) int
convertFormat(String date, {String oldFormat = "yyyy-MM-dd HH:mm:ss", String format = "dd MMMM yyyy, HH:mm", String locale = "id_ID"}) String
convertFormatFromDateTime(DateTime date, {String format = "dd MMMM yyyy, HH:mm", String locale = "id_ID"}) String
convertFormatFromInt(int dateInMilliSecond, {String format = "dd MMMM yyyy, HH:mm", String locale = "id_ID"}) String
convertIntToDatetime(int dateInMilliSecond) DateTime
convertStringToTimeOfDay(String time) TimeOfDay
"10:10:10"
convertTimeOfDayToString(TimeOfDay timeOfDay) String
convertToDateTime(String date, {String oldFormat = "yyyy-MM-dd"}) DateTime
getDateLeft(int dateInMilliSecond) String
getDateLeftInNumber(int dateInMilliSecond) String
getDifferentDate(int dateInMilliSecond) String
getPastMonth() DateTime
isAfterOrSameDay(DateTime firstTime, DateTime endTime) bool
isBeforeOrSameDay(DateTime firstTime, DateTime endTime) bool
isBefore() not work for today
isExpired(int dateInMilliSecond) bool
DATE FORMAT date: d dd month: M MM MMM MMMM year: yy yyyy hour: HH minute: mm second: ss
isSameDay(DateTime firstTime, DateTime endTime) bool
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

Constants

date_format_db → const String